Skip to content

Commit

Permalink
Merge pull request #41 from junghoon-vans/docs/add-directive-type-inf…
Browse files Browse the repository at this point in the history
…ormation

docs(page): Add example usage for directive type
  • Loading branch information
junghoon-vans authored Dec 26, 2022
2 parents fe6fe74 + 4dc66f8 commit 5da2599
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
62 changes: 62 additions & 0 deletions docs/source/directive.type.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
==============
Directive Type
==============

The ``directive type`` is a string that specifies the type of directive.
**varST** supports all of directives for substitution in reStructuredText.

The example of directive type is following contents.

Replacement Text
================

Replacement Text is the most common type of directive.

.. code-block:: bash
$ varst 'varST=reStructuredText'
The above command will update the substitution data of replacement text.

.. code-block:: diff
- .. |varST| replace:: variable
+ .. |varST| replace:: reStructuredText
The substitution data of ``varST`` is updated to ``reStructuredText``.

Images
======

Image directive is used to insert images into the document.

.. code-block:: bash
$ varst 'image url=https://example.com/new-image.png'
The above command will update the substitution data of image directive.

.. code-block:: diff
- .. |image url| image:: https://example.com/old-image.png
+ .. |image url| image:: https://example.com/new-image.png
The substitution data of ``image url`` directive is updated to ``https://example.com/new-image.png``.

Objects
=======

Object directive is used to associate ambiguous text with a object identifier.

.. code-block:: bash
$ varst 'isbn=9780738201443'
The above command will update the substitution data of object directive.

.. code-block:: diff
- .. |isbn| book:: 0738201448
+ .. |isbn| book:: 9780738201443
The substitution data of ``isbn`` directive is updated to ``9780738201443``.
8 changes: 8 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ Usage
# run with multiple substitutions
$ varst 'name1=value1' 'name2=value2'
Directive Type
==============

.. toctree::
:maxdepth: 2

directive.type

Github Actions
==============

Expand Down

0 comments on commit 5da2599

Please sign in to comment.