On 2013-10-12, ketakopter wrote: > [-- Type: text/plain, Encoding: --]
> Hello, > I'm trying to learn how to extend Sphinx. I need to create new directives > and other stuff, so I tried to start off with a simple directive, which > encloses the contents in div tags of certain class in the html output. Did you find: Creating reStructuredText Directives (http://docutils.sourceforge.net/docs/howto/rst-directives.html) from the Docutils documentation? It may need adaption regarding the way the code is "injected" but should also work for Sphinx (which can be regarded as a "wrapper" around Docutils). > This is the closest I got: ... > However, it is far from satisfactory: the contents are not parsed further, > e.g. roles inside are not processed. > Can you point me to the right direction to do this? If possible, I would be > grateful not only for a code example, but also on hints on where to look > and learn more. Code examples are in the Docutils source code: docutils/parsers/rst/directives/*.py > BTW, I've been dealing with this for quite some time. All the ideas I got > are from code I read from other people. I tried to follow the tutorial, but > it has been of no help. In general, I feel like Sphinx and Docutils are > poorly documented for newbies, but maybe it's just me. You are not alone. However, the manpower behind the Docutils and Sphinx project is quite limited, so we depend on contributions to improve this situation. Günter -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/groups/opt_out.
