Skip to main content

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

Project description

PyPI Travis codecov

Foliant

Foliant is an all-in-one single-source documentation authoring tool. It lets you produce standalone documents in pdf and docx, build static websites and upload pages to Confluence, all from single Markdown source.

Foliant is a higher order tool, which means it uses other programs to do its job. For building pdf and docx, it can use Pandoc or md-to-pdf, for websites MkDocs, Aglio or Slate.

Foliant preprocessors let you reuse parts of your documents, show and hide content with flags, render diagrams from text, and much more.

Foliant is highly extensible, so if it lacks some functions or output formats you can always make a plugin for it or request one from our team.

Foliant Documentation website.

Installation

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

Quickstart

  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:

hello-foliant/
├── foliant.yml
└── src
    └── index.md

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 index.md).

  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 0.0.0.0 port 8000 (http://0.0.0.0: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

Important

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.13.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

foliant-1.0.13-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file foliant-1.0.13.tar.gz.

File metadata

  • Download URL: foliant-1.0.13.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.13.0-1029-azure

File hashes

Hashes for foliant-1.0.13.tar.gz
Algorithm Hash digest
SHA256 2f4e87775f556bfb85a14f4240f93ea805487ed911d33690e2348667758621d3
MD5 3bc421b7b1c1b18a1024276406d5a5e2
BLAKE2b-256 740c1969f5a038b7932da04417dc844180322d4aa2f396466d7f2492a85364c9

See more details on using hashes here.

File details

Details for the file foliant-1.0.13-py3-none-any.whl.

File metadata

  • Download URL: foliant-1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.13.0-1029-azure

File hashes

Hashes for foliant-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 b414d088971cc3564ce88861a7f7faedfae2579fb0ab68e242d1dc26b2e1f89a
MD5 1b2d9ad2d18a2439b834451cdd72f7c6
BLAKE2b-256 12c3722da677a7327360ff241016dfc1d26a910a965fb3787c2ca05a9ddc4d5c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page