diff options
| author | mikemckiernan <mmckiernan@nvidia.com> | 2022-12-29 08:58:32 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-29 13:58:32 +0000 |
| commit | 32bce8fb7c0b7a2eb89c7e0e3e7ef13fce7f03a6 (patch) | |
| tree | b013f6081aaf3a00e3ac7da6adba5189f61e3733 /doc/development/tutorials | |
| parent | 984416247370a87ad947d89f334a8ce2d8ea6558 (diff) | |
| download | sphinx-git-32bce8fb7c0b7a2eb89c7e0e3e7ef13fce7f03a6.tar.gz | |
Copy edit the tutorial (#11049)
- Correct two typos.
- Include the ingredient index in the "for example"
statement. It's tedious, but the audience is reading
to learn.
Diffstat (limited to 'doc/development/tutorials')
| -rw-r--r-- | doc/development/tutorials/recipe.rst | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/development/tutorials/recipe.rst b/doc/development/tutorials/recipe.rst index 0e96a45cb..1ed428ad0 100644 --- a/doc/development/tutorials/recipe.rst +++ b/doc/development/tutorials/recipe.rst @@ -85,7 +85,7 @@ because ``ObjectDescription`` is a special-purpose directive that's intended for describing things like classes, functions, or, in our case, recipes. More specifically, ``handle_signature`` implements parsing the signature of the directive and passes on the object's name and type to its superclass, while -``add_taget_and_index`` adds a target (to link to) and an entry to the index +``add_target_and_index`` adds a target (to link to) and an entry to the index for this node. We also see that this directive defines ``has_content``, ``required_arguments`` @@ -122,9 +122,10 @@ all it really is is a list of tuples like ``('tomato', 'TomatoSoup', 'test', 'rec-TomatoSoup',...)``. Refer to the :doc:`domain API guide </extdev/domainapi>` for more information on this API. -These index pages can be referred by combination of domain name and its -``name`` using :rst:role:`ref` role. For example, ``RecipeIndex`` can be -referred by ``:ref:`recipe-recipe```. +These index pages can be referenced with the :rst:role:`ref` role by combining +the domain name and the index ``name`` value. For example, ``RecipeIndex`` can be +referenced with ``:ref:`recipe-recipe``` and ``IngredientIndex`` can be referenced +with ``:ref:`recipe-ingredient```. .. rubric:: The domain @@ -152,7 +153,7 @@ Moving on, we can see that we've defined ``initial_data``. The values defined in ``initial_data`` will be copied to ``env.domaindata[domain_name]`` as the initial data of the domain, and domain instances can access it via ``self.data``. We see that we have defined two items in ``initial_data``: -``recipes`` and ``recipe2ingredient``. These contain a list of all objects +``recipes`` and ``recipe_ingredients``. Each contains a list of all objects defined (i.e. all recipes) and a hash that maps a canonical ingredient name to the list of objects. The way we name objects is common across our extension and is defined in the ``get_full_qualified_name`` method. For each object created, @@ -214,7 +215,7 @@ You can now use the extension throughout your project. For example: The important things to note are the use of the ``:recipe:ref:`` role to cross-reference the recipe actually defined elsewhere (using the -``:recipe:recipe:`` directive. +``:recipe:recipe:`` directive). Further reading |
