-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from lsst-sqre/tickets/DM-44193
DM-44193: Add [sphinx.redirects] table to documenteer.toml
- Loading branch information
Showing
13 changed files
with
176 additions
and
27 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,13 +1,3 @@ | ||
# See the documenteer.toml for overrides of the Rubin user guide presets | ||
|
||
from documenteer.conf.guide import * | ||
|
||
rediraffe_redirects = { | ||
"pipelines/build-overview.rst": "guides/pipelines/build-overview.rst", | ||
"pipelines/configuration.rst": "guides/pipelines/configuration.rst", | ||
"pipelines/cpp-api-linking.rst": "guides/pipelines/cpp-api-linking.rst", | ||
"pipelines/index.rst": "guides/pipelines/index.rst", | ||
"pipelines/install.rst": "guides/pipelines/install.rst", | ||
"pipelines/package-docs-cli.rst": "guides/pipelines/package-docs-cli.rst", | ||
"pipelines/stack-docs-cli.rst": "guides/pipelines/stack-docs-cli.rst", | ||
} | ||
from documenteer.conf.guide import * # noqa: F403 |
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,42 @@ | ||
########################################### | ||
Redirecting pages when reorganizing content | ||
########################################### | ||
|
||
As a documentation site grows, its natural for content to need to move. | ||
If pages are moved or renamed, you should create a redirect from the old page path to the new one so that users won't be orphaned by out-of-date links and bookmarks. | ||
Documenteer supports this with the :ref:`guide-sphinx-redirects` table in the :file:`documenteer.toml` configuration file. | ||
|
||
Adding a page redirect in documenteer.toml | ||
========================================== | ||
|
||
As an example, consider the page at :file:`old-page.rst` has moved to :file:`some-dir/new-page.rst`. | ||
To create a redirect from the old page to the new one, add the following to the :file:`documenteer.toml` file: | ||
|
||
.. code-block:: toml | ||
:caption: documenteer.toml | ||
[sphinx.redirects] | ||
"old-page.rst" = "some-dir/new-page.rst" | ||
These paths are relative to the documentation project's root directory (where :file:`conf.py` and :guide:`documenteer.toml` are located) and include the file extension (e.g., :file:`.rst` or :file:`.md`). | ||
|
||
The table accepts an arbitrary number of redirects: | ||
|
||
.. code-block:: toml | ||
:captin: documenteer.toml | ||
[sphinx.redirects] | ||
"old-page.rst" = "some-dir/new-page.rst" | ||
"foo.rst" = "bar.rst" | ||
Redirects for deleted pages | ||
=========================== | ||
|
||
Besides pages that have been moved, you can use this feature for pages that have been deleted. | ||
Choose an existing path that is most relevant to the deleted page and redirect it to the new location. | ||
|
||
.. code-block:: toml | ||
:caption: documenteer.toml | ||
[sphinx.redirects] | ||
"deleted-page.rst" = "index.rst" |
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,60 @@ | ||
############### | ||
Embedded videos | ||
############### | ||
|
||
Videos and screencasts are a great way to show user interfaces in your documentation. | ||
Rubin Observatory has a Vimeo account where we store our documentation and user support videos. | ||
Rubin user guides have built-in directives, ``youtube`` and ``vimeo``, to embed video players into the documentation page. | ||
|
||
Embedding a Vimeo video | ||
======================= | ||
|
||
To embed a Vimeo video, use the ``vimeo`` directive with the video ID as the argument: | ||
|
||
.. tab-set:: | ||
|
||
.. tab-item:: reStructuredText | ||
:sync: rst | ||
|
||
.. code-block:: rst | ||
.. vimeo:: 800911530 | ||
.. tab-item:: markdown | ||
:sync: md | ||
|
||
.. code-block:: markdown | ||
:::vimeo 800911530 | ||
The video ID is the number at the end of the video URL. | ||
For example, the video URL for the video with ID ``800911530`` is ``https://vimeo.com/800911530``. | ||
|
||
Embedding a YouTube video | ||
========================= | ||
|
||
To embed a YouTube video, use the ``youtube`` directive with the video ID as the argument: | ||
|
||
.. tab-set:: | ||
|
||
.. tab-item:: reStructuredText | ||
:sync: rst | ||
|
||
.. code-block:: rst | ||
.. youtube:: yKqEDFvmYwY | ||
.. tab-item:: markdown | ||
:sync: md | ||
|
||
.. code-block:: markdown | ||
:::vimeo yKqEDFvmYwY | ||
The video ID is the string at the end of the video URL. | ||
For example, the video URL for the video with ID ``yKqEDFvmYwY`` is ``https://www.youtube.com/watch?v=yKqEDFvmYwY``. | ||
|
||
More information | ||
================ | ||
|
||
- `sphinxcontrib-youtube <https://sphinxcontrib-youtube.readthedocs.io/en/latest/index.html>`__ is the Sphinx extension used to embed YouTube and Vimeo videos. See this documentation for additional options for using this extension. |
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 |
---|---|---|
|
@@ -41,6 +41,7 @@ | |
"sphinxcontrib.mermaid", | ||
"sphinx_prompt", | ||
"sphinx_design", | ||
"sphinxcontrib.youtube", | ||
] | ||
) | ||
|
||
|