Skip to content

Commit 7eb7f96

Browse files
committed
Merge branch 'master' into sss-integration-guide
2 parents b42c935 + 505be8c commit 7eb7f96

33 files changed

+829
-48
lines changed

CHANGELOG.rst

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Version 5.1.5
2+
-------------
3+
4+
:Date: July 01, 2020
5+
6+
* `@choldgraf <https://github.com/choldgraf>`__: cross-linking build limitations for pr builds (`#7248 <https://github.com/readthedocs/readthedocs.org/pull/7248>`__)
7+
* `@humitos <https://github.com/humitos>`__: Allow to extend Import Project page from corporate (`#7234 <https://github.com/readthedocs/readthedocs.org/pull/7234>`__)
8+
* `@humitos <https://github.com/humitos>`__: Make RemoteRepository.full_name db_index=True (`#7231 <https://github.com/readthedocs/readthedocs.org/pull/7231>`__)
9+
* `@stsewd <https://github.com/stsewd>`__: Search: tweak fuzziness (`#7225 <https://github.com/readthedocs/readthedocs.org/pull/7225>`__)
10+
* `@ericholscher <https://github.com/ericholscher>`__: Re-add the rst filter that got removed (`#7223 <https://github.com/readthedocs/readthedocs.org/pull/7223>`__)
11+
112
Version 5.1.4
213
-------------
314

docs/config-file/v2.rst

+87-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Below is an example YAML file which shows the most common configuration options:
2525
# configuration: mkdocs.yml
2626
2727
# Optionally build your docs in additional formats such as PDF
28-
formats:
28+
formats:
2929
- pdf
3030
3131
# Optionally set the version of Python and requirements required to build your docs
@@ -74,11 +74,15 @@ Example:
7474

7575
.. code-block:: yaml
7676
77+
version: 2
78+
7779
# Default
7880
formats: []
7981
8082
.. code-block:: yaml
8183
84+
version: 2
85+
8286
# Build PDF & ePub
8387
formats:
8488
- epub
@@ -90,6 +94,8 @@ Example:
9094

9195
.. code-block:: yaml
9296
97+
version: 2
98+
9399
# Build all formats
94100
formats: all
95101
@@ -104,6 +110,8 @@ Configuration of the Python environment to be used.
104110

105111
.. code-block:: yaml
106112
113+
version: 2
114+
107115
python:
108116
version: 3.7
109117
install:
@@ -153,6 +161,8 @@ Example:
153161

154162
.. code-block:: yaml
155163
164+
version: 2
165+
156166
python:
157167
version: 3.7
158168
install:
@@ -199,6 +209,8 @@ Example:
199209

200210
.. code-block:: yaml
201211
212+
version: 2
213+
202214
python:
203215
version: 3.7
204216
install:
@@ -242,6 +254,8 @@ Configuration for Conda support.
242254

243255
.. code-block:: yaml
244256
257+
version: 2
258+
245259
conda:
246260
environment: environment.yml
247261
@@ -260,6 +274,8 @@ Configuration for the documentation build process.
260274

261275
.. code-block:: yaml
262276
277+
version: 2
278+
263279
build:
264280
image: latest
265281
@@ -290,6 +306,8 @@ Configuration for Sphinx documentation
290306

291307
.. code-block:: yaml
292308
309+
version: 2
310+
293311
sphinx:
294312
builder: html
295313
configuration: conf.py
@@ -335,6 +353,8 @@ Configuration for Mkdocs documentation.
335353

336354
.. code-block:: yaml
337355
356+
version: 2
357+
338358
mkdocs:
339359
configuration: mkdocs.yml
340360
fail_on_warning: false
@@ -374,6 +394,8 @@ VCS submodules configuration.
374394

375395
.. code-block:: yaml
376396
397+
version: 2
398+
377399
submodules:
378400
include:
379401
- one
@@ -394,6 +416,8 @@ List of submodules to be included.
394416

395417
.. code-block:: yaml
396418
419+
version: 2
420+
397421
submodules:
398422
include: all
399423
@@ -412,6 +436,8 @@ List of submodules to be excluded.
412436

413437
.. code-block:: yaml
414438
439+
version: 2
440+
415441
submodules:
416442
exclude: all
417443
@@ -427,6 +453,65 @@ Do a recursive clone of the submodules.
427453

428454
This is ignored if there aren't submodules to clone.
429455

456+
search
457+
~~~~~~
458+
459+
Settings for more control over :doc:`/server-side-search`.
460+
461+
.. code-block:: yaml
462+
463+
version: 2
464+
465+
search:
466+
ranking:
467+
api/v1/*: -1
468+
api/v2/*: 4
469+
470+
search.ranking
471+
``````````````
472+
473+
Set a custom search rank over pages matching a pattern.
474+
475+
:Type: ``map`` of patterns to ranks
476+
:Default: ``{}``
477+
478+
Patterns are matched against the final html pages produced by the build
479+
(you should try to match `index.html`, not `docs/index.rst`).
480+
Patterns can include some special characters:
481+
482+
- ``*`` matches everything
483+
- ``?`` matches any single character
484+
- ``[seq]`` matches any character in ``seq``
485+
486+
The rank can be an integer number between -10 and 10 (inclusive).
487+
Pages with a rank closer to -10 will appear further down the list of results,
488+
and pages with a rank closer to 10 will appear higher in the list of results.
489+
Note that 0 means *normal rank*, not *no rank*.
490+
491+
.. code-block:: yaml
492+
493+
version: 2
494+
495+
search:
496+
ranking:
497+
# Match a single file
498+
tutorial.hml: 2
499+
500+
# Match all files under the api/v1 directory
501+
api/v1/*: -5
502+
503+
# Match all files that end with tutorial.html
504+
*/tutorial.html: 3
505+
506+
.. note::
507+
508+
The final rank will be the last pattern to match the page.
509+
510+
.. tip::
511+
512+
Is better to decrease the rank of pages you want to deprecate,
513+
rather than increasing the rank of the other pages.
514+
430515
Schema
431516
------
432517

@@ -468,6 +553,7 @@ New settings
468553
- :ref:`config-file/v2:mkdocs`
469554
- :ref:`config-file/v2:submodules`
470555
- :ref:`config-file/v2:python.install`
556+
- :ref:`config-file/v2:search`
471557

472558
Migrating from the web interface
473559
--------------------------------

docs/guides/autobuild-docs-for-pull-requests.rst

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ Features
5050
Limitations
5151
-----------
5252

53+
Auto-builds for pull/merge requests have
54+
:doc:`the same limitations as regular documentation builds </builds>`.
55+
5356
Currently we don't index search for pull request builds.
5457
Searches will default to the default experience for your tool.
5558
This is a feature we plan to add,

docs/guides/searching-with-readthedocs.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Searching with Read the Docs
22
============================
33

44
Read the Docs uses :doc:`/server-side-search` to power our search.
5-
This guide explains how to add a "search as you type" feature to your documentation,
5+
This guide explains how to add a "search as you type" feature to your documentation,
66
and how to use advanced query syntax to get more accurate results.
77

88
You can find information on the search architecture and how we index documents in our
@@ -20,7 +20,7 @@ Enable "search as you type" in your documentation
2020
documentation more closely with the search implementation of Read the Docs.
2121
It adds a clean and minimal full-page search UI that supports a **search as you type** feature.
2222

23-
To try this feature,
23+
To try this feature,
2424
you can press :guilabel:`/` (forward slash) and start typing or just visit these URLs:
2525

2626
- https://docs.readthedocs.io/?rtd_search=contributing

docs/server-side-search.rst

+8-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ Search results land on the exact content you were looking for
2525
We index every heading in the document,
2626
allowing you to get search results exactly to the content that you are searching for.
2727
Try this out by searching for `"full-text search"`_.
28-
28+
29+
Full control over which results should be listed first
30+
Set a custom rank per page,
31+
allowing you to deprecate content, and always show relevant content to your users first.
32+
See :ref:`config-file/v2:search.ranking`.
33+
2934
Search across projects you have access to (|com_brand|)
3035
This allows you to search across all the projects you access to in your Dashboard.
3136
**Don't remember where you found that document the other day?
@@ -35,10 +40,10 @@ Special query syntax for more specific results.
3540
We support a full range of search queries.
3641
You can see some examples in our :ref:`guides/searching-with-readthedocs:search query syntax` guide.
3742

38-
..
43+
..
3944
Code object searching
4045
With the user of :doc:`Sphinx Domains <sphinx:/usage/restructuredtext/domains>` we are able to automatically provide direct search results to your Code objects.
41-
You can try this out with our docs here by searching for
46+
You can try this out with our docs here by searching for
4247
TODO: Find good examples in our docs, API maybe?
4348
4449
.. _"full-text search": https://docs.readthedocs.io/en/latest/search.html?q=%22full-text+search%22

readthedocs/api/v2/views/integrations.py

+6
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ def handle_webhook(self):
407407

408408
# Sync versions when a branch/tag was created/deleted
409409
if event in (GITHUB_CREATE, GITHUB_DELETE):
410+
log.info('Triggered sync_versions: project=%s event=%s', self.project, event)
410411
return self.sync_versions_response(self.project)
411412

412413
# Handle pull request events
@@ -447,6 +448,7 @@ def handle_webhook(self):
447448
# already have the CREATE/DELETE events. So we don't trigger the sync twice.
448449
return self.sync_versions_response(self.project, sync=False)
449450

451+
log.info('Triggered sync_versions: project=%s events=%s', self.project, events)
450452
return self.sync_versions_response(self.project)
451453

452454
# Trigger a build for all branches in the push
@@ -559,6 +561,8 @@ def handle_webhook(self):
559561
after = data['after']
560562
# Tag/branch created/deleted
561563
if GITLAB_NULL_HASH in (before, after):
564+
log.info('Triggered sync_versions: project=%s before=%s after=%s',
565+
self.project, before, after)
562566
return self.sync_versions_response(self.project)
563567
# Normal push to master
564568
try:
@@ -659,6 +663,8 @@ def handle_webhook(self):
659663
# will be triggered with the normal push.
660664
if branches:
661665
return self.get_response_push(self.project, branches)
666+
log.info('Triggered sync_versions: project=%s event=%s',
667+
self.project, event)
662668
return self.sync_versions_response(self.project)
663669
except KeyError:
664670
raise ParseError('Invalid request')

0 commit comments

Comments
 (0)