-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:readthedocs/readthedocs.org into fi…
…lesections
- Loading branch information
Showing
92 changed files
with
8,967 additions
and
7,578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
|
||
Docusarus | ||
========= | ||
|
||
.. meta:: | ||
:description lang=en: Hosting Docusaurus sites on Read the Docs. | ||
|
||
`Docusaurus`_ is a static-site generator that builds a single-page application with fast client-side navigation and out-of-the-box documentation features. | ||
|
||
Minimal configuration required to build a Docusaurus project on Read the Docs looks like this, | ||
specifying a nodejs toolchain on Ubuntu, using multiple :ref:`build <config-file/v2:build>` commands to install the requirements, | ||
build the site, and copy the output to $READTHEDOCS_OUTPUT: | ||
|
||
.. code-block:: yaml | ||
:caption: .readthedocs.yaml | ||
version: 2 | ||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
nodejs: "18" | ||
commands: | ||
# "docs/" was created following the Docusaurus tutorial: | ||
# npx create-docusaurus@latest docs classic | ||
# but you can just use your existing Docusaurus site | ||
# | ||
# Install Docusaurus dependencies | ||
- cd docs/ && npm install | ||
# Build the site | ||
- cd docs/ && npm run build | ||
# Copy generated files into Read the Docs directory | ||
- mkdir --parents $READTHEDOCS_OUTPUT/html/ | ||
- cp --recursive docs/build/* $READTHEDOCS_OUTPUT/html/ | ||
.. _Docusaurus: https://docusaurus.io/ | ||
|
||
Limitations | ||
----------- | ||
|
||
.. csv-table:: Limitations | ||
:header: "Feature", "Description", "Supported" | ||
|
||
"Search", "Provides full-text search capabilities.", "Not supported" | ||
"Files changed", "Ability to see what HTML files changes in pull request previews", "Not supported" | ||
|
||
|
||
Quick start | ||
----------- | ||
|
||
- If you have an existing Docusaurus project you want to host on Read the Docs, check out our :doc:`/intro/add-project` guide. | ||
|
||
- If you're new to Docusaurus, check out the official `Fast Track`_ guide. | ||
|
||
.. _Fast Track: https://docusaurus.io/docs#fast-track | ||
|
||
Configuring Docusaurus and Read the Docs addons | ||
----------------------------------------------- | ||
|
||
For optimal integration with Read the Docs, make the optional following configuration changes to your Docusaurus config. | ||
|
||
.. contents:: | ||
:depth: 1 | ||
:local: | ||
:backlinks: none | ||
|
||
Set the canonical URL | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
A :doc:`canonical URL </canonical-urls>` allows you to specify the preferred version of a web page | ||
to prevent duplicated content. | ||
|
||
Set your Docusaurus `url`_ to your Read the Docs canonical URL using `dotenv <https://www.npmjs.com/package/dotenv>`__ and a | ||
:doc:`Read the Docs environment variable </reference/environment-variables>`: | ||
|
||
.. code-block:: js | ||
:caption: docusaurus.config.js | ||
import 'dotenv/config'; | ||
export default { | ||
url: process.env.READTHEDOCS_CANONICAL_URL, | ||
}; | ||
.. _url: https://docusaurus.io/docs/configuration#syntax-to-declare-docusaurus-config | ||
|
||
Example repository and demo | ||
--------------------------- | ||
|
||
Example repository | ||
https://github.com/readthedocs/test-builds/tree/docusaurus | ||
|
||
Demo | ||
https://test-builds.readthedocs.io/en/docusaurus/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
Markdoc | ||
======= | ||
|
||
.. meta:: | ||
:description lang=en: Hosting Markdoc documentation on Read the Docs. | ||
|
||
`Markdoc`_ is a powerful documentation framework that allows you to write documentation in a flavor of Markdown. | ||
|
||
Minimal configuration is required to build an existing Markdoc project on Read the Docs. | ||
|
||
.. code-block:: yaml | ||
:caption: .readthedocs.yaml | ||
version: 2 | ||
build: | ||
os: ubuntu-24.04 | ||
tools: | ||
nodejs: "22" | ||
commands: | ||
# Install dependencies | ||
- cd docs/ && npm install | ||
# Build the site | ||
- cd docs/ && npm run build | ||
# Copy generated files into Read the Docs directory | ||
- mkdir --parents $READTHEDOCS_OUTPUT/html/ | ||
- cp --verbose --recursive docs/out/* $READTHEDOCS_OUTPUT/html/ | ||
.. _Markdoc: https://markdoc.io/ | ||
|
||
Example configuration | ||
--------------------- | ||
|
||
In order to build a Markdoc project on Read the Docs, | ||
you need to generate static HTML from the Next JS build: | ||
|
||
.. code-block:: js | ||
:caption: next.config.js | ||
const withMarkdoc = require('@markdoc/next.js'); | ||
const nextConfig = { | ||
// Optional: Export HTML files instead of a Node.js server | ||
output: 'export', | ||
// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html` | ||
trailingSlash: true, | ||
// Use Canonical URL, but only the path and with no trailing / | ||
// End result is like: `/en/latest` | ||
basePath: process.env.READTHEDOCS_CANONICAL_URL | ||
? new URL(process.env.READTHEDOCS_CANONICAL_URL).pathname.replace(/\/$/, "") | ||
: "", | ||
} | ||
module.exports = | ||
withMarkdoc({mode: 'static'})({ | ||
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdoc'], | ||
...nextConfig, | ||
}); | ||
Limitations | ||
----------- | ||
|
||
All Read the Docs features are supported for Markdoc projects. | ||
There may be some Markdoc features that depend on server-side rendering that are not supported. | ||
|
||
Getting started | ||
--------------- | ||
|
||
- If you have an existing Markdoc project you want to host on Read the Docs, check out our :doc:`/intro/add-project` guide. | ||
- If you're new to Markdoc, check out the official `Getting started with Markdoc`_ guide. | ||
|
||
.. _Getting started with Markdoc: https://markdoc.io/docs/getting-started | ||
|
||
Example repository and demo | ||
--------------------------- | ||
|
||
Example repository | ||
https://github.com/readthedocs/test-builds/tree/markdoc | ||
|
||
Demo | ||
https://test-builds.readthedocs.io/en/markdoc/ | ||
|
||
Further reading | ||
--------------- | ||
|
||
* `Markdoc documentation`_ | ||
|
||
.. _Markdoc documentation: https://markdoc.io/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "readthedocs", | ||
"version": "11.14.0", | ||
"version": "11.16.0", | ||
"description": "Read the Docs build dependencies", | ||
"author": "Read the Docs, Inc <[email protected]>", | ||
"scripts": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"""Read the Docs.""" | ||
|
||
|
||
__version__ = "11.14.0" | ||
__version__ = "11.16.0" |
Oops, something went wrong.