-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FC-0068 docs: update quick reference RST content #613
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,6 +19,55 @@ Headings | |||||
|
||||||
RST allows you to use almost any symbol to underline headings, as long as you're consistent between heading level. However, the way shown above is how headings should be defined in all Open edX documentation. | ||||||
|
||||||
Develop Sections | ||||||
**************** | ||||||
|
||||||
You can nest sections in the topic as needed, to give it structure and break it up into discrete parts. | ||||||
|
||||||
Copy the Topic and Section Structure as needed | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
.. code-block:: RST | ||||||
|
||||||
Topic Title | ||||||
########### | ||||||
|
||||||
Introduce the topic | ||||||
|
||||||
If this is a long topic with multiple sections, use the **contents** directive below: | ||||||
|
||||||
.. contents:: Contents | ||||||
:local: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is indented wrong I think, the
|
||||||
|
||||||
Section 1 | ||||||
********* | ||||||
|
||||||
Introduce Section One | ||||||
|
||||||
Subsection 1 | ||||||
++++++++++++ | ||||||
|
||||||
Content for Section 1/Subsection 1 | ||||||
|
||||||
Subsection 2 | ||||||
++++++++++++ | ||||||
|
||||||
Content for Section 1/Subsection 2 | ||||||
|
||||||
Section 2 | ||||||
********* | ||||||
|
||||||
Introduce Section Two | ||||||
|
||||||
Subsection 1 | ||||||
++++++++++++ | ||||||
|
||||||
Content for Section 2/Subsection 1 | ||||||
|
||||||
Subsection 2 | ||||||
++++++++++++ | ||||||
|
||||||
Content for Section 2/Subsection 2 | ||||||
|
||||||
|
||||||
Inline Markup | ||||||
************* | ||||||
|
@@ -172,6 +221,111 @@ Use the following code: | |||||
|
||||||
.. seealso:: To see alternative ways of defining tables, visit the `RST documentation about this topic <https://canonical-documentation-with-sphinx-and-readthedocscom.readthedocs-hosted.com/style-guide/#tables>`_. | ||||||
|
||||||
Add a Substitution | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this section is more confusing than helpful. I've never used this - do we use it a lot? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have never used it either. I added it because it was on the previous template page, and I wanted to include all the content in case it was necessary. |
||||||
****************** | ||||||
|
||||||
In RST, a *substitution* serves as a variable which you can set a value for once, then use repeatedly. This is useful for words or phrases that are used often, as it enables you to edit the value once and change it everywhere. | ||||||
|
||||||
You also need to use substitutions for inline images, as explained below. | ||||||
|
||||||
Substitutions are all kept in the source/substitutions.txt file in the documentation project on GitHub. | ||||||
|
||||||
Copy the format for the substitution as needed. | ||||||
|
||||||
.. code-block:: RST | ||||||
|
||||||
.. |variable name| replace:: value | ||||||
|
||||||
.. |Platform name| replace:: Open edX | ||||||
|
||||||
You then add the *variable name* inline in the topic. | ||||||
|
||||||
.. code-block:: RST | ||||||
|
||||||
A line of text with an |variable name| inserted. | ||||||
|
||||||
|
||||||
Add a Sidebar | ||||||
************* | ||||||
|
||||||
You can add any content in a sidebar. Open edX uses sidebars for image thumbnails, videos, and other notes. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Use Open edX as an adjective. Also, the site already has sidebars, should we be encouraging use of more? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is the same case as the substitution. I added it here to keep all the information on the previous template page. Still, I agree with you that adding more sidebars to the repository can be excessive, as we already have it. However, in the case of parallel repositories like the one for Aspects, it could be helpful to have different tools and references. |
||||||
|
||||||
The sidebar must come directly after a heading. | ||||||
|
||||||
Copy this codeblock to add a new sidebar topic. | ||||||
|
||||||
.. code-block:: RST | ||||||
|
||||||
.. sidebar:: Sample Sidebar | ||||||
|
||||||
Any content, typically an image, video, or note. | ||||||
|
||||||
Add an Image to a Topic | ||||||
*********************** | ||||||
|
||||||
You can add an on its own separate line, inline, or in a sidebar. | ||||||
|
||||||
You can also add an image directly, or add a thumbnail of an larger image, which when clicked on will open the full image. | ||||||
|
||||||
You must save images in the ``source/_images`` directory before adding a reference to it in a topic. | ||||||
|
||||||
Add an Image on its Own Line | ||||||
============================ | ||||||
|
||||||
Copy this codeblock to an image on its own line. | ||||||
|
||||||
.. code-block:: RST | ||||||
|
||||||
Line of content, followed by a line with an image. | ||||||
|
||||||
.. image:: /_images/image-file-name | ||||||
|
||||||
Or, a line of content, followed by a clickable thumbnail of a large image. | ||||||
|
||||||
.. thumbnail:: /_images/image-file-name | ||||||
|
||||||
Add an Image Inline | ||||||
=================== | ||||||
|
||||||
To add an image inline, you must first create a substitution for the image in the substitutions.txt file. | ||||||
|
||||||
Copy the format for the substitution as needed. | ||||||
|
||||||
.. code-block:: RST | ||||||
|
||||||
.. |variable name| image:: /_images/image-file-name | ||||||
|
||||||
You then add the *variable name* inline in the topic. | ||||||
|
||||||
.. code-block:: RST | ||||||
|
||||||
A line of text with an |variable name| inserted. | ||||||
|
||||||
Add an Thumbnail in a Sidebar | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
============================= | ||||||
|
||||||
You can add a thumbnail in a sidebar, a common practice for How-to topics. | ||||||
|
||||||
The sidebar must come directly after a heading. | ||||||
|
||||||
Copy this codeblock to add a new sidebar with a thumbnail. | ||||||
|
||||||
.. code-block:: RST | ||||||
|
||||||
.. sidebar:: Sample Sidebar with a thumbnail | ||||||
|
||||||
.. thumbnail:: _images/image-file-name | ||||||
|
||||||
Use Inline Formatting | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This section is identical to the above https://docsopenedxorg--613.org.readthedocs.build/en/613/documentors/references/quick_reference_rst.html#inline-markup section, so this can be removed. |
||||||
********************* | ||||||
|
||||||
RST supports **bold**, *italic*, and ``mono-spaced`` characters. You can also make GUI elements appear as :guilabel:`objects`. | ||||||
|
||||||
Copy this codeblock for inline formatting as needed. | ||||||
|
||||||
.. include:: ../references/rst_samples/inline.txt | ||||||
|
||||||
|
||||||
Learn More | ||||||
********** | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.