Skip to content

Commit b9a6726

Browse files
author
Chris Cho
committed
PRR fixes
1 parent da37db8 commit b9a6726

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

source/style-guide/markup/directives/sharedinclude.txt

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,26 @@
44
Shared Include
55
==============
66

7-
The ``sharedinclude`` directive allows you to source content from a file
8-
located in the MongoDB internal `docs-shared <https://github.com/10gen/docs-shared>`__
7+
The ``sharedinclude`` directive lets you source content from a file located in
8+
the MongoDB internal `docs-shared <https://github.com/10gen/docs-shared>`__
99
repository. Use this directive when you need to keep the same content in sync
1010
for multiple sets of documentation or multiple branches of a documentation set.
1111

1212
This page uses the following terms:
1313

14-
- **External file**: content committed to the ``docs-shared`` repository
15-
that can be sourced by other documentation repositories.
16-
- **Sourcing file**: content in a documentation repository that uses a
17-
``sharedinclude`` directive to pull content from an external file.
18-
- **Placeholder**: a variable that indicates text that the sourcing file
19-
must provide a replacement for. These are located in external files and are
20-
represented by the placeholder name surrounded by the ``|`` (pipe)
21-
character.
14+
External file
15+
Content committed to the ``docs-shared`` repository that other documentation
16+
repositories can source.
17+
18+
Sourcing file
19+
Content in a documentation repository that uses a ``sharedinclude``
20+
directive to pull content from an external file.
21+
22+
Placeholder
23+
A variable that indicates text that the sourcing file must provide a
24+
replacement for. These variables are represented by the placeholder name
25+
surrounded by the ``|`` (pipe) character. The variables are used in
26+
external files.
2227

2328
.. tip::
2429

@@ -33,14 +38,14 @@ This page uses the following terms:
3338
Setup
3439
-----
3540

36-
You must add the URL from which to source the shared content in the
37-
``sharedinclude_root`` setting of the documentation repository's ``snooty.toml``
38-
configuration file. This should reference the unprocessed versions of the files,
39-
currently served from the ``raw.githubusercontent.com`` domain.
41+
You must ensure the ``sharedinclude_root`` setting in the documentation
42+
repository's ``snooty.toml`` configuration file is set to the shared
43+
content repository URL. This URL must point to the unprocessed version of the
44+
files, currently served from the ``raw.githubusercontent.com`` domain.
4045

41-
If the shared content that your docs repository file references is on the
42-
``main`` branch of ``docs-snooty``, your ``snooty.toml`` configuration entry
43-
should resemble the following line:
46+
For example, if the external files that your docs repository file references
47+
is on the ``main`` branch of ``docs-shared``, your docs repository
48+
``snooty.toml`` configuration entry should resemble the following line:
4449

4550
.. code-block::
4651

@@ -54,11 +59,11 @@ Syntax
5459
------
5560

5661
To include content from an external file, add the ``sharedinclude`` directive
57-
to the sourcing file. Specify the path of external file relative to the
62+
to the sourcing file. Specify the path of the external file relative to the
5863
``docs-shared`` base directory, omitting the leading slash.
5964

6065
For example, if the file path from the root of the ``docs-shared`` repository
61-
is ``drivers/compatibility-tables/c.rst``, the rST in the sourcing file
66+
is ``drivers/compatibility-tables/c.rst``, the {+rst-abbrev+} in the sourcing file
6267
should include the following code:
6368

6469
.. code-block:: rst
@@ -112,17 +117,21 @@ Placeholders in Inline Context
112117
``````````````````````````````
113118

114119
An **inline context** describes the positioning of placeholders as adjacent to
115-
other paragraph text. You can only replace variable placeholders in an inline
116-
context with values that contain markup elements which includes any of the
117-
following types:
120+
other paragraph text. If the placeholder is in an inline context, you can
121+
replace it with markup elements including the following types:
118122

119123
- Unformatted text
120124
- Formatted text such as ``monospace``, **emphasis**, or *italic*
121125
- Links
122126

127+
You cannot replace variable placeholders in inline contexts with elements
128+
such as lists, code blocks, includes, and headers. If you need to
129+
source these elements from a ``sharedinclude``, make sure the placeholders
130+
are in a block context as described in the next section.
131+
123132
For example, suppose you want to source content from an external file, located
124-
at ``dbx/fundamentals/agg-operators.rst`` in the ``docs-shared`` repository,
125-
which contains the following content:
133+
at ``dbx/fundamentals/agg-operators.rst`` in the ``docs-shared`` repository
134+
that contains the following content:
126135

127136
.. code-block:: rst
128137
:caption: dbx/fundamentals/agg-operators.rst external file in docs_shared
@@ -131,7 +140,6 @@ which contains the following content:
131140
To learn more about **aggregation operators**, see the
132141
|learn-agg-operator-docs|.
133142

134-
135143
In the sourcing file, you can use the following placeholder replacement
136144
in the ``sharedinclude`` directive:
137145

@@ -146,27 +154,22 @@ in the ``sharedinclude`` directive:
146154
Aggregation Operations page in the
147155
:server:`MongoDB Server documentation </aggregation>`
148156

149-
The published page renders as if the sourcing file contained the following rST:
157+
The published page renders as if the sourcing file contained the following
158+
{+rst-abbrev+}:
150159

151160
.. code-block:: rst
152161
:copyable: false
153162

154163
To learn more about **aggregation operators**, see the Aggregation Operations
155164
page in the :server:`MongoDB Server documentation </aggregation>`.
156165

157-
158-
You cannot replace variable placeholders in inline contexts with elements
159-
such as lists, codeblocks, includes, and headers. If you need to
160-
source these elements from a ``sharedinclude``,, make sure the placeholders
161-
are in a block context as described in the following section.
162-
163166
Placeholders in Block Context
164167
`````````````````````````````
165168

166169
A **block context** describes the positioning of placeholders as
167-
separated from paragraph text by linebreaks. You can replace variable
168-
placeholders in a block context with most inline or block rST elements
169-
including the following types:
170+
separated from paragraph text by line breaks. You can replace variable
171+
placeholders in a block context with most inline or block {+rst-abbrev+}
172+
elements, including the following types:
170173

171174
- Titles
172175
- Code blocks
@@ -175,7 +178,7 @@ including the following types:
175178

176179
For example, suppose you want to source content from an external file, located
177180
at ``dbx/fundamentals/agg-operators.rst`` in the ``docs-shared`` repository,
178-
which containsk the following content:
181+
which contains the following content:
179182

180183
.. code-block:: rst
181184
:caption: dbx/fundamentals/agg-operators.rst external file in docs_shared
@@ -211,7 +214,7 @@ in the ``sharedinclude`` directive:
211214

212215
{ <operator>: [ <argument1>, <argument2> ... ] }
213216

214-
The published page renders as if the sourcing file contained the following rST:
217+
The published page renders as if the sourcing file contained the following {+rst-abbrev+}:
215218

216219
.. code-block:: rst
217220
:copyable: false

0 commit comments

Comments
 (0)