File: README

package info (click to toggle)
mupdf 1.27.0%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 29,260 kB
  • sloc: ansic: 335,322; python: 20,906; java: 7,520; javascript: 2,213; makefile: 1,152; xml: 675; cpp: 639; sh: 513; cs: 307; awk: 10; sed: 7; lisp: 3
file content (48 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Building MuPDF Documentation

This documentation relies on
[Sphinx](https://www.sphinx-doc.org/en/master/)
to publish HTML docs from source files written with
[reStructuredText](https://docutils.sourceforge.io/rst.html)
and [Markdown](https://myst-parser.readthedocs.io/en/latest/intro.html).

## Installing Sphinx

This README assumes you have [installed Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html) on your system.

We recommend setting up a virtual environment:

	python -m venv .venv

Activate the environment by sourcing the activation script:

	source .venv/bin/activate

In this environment run pip to install Sphinx and all the required modules.

	pip install -r docs/requirements.txt

## Building HTML documentation

Within the virtual environment you can now build the documentation:

	sphinx-build docs build/docs

To do a fresh rebuild (in case files in the `_static` folder or the toc structure has changed):

	sphinx-build -E -a docs build/docs

## Live edit HTML documentation

You can use [Sphinx Autobuild](https://pypi.org/project/sphinx-autobuild/) to rebuild
the documentation on changes, with hot reloading in the browser.

	pip install sphinx-autobuild
	sphinx-autobuild --open-browser docs build/docs

## Using the Makefile targets

We also have makefile targets and helper scripts to perform the above tasks:

	make docs
	make docs-live