Hieroglyph Builders¶
In Sphinx parlance, a “builder” is an output target. Sphinx includes several of its own, including ones for HTML pages, ePub documents, and PDF.
Hieroglyph adds additional builders for generating slides. The builder’s “name” must be given to the -b command-line option of sphinx-build to select a builder.
You may want to add one (or more) of the Hieroglyph builders to your
Makefile
to make it easier to run the Sphinx builder.
For example, to add the slides
builder to your Makefile, add the
following target:
slides:
$(SPHINXBUILD) -b slides $(ALLSPHINXOPTS) $(BUILDDIR)/slides
@echo "Build finished. The HTML slides are in $(BUILDDIR)/slides."
(Remember, makefiles are indented using tabs, not spaces.)
Available slide building classes.
-
class
hieroglyph.builder.
SlideBuilder
(app: sphinx.application.Sphinx)[source]¶ This is the standard Slide HTML builder.
Its output is a directory with HTML, along with the needed style sheets, slide table, and presenter’s console JavaScript.
Its name is
slides
.
-
class
hieroglyph.builder.
DirectorySlideBuilder
(app: sphinx.application.Sphinx)[source]¶ This is the standard Directory Slide HTML builder.
Its output is a directory with HTML files, where each file is called
index.html
and placed in a subdirectory named like its page name. For example, the documentmarkup/rest.rst
will not result in an output filemarkup/rest.html
, butmarkup/rest/index.html
. When generating links between pages, theindex.html
is omitted, so that the URL would look likemarkup/rest/
.The output directry will include any needed style sheets, slide table, and presenter’s console JavaScript.
Its name is
dirslides
.
-
class
hieroglyph.builder.
SingleFileSlideBuilder
(app: sphinx.application.Sphinx)[source]¶ This is the single file Slide HTML builder.
Its output is a directory with a single HTML file, along with the needed style sheets and JavaScript.
Its name is
singlefile-slides
.
-
class
hieroglyph.builder.
InlineSlideBuilder
(*args, **kwargs)[source]¶ This is the Inline Slide HTML builder.
The inline slide builder add support for the
slide
directive to Sphinx’sStandaloneHTMLBuilder
, and adds an additional stylesheet to the output for basic inline display.When using an inline builder
autoslides
is disabled.Its name is
inlineslides
.New in version 0.5.
-
class
hieroglyph.builder.
DirectoryInlineSlideBuilder
(*args, **kwargs)[source]¶ This is the Inline Slide Directory HTML builder.
The inline slide builder add support for the
slide
directive to Sphinx’sDirectoryHTMLBuilder
, and adds an additional stylesheet to the output for basic inline display.When using an inline builder
autoslides
is disabled.Its name is
dirinlineslides
.New in version 0.5.
Abstract Builders¶
Hieroglyph also defines two abstract builders. These classes are not capable of building slides on their own, but encapsulate most of the slide-specific functionality.