0

To customize a certain page in my documentation, I'd like to add a special class or id to the body of the page.

I've tried using

:name: amazing-unique-id;

at the top of my index.rst file, but this doesn't work. Any idea how I could achieve that?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
vinni
  • 633
  • 2
  • 8
  • 32
  • If you mean adding a class or id to the `` tag, then you must edit your Sphinx theme. See http://www.sphinx-doc.org/en/master/theming.html – Steve Piercy Aug 22 '18 at 17:53
  • Well, I'd like only a certain page to have this class. Not each page in general. – vinni Aug 22 '18 at 18:32
  • Use your Jinja2 magic to detect a variable that you use in an option when invoking `make html` to conditionally add the class/id. – Steve Piercy Aug 23 '18 at 00:50

0 Answers0