mitsuhiko / rstblog

NIH site generator
Other
211 stars 63 forks source link

Add the ability to add custom directives #19

Open espeed opened 12 years ago

espeed commented 12 years ago

With Sphinx you can use custom directives by including it in your conf.py extensions list (https://bitbucket.org/birkenfeld/sphinx/src/52ee02818d19/doc/conf.py).

You put the custom directives in a module in your _ext directory (next to the_template dir), and then the Sphinx Config class complies conf.py (https://bitbucket.org/birkenfeld/sphinx/src/52ee02818d19/sphinx/config.py#cl-184).

This simple change would make rstblog extendable without having to fork the code.

dbrgn commented 12 years ago

There already is such a feature. Add your directive module to rstblog/modules and include it in your config.yml.

For an example, see #24.

Edit: Ah, you're talking about including them without forking... Sorry, ignore my comment :) But #20 might be a way to solve your issue.