Skip to content

Commit 2830766

Browse files
committed
Merge branch 'main' of github.com:readthedocs/readthedocs.org into filesections
2 parents 60ae1de + aab31ff commit 2830766

File tree

92 files changed

+8967
-7578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+8967
-7578
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- restore_cache:
8282
keys:
8383
- pre-commit-cache-{{ checksum "pre-commit-cache-key.txt" }}
84-
- run: pip install --user 'tox<5'
84+
- run: pip install --user tox
8585
- run: tox -e pre-commit
8686
- run: tox -e migrations
8787
- node/install:

CHANGELOG.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
Version 11.16.0
2+
---------------
3+
4+
:Date: December 03, 2024
5+
6+
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#11813 <https://github.com/readthedocs/readthedocs.org/pull/11813>`__)
7+
* `@agjohnson <https://github.com/agjohnson>`__: Add email for business projects and new dashboard change (`#11809 <https://github.com/readthedocs/readthedocs.org/pull/11809>`__)
8+
* `@humitos <https://github.com/humitos>`__: Development: try `uv` on Docker images (`#11807 <https://github.com/readthedocs/readthedocs.org/pull/11807>`__)
9+
* `@agjohnson <https://github.com/agjohnson>`__: Fix Sphinx tutorial seealso links (`#11806 <https://github.com/readthedocs/readthedocs.org/pull/11806>`__)
10+
* `@stsewd <https://github.com/stsewd>`__: Requirements: install unicode-slugify from pypi (`#11805 <https://github.com/readthedocs/readthedocs.org/pull/11805>`__)
11+
* `@humitos <https://github.com/humitos>`__: Django Debug Toolbar: disable slow panels (`#11804 <https://github.com/readthedocs/readthedocs.org/pull/11804>`__)
12+
* `@ericholscher <https://github.com/ericholscher>`__: Upgrade NR to fix issue (`#11802 <https://github.com/readthedocs/readthedocs.org/pull/11802>`__)
13+
* `@humitos <https://github.com/humitos>`__: Release 11.15.0 (`#11800 <https://github.com/readthedocs/readthedocs.org/pull/11800>`__)
14+
* `@humitos <https://github.com/humitos>`__: Addons: create `AddonsConfig` on `Project.post_save` (`#11799 <https://github.com/readthedocs/readthedocs.org/pull/11799>`__)
15+
* `@stsewd <https://github.com/stsewd>`__: Allauth: disable account enumeration protection (`#11797 <https://github.com/readthedocs/readthedocs.org/pull/11797>`__)
16+
* `@humitos <https://github.com/humitos>`__: Addons: base version to compare against (DocDiff and File Tree Diff) (`#11794 <https://github.com/readthedocs/readthedocs.org/pull/11794>`__)
17+
* `@humitos <https://github.com/humitos>`__: File tree diff: migrate feature flag to model field (`#11793 <https://github.com/readthedocs/readthedocs.org/pull/11793>`__)
18+
* `@plaindocs <https://github.com/plaindocs>`__: Docusaurus basics (`#11752 <https://github.com/readthedocs/readthedocs.org/pull/11752>`__)
19+
20+
Version 11.15.0
21+
---------------
22+
23+
:Date: November 26, 2024
24+
25+
* `@stsewd <https://github.com/stsewd>`__: Allauth: disable account enumeration protection (`#11797 <https://github.com/readthedocs/readthedocs.org/pull/11797>`__)
26+
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#11792 <https://github.com/readthedocs/readthedocs.org/pull/11792>`__)
27+
* `@ericholscher <https://github.com/ericholscher>`__: Support RTD_USE_PROMOS for setting USE_PROMOS in dev (`#11790 <https://github.com/readthedocs/readthedocs.org/pull/11790>`__)
28+
* `@ericholscher <https://github.com/ericholscher>`__: Increase default docker limits (`#11788 <https://github.com/readthedocs/readthedocs.org/pull/11788>`__)
29+
* `@stsewd <https://github.com/stsewd>`__: Set brownouts for deprecated embed API v2 (`#11786 <https://github.com/readthedocs/readthedocs.org/pull/11786>`__)
30+
* `@humitos <https://github.com/humitos>`__: Use addons JavaScript file from Docker container (`#11785 <https://github.com/readthedocs/readthedocs.org/pull/11785>`__)
31+
* `@ericholscher <https://github.com/ericholscher>`__: Add Markdoc to the doc tools (`#11782 <https://github.com/readthedocs/readthedocs.org/pull/11782>`__)
32+
* `@humitos <https://github.com/humitos>`__: Migrations: re-order them for deploy (`#11779 <https://github.com/readthedocs/readthedocs.org/pull/11779>`__)
33+
* `@humitos <https://github.com/humitos>`__: Release 11.14.0 (`#11778 <https://github.com/readthedocs/readthedocs.org/pull/11778>`__)
34+
* `@stsewd <https://github.com/stsewd>`__: Docs: update connected accounts steps to use env vars (`#11777 <https://github.com/readthedocs/readthedocs.org/pull/11777>`__)
35+
* `@humitos <https://github.com/humitos>`__: Addons: make default root CSS selector a shared option (`#11767 <https://github.com/readthedocs/readthedocs.org/pull/11767>`__)
36+
* `@humitos <https://github.com/humitos>`__: Addons: `load_when_embedded` config (`#11765 <https://github.com/readthedocs/readthedocs.org/pull/11765>`__)
37+
* `@stsewd <https://github.com/stsewd>`__: Custom domain: check CNAME when adding domains (`#11747 <https://github.com/readthedocs/readthedocs.org/pull/11747>`__)
38+
* `@stsewd <https://github.com/stsewd>`__: Docs: update custom domains docs (`#11734 <https://github.com/readthedocs/readthedocs.org/pull/11734>`__)
39+
* `@stsewd <https://github.com/stsewd>`__: Build: allow partial override of build steps (`#11710 <https://github.com/readthedocs/readthedocs.org/pull/11710>`__)
40+
* `@humitos <https://github.com/humitos>`__: Dependencies: use GitHub Action + pip-tools (`#9479 <https://github.com/readthedocs/readthedocs.org/pull/9479>`__)
41+
* `@humitos <https://github.com/humitos>`__: GitHub Action: add link to Pull Request preview (`#9450 <https://github.com/readthedocs/readthedocs.org/pull/9450>`__)
42+
143
Version 11.14.0
244
---------------
345

dockerfiles/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,26 @@ RUN npm install -g nodemon
5656
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
5757
locale-gen
5858

59-
RUN pip3 install --no-cache-dir --upgrade pip
59+
# Install ``uv`` package manager
60+
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/usr/bin/" sh
6061

6162
# Ensure that ``python`` is in the PATH so that ``./manage.py`` works
6263
RUN ln -s /usr/bin/python3 /usr/bin/python
6364

6465
WORKDIR /tmp
6566

66-
COPY requirements/pip.txt pip.txt
6767
COPY requirements/docker.txt docker.txt
68-
RUN pip3 install --no-cache-dir -r docker.txt
68+
RUN uv pip sync --system docker.txt
6969

7070
# Install readthedocs-ext only if GITHUB_TOKEN is provided
7171
WORKDIR /usr/src/app/checkouts/
7272
RUN if [ -n "$GITHUB_TOKEN" ] ; \
7373
then \
7474
git clone --depth 1 https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/readthedocs/readthedocs-ext ; \
75-
pip3 install --no-cache-dir -e readthedocs-ext ; \
75+
uv pip install --system --no-cache-dir -e readthedocs-ext ; \
7676
fi
7777

7878
RUN git clone --depth 1 https://github.com/readthedocs/ext-theme ; \
79-
pip3 install --no-cache-dir -e ext-theme
79+
uv pip install --system --no-cache-dir -e ext-theme
8080

8181
WORKDIR /usr/src/app/checkouts/readthedocs.org

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
master_doc = "index"
8282
copyright = "Read the Docs, Inc & contributors"
83-
version = "11.14.0"
83+
version = "11.16.0"
8484
release = version
8585
exclude_patterns = ["_build", "shared", "_includes"]
8686
default_role = "obj"

docs/dev/settings.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,10 @@ The following secrets are required to use ``djstripe`` and our Stripe integratio
168168
.. envvar:: RTD_STRIPE_SECRET
169169
.. envvar:: RTD_STRIPE_PUBLISHABLE
170170
.. envvar:: RTD_DJSTRIPE_WEBHOOK_SECRET
171+
172+
Ethical Ads variables
173+
~~~~~~~~~~~~~~~~~~~~~
174+
175+
The following variables are required to use ``ethicalads`` in dev:
176+
177+
.. envvar:: RTD_USE_PROMOS

docs/user/api/v3.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,10 +2001,11 @@ Embed
20012001
:query string url: full URL of the document (with optional fragment) to fetch content from.
20022002
:query string doctool: *optional* documentation tool key name used to generate the target documentation (currently, only ``sphinx`` is accepted)
20032003
:query string doctoolversion: *optional* documentation tool version used to generate the target documentation (e.g. ``4.2.0``).
2004+
:query string maincontent: *optional* CSS selector for the main content of the page (e.g. ``div#main``).
20042005

20052006
.. note::
20062007

2007-
Passing ``?doctool=`` and ``?doctoolversion=`` may improve the response,
2008+
Passing ``?doctool=``, ``?doctoolversion=`` and ``?maincontent=`` may improve the response
20082009
since the endpoint will know more about the exact structure of the HTML and can make better decisions.
20092010

20102011
Additional APIs

docs/user/guides/embedding-content.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ from our own docs and will populate the content of it into the ``#help-container
6363
'url': 'https://docs.readthedocs.io/en/latest/automation-rules.html%23creating-an-automation-rule',
6464
// 'doctool': 'sphinx',
6565
// 'doctoolversion': '4.2.0',
66+
// 'maincontent': 'div#main',
6667
};
6768
var url = 'https://readthedocs.org/api/v3/embed/?' + $.param(params);
6869
$.get(url, function(data) {

docs/user/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Read the Docs: documentation simplified
1010
/intro/doctools
1111
/intro/mkdocs
1212
/intro/sphinx
13+
/intro/docusaurus
14+
/intro/markdoc
1315
/intro/add-project
1416
/examples
1517

docs/user/intro/doctools.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,23 @@ with more coming soon.
2929
:bdg-success:`rst` :bdg-success:`md`
3030
Written in
3131
:bdg-info:`python`
32+
33+
.. grid-item-card:: Docusarus
34+
:link: docusaurus.html
35+
36+
Docusaurus is a static-site generator that builds a single-page application with fast client-side navigation and out-of-the-box documentation features.
37+
38+
Supported formats
39+
:bdg-success:`mdx` :bdg-success:`md`
40+
Written in
41+
:bdg-info:`React`
42+
43+
.. grid-item-card:: Markdoc
44+
:link: markdoc.html
45+
46+
Markdoc is a documentation tool developed by Stripe that allows you to write documentation in a custom Markdown flavor.
47+
48+
Supported formats
49+
:bdg-success:`md`
50+
Written in
51+
:bdg-info:`javascript`

docs/user/intro/docusaurus.rst

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
2+
Docusarus
3+
=========
4+
5+
.. meta::
6+
:description lang=en: Hosting Docusaurus sites on Read the Docs.
7+
8+
`Docusaurus`_ is a static-site generator that builds a single-page application with fast client-side navigation and out-of-the-box documentation features.
9+
10+
Minimal configuration required to build a Docusaurus project on Read the Docs looks like this,
11+
specifying a nodejs toolchain on Ubuntu, using multiple :ref:`build <config-file/v2:build>` commands to install the requirements,
12+
build the site, and copy the output to $READTHEDOCS_OUTPUT:
13+
14+
.. code-block:: yaml
15+
:caption: .readthedocs.yaml
16+
17+
version: 2
18+
build:
19+
os: "ubuntu-22.04"
20+
tools:
21+
nodejs: "18"
22+
commands:
23+
# "docs/" was created following the Docusaurus tutorial:
24+
# npx create-docusaurus@latest docs classic
25+
# but you can just use your existing Docusaurus site
26+
#
27+
# Install Docusaurus dependencies
28+
- cd docs/ && npm install
29+
# Build the site
30+
- cd docs/ && npm run build
31+
# Copy generated files into Read the Docs directory
32+
- mkdir --parents $READTHEDOCS_OUTPUT/html/
33+
- cp --recursive docs/build/* $READTHEDOCS_OUTPUT/html/
34+
35+
.. _Docusaurus: https://docusaurus.io/
36+
37+
Limitations
38+
-----------
39+
40+
.. csv-table:: Limitations
41+
:header: "Feature", "Description", "Supported"
42+
43+
"Search", "Provides full-text search capabilities.", "Not supported"
44+
"Files changed", "Ability to see what HTML files changes in pull request previews", "Not supported"
45+
46+
47+
Quick start
48+
-----------
49+
50+
- If you have an existing Docusaurus project you want to host on Read the Docs, check out our :doc:`/intro/add-project` guide.
51+
52+
- If you're new to Docusaurus, check out the official `Fast Track`_ guide.
53+
54+
.. _Fast Track: https://docusaurus.io/docs#fast-track
55+
56+
Configuring Docusaurus and Read the Docs addons
57+
-----------------------------------------------
58+
59+
For optimal integration with Read the Docs, make the optional following configuration changes to your Docusaurus config.
60+
61+
.. contents::
62+
:depth: 1
63+
:local:
64+
:backlinks: none
65+
66+
Set the canonical URL
67+
~~~~~~~~~~~~~~~~~~~~~
68+
69+
A :doc:`canonical URL </canonical-urls>` allows you to specify the preferred version of a web page
70+
to prevent duplicated content.
71+
72+
Set your Docusaurus `url`_ to your Read the Docs canonical URL using `dotenv <https://www.npmjs.com/package/dotenv>`__ and a
73+
:doc:`Read the Docs environment variable </reference/environment-variables>`:
74+
75+
.. code-block:: js
76+
:caption: docusaurus.config.js
77+
78+
import 'dotenv/config';
79+
80+
export default {
81+
url: process.env.READTHEDOCS_CANONICAL_URL,
82+
};
83+
84+
.. _url: https://docusaurus.io/docs/configuration#syntax-to-declare-docusaurus-config
85+
86+
Example repository and demo
87+
---------------------------
88+
89+
Example repository
90+
https://github.com/readthedocs/test-builds/tree/docusaurus
91+
92+
Demo
93+
https://test-builds.readthedocs.io/en/docusaurus/

docs/user/intro/markdoc.rst

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
Markdoc
2+
=======
3+
4+
.. meta::
5+
:description lang=en: Hosting Markdoc documentation on Read the Docs.
6+
7+
`Markdoc`_ is a powerful documentation framework that allows you to write documentation in a flavor of Markdown.
8+
9+
Minimal configuration is required to build an existing Markdoc project on Read the Docs.
10+
11+
.. code-block:: yaml
12+
:caption: .readthedocs.yaml
13+
14+
version: 2
15+
16+
build:
17+
os: ubuntu-24.04
18+
tools:
19+
nodejs: "22"
20+
commands:
21+
# Install dependencies
22+
- cd docs/ && npm install
23+
# Build the site
24+
- cd docs/ && npm run build
25+
# Copy generated files into Read the Docs directory
26+
- mkdir --parents $READTHEDOCS_OUTPUT/html/
27+
- cp --verbose --recursive docs/out/* $READTHEDOCS_OUTPUT/html/
28+
29+
.. _Markdoc: https://markdoc.io/
30+
31+
Example configuration
32+
---------------------
33+
34+
In order to build a Markdoc project on Read the Docs,
35+
you need to generate static HTML from the Next JS build:
36+
37+
.. code-block:: js
38+
:caption: next.config.js
39+
40+
const withMarkdoc = require('@markdoc/next.js');
41+
42+
const nextConfig = {
43+
// Optional: Export HTML files instead of a Node.js server
44+
output: 'export',
45+
46+
// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
47+
trailingSlash: true,
48+
49+
// Use Canonical URL, but only the path and with no trailing /
50+
// End result is like: `/en/latest`
51+
basePath: process.env.READTHEDOCS_CANONICAL_URL
52+
? new URL(process.env.READTHEDOCS_CANONICAL_URL).pathname.replace(/\/$/, "")
53+
: "",
54+
}
55+
56+
module.exports =
57+
withMarkdoc({mode: 'static'})({
58+
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdoc'],
59+
...nextConfig,
60+
});
61+
62+
Limitations
63+
-----------
64+
65+
All Read the Docs features are supported for Markdoc projects.
66+
There may be some Markdoc features that depend on server-side rendering that are not supported.
67+
68+
Getting started
69+
---------------
70+
71+
- If you have an existing Markdoc project you want to host on Read the Docs, check out our :doc:`/intro/add-project` guide.
72+
- If you're new to Markdoc, check out the official `Getting started with Markdoc`_ guide.
73+
74+
.. _Getting started with Markdoc: https://markdoc.io/docs/getting-started
75+
76+
Example repository and demo
77+
---------------------------
78+
79+
Example repository
80+
https://github.com/readthedocs/test-builds/tree/markdoc
81+
82+
Demo
83+
https://test-builds.readthedocs.io/en/markdoc/
84+
85+
Further reading
86+
---------------
87+
88+
* `Markdoc documentation`_
89+
90+
.. _Markdoc documentation: https://markdoc.io/docs

docs/user/intro/sphinx.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ You can now continue writing your docs in ``.md`` files and it will work with Sp
133133
.. seealso::
134134

135135
`Getting started with MyST in Sphinx <https://myst-parser.readthedocs.io/en/latest/sphinx/intro.html>`_
136-
137-
:doc:`/guides/migrate-rest-myst`
138-
Learn how to use references between different Sphinx projects, for instance between subprojects
136+
Learn how to use MyST to write Markdown documentation in your Sphinx project.
139137

140138
:doc:`/guides/migrate-rest-myst`
141139
Start writing Markdown in your existing reStructuredText project, or migrate it completely.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "readthedocs",
3-
"version": "11.14.0",
3+
"version": "11.16.0",
44
"description": "Read the Docs build dependencies",
55
"author": "Read the Docs, Inc <[email protected]>",
66
"scripts": {

readthedocs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Read the Docs."""
22

33

4-
__version__ = "11.14.0"
4+
__version__ = "11.16.0"

0 commit comments

Comments
 (0)