sphinxnotes-fasthtml

Documentation Status Open Source License PyPI Package PyPI Package Downloads

Introduction

A Sphinx builder specialized for fast incremental HTML build.

Sphinx’s HTML builder does a lot of works to ensure document consistency (such as updating glob toctree, updating index, etc.) The fasthtml builder skips almost all operations that slow down the build and left only the necessary parts.

If you only want the document you modified to be updated, without paying attention to the consistency of other places, the fasthtml builder will be helpful to you.

Note

This extension relies on the internal implementation of HTML builder (StandaloneHTMLBuilder), it may not be compatible with older or future Sphinx versions.

So DO NOT report to Sphinx first if you suffered crash, please report to here 💬new instead.

Getting Started

Note

We assume you already have a Sphinx documentation, if not, see Getting Started with Sphinx.

First, downloading extension from PyPI:

$ pip install sphinxnotes-fasthtml

Then, add the extension name to extensions configuration item in your conf.py:

extensions = [
          # …
          'sphinxnotes.fasthtml',
          # …
          ]

Then you can run the fasthtml builder:

$ sphinx-build -b fasthtml <sourcedir> <outputdir>

For Makefile users, it is recommended to add the following lines to your Makefile, to share outputdir betweens the fasthtml builder and the builtin html builder:

# Without "make mode" we can specify OUTPUTDIR and DOCTREEDIR precisely
# so that we can make sure to share all output with the HTML builder.
fasthtml: Makefile
	@$(SPHINXBUILD) -b $@ "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) -d "$(BUILDDIR)/doctrees"

Then use make fasthtml to run the fast HTML build.

Contents

Contents

The Sphinx Notes Project

The project is developed by Shengyu Zhang, as part of The Sphinx Notes Project.

The Sphinx Notes Project