Skip to content

Commit

Permalink
(DOCSP-11378) Update text formatting page
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Sansone committed Aug 4, 2020
1 parent 79b7d84 commit 477cd3c
Show file tree
Hide file tree
Showing 31 changed files with 5,836 additions and 17 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ help: ## Show this help message
html: ## Builds this branch's HTML under build/<branch>/html
giza make html

clean-html:
rm -rf build/${GIT_BRANCH}
giza make html

publish: ## Builds this branch's publishable HTML and other artifacts under build/public
giza make publish

Expand Down
5 changes: 2 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,12 @@ def has(self, *args):
'rst': 'restructuredText',
'Rst': 'RestructuredText',
'package-branch': 'testing',
'package-version': '3.0.0',
'package-version': '4.4.0',
'package-name-org': 'mongodb-org',
'version': '3.0',
'version': '4.0',
'nbsp' : 'unicode:: 0xA0'
}


## add `extlinks` for each published version.
for i in conf.git.branches.published:
extlinks[i] = ( ''.join([ conf.project.url, '/', i, '%s' ]), '' )
Expand Down
1 change: 1 addition & 0 deletions source/includes/styles/corrections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@
padding-right: 10px;
}
</style>

31 changes: 18 additions & 13 deletions source/reference/source-constants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
Source Constants
================

The `substitutions <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-definitions>`__
built into restructuredText have a number of limitations and quirks. For
example, they cannot be used to substitute content inside of code blocks,
and cannot contain links.
The `substitutions
<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-definitions>`__
built into restructuredText have a number of limitations and quirks.
For example, they cannot be used to substitute content inside of code
blocks, and cannot contain links.

The MongoDB Documentation Project has an extension called ``source_constants``
which allows you to substitute constants anywhere in a page *before*
docutils begins its parse stage.
The MongoDB Documentation Project has an extension called
``source_constants`` which allows you to substitute constants anywhere
in a page *before* docutils begins its parse stage.

Example
-------
Expand All @@ -18,6 +19,7 @@ In your ``conf.py``, add ``'source_constants'`` to the ``extensions``
list, and define a ``source_constants`` dict:

.. code-block:: python
:linenos:

source_constants = {
'package-branch': 'testing',
Expand All @@ -29,13 +31,15 @@ You may then use these constants in your restructuredText files:

.. code-block:: rst

Create the ``/etc/apt/sources.list.d/mongodb-org-{+package-version+}.list`` list file using
the command appropriate for your version of Ubuntu:
Create the
``/etc/apt/sources.list.d/mongodb-org-{+package-version+}.list``
list file using the command appropriate for your version of Ubuntu:

Ubuntu 14.04
.. code-block:: sh
.. code-block:: sh

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/{+package-branch+} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-{+version+}.list
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu \
trusty/mongodb-org/{+package-branch+} multiverse" \
| sudo tee /etc/apt/sources.list.d/mongodb-org-{+version+}.list

Comparison with Other Variable Syntaxes
---------------------------------------
Expand All @@ -62,7 +66,8 @@ Comparison with Other Variable Syntaxes
* - Valid Content
- Anything
- Anything
- May not be used to inject links or other non-trivial types of content
- May not be used to inject links or other non-trivial types of
content

* - Mutable
- Can currently only be defined in ``conf.py``
Expand Down
19 changes: 19 additions & 0 deletions source/style-guide/includes/terms/0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
-

.. glossary::

24x7x365
Use this phrase to describe continuous availability. Don't
replace the *x*'s with slashes, hyphens, or the word *by*.

.. list-table::
:widths: 50 50
:header-rows: 1

* - Recommended
-
* - We deliver fantastic support — we are here to help,
24x7x365.
- We deliver fantastic support: 24 by 7 by 365.

Loading

0 comments on commit 477cd3c

Please sign in to comment.