Skip to main content

Modular, Markdown-based documentation generator that makes pdf, docx, html, and more.

Project description

PyPI Travis codecov


Foliant is a all-in-one documentation authoring tool. It lets you produce standalone documents in pdf and docx, as well as websites, from single Markdown source.

Foliant is a higher order tool, which means that it uses other programs to do its job. For pdf and docx, it uses Pandoc, for websites it uses MkDocs.

Foliant preprocessors let you include parts of documents in other documents, show and hide content with flags, render diagrams from text, and more.


Foliant is written in Python and requires Python 3.6.

To install Foliant, use pip:

$ pip install foliant

Backends, extensions, and preprocessors are installed with pip as well. For the Quickstart, you'll need the MkDocs backend and init CLI extension:

$ pip install foliantcontrib.mkdocs foliantcontrib.init

To build pdf and docx, install the Pandoc backend:

$ pip install foliantcontrib.pandoc


  1. Create a new project:
$ foliant init
Enter the project name: Hello Foliant
✓ Generating Foliant project
Project "Hello Foliant" created in /path/to/hello-foliant

This command creates a basic Foliant project:

├── foliant.yml
└── src

1 directory, 2 files

foliant.yml is the project config file, src is the directory that contains the project source files (initially, just one file

  1. Build a website from the newly created project:
$ foliant make site -p hello-foliant/
✓ Parsing config
✓ Applying preprocessor mkdocs
✓ Making site with MkDocs
Result: Hello_Foliant-0.1.0-2017-11-24.mkdocs
  1. Run a local webserver in the site directory and see the site in your browser:
$ cd Hello_Foliant-0.1.0-2017-11-24.mkdocs
$ python -m http.server
Serving HTTP on port 8000 ( ...
  1. Build a standalone pdf document from the project:
$ foliant make pdf -p hello-foliant/
✓ Parsing config
✓ Applying preprocessor mkdocs
✓ Making pdf with Pandoc
Result: Hello_Foliant-0.1.0-2017-11-24.pdf


To produce pdf, Pandoc first converts Markdown to tex and then coverts it to pdf. To convert pdf > from tex, you need to have a LaTeX distribution installed:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foliant-1.0.12.tar.gz (11.0 kB view hashes)

Uploaded source

Built Distribution

foliant-1.0.12-py3-none-any.whl (14.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page