sphinx/doc/development/tutorials/examples/helloworld.py
Stephen Finucane 5c061ff266 docs: Address review comments
helloworld:
- Return version metadata from extension
- Use 'reST' instead of 'rST'
- Don't use single backticks

todo:
- Return version metadata from extension
- Link to events section of API guide, rather than entire document
- Include name of phases in when describing build phases
- Use more method cross-references where possible
- Fix typo in usage example

recipe:
- Return version metadata from extension
- Rework code to simplify things
- Remove docstrings from 'generate' functions, which are simply
  duplicates of the original docstring
- Rename 'rcp' directive to 'recipe', the 'reref' role to 'ref', and a
  whole lot of variables to something more grokable
- Fix typos in both documentation and code

I've also fixed up the docstrings for some of the 'domain' functions to
make them render a little nicer (they took me a while to figure out).

Signed-off-by: Stephen Finucane <stephen@that.guru>
2019-02-14 10:31:45 +00:00

20 lines
400 B
Python

from docutils import nodes
from docutils.parsers.rst import Directive
class HelloWorld(Directive):
def run(self):
paragraph_node = nodes.paragraph(text='Hello World!')
return [paragraph_node]
def setup(app):
app.add_directive("helloworld", HelloWorld)
return {
'version': '0.1',
'parallel_read_safe': True,
'parallel_write_safe': True,
}