mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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>
20 lines
400 B
Python
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,
|
|
}
|