Skip to content

Commit

Permalink
[FEATURE] Support basic glossary directive
Browse files Browse the repository at this point in the history
Support glossary directive containing a definition list. Multiple terms, groups and :sorted: flag are not yet supported

https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-glossary

resolves: #928
releases: main, 1.0
  • Loading branch information
linawolf committed Mar 16, 2024
1 parent 566af8b commit b95c614
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="{{ node.glossary }}">{{ renderNode(node.value) }}</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- content start -->
<div class="section" id="directive-tests">
<h1>Directive tests</h1>

<div class=""><dl>
<dt>environment</dt>

<dd>A structure where information about all documents under the root is
saved, and used for cross-referencing. The environment is pickled
after the parsing stage, so that successive runs only need to read
and parse new and changed documents.</dd> <dt>source directory</dt>

<dd>The directory which, including its subdirectories, contains all
source files for one documentation project.</dd> </dl>
</div>

</div>

<!-- content end -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Directive tests
===============

.. glossary::

environment
A structure where information about all documents under the root is
saved, and used for cross-referencing. The environment is pickled
after the parsing stage, so that successive runs only need to read
and parse new and changed documents.

source directory
The directory which, including its subdirectories, contains all
source files for one documentation project.

0 comments on commit b95c614

Please sign in to comment.