Skip to main content

Create Foliant projects from templates.

Project description

Project Initializer for Foliant

This CLI extension add init command that lets you create Foliant projects from templates.


$ pip install foliantcontrib.init


Create project from the default “base” template:

$ foliant init
Enter the project name: Awesome Docs
✔ Generating Foliant project
Project "Awesome Docs" created in awesome-docs

Create project from a custom template:

$ foliant init --template /path/to/custom/template
Enter the project name: Awesome Customized Docs
✔ Generating Foliant project
Project "Awesome Customized Docs" created in awesome-customized-docs

You can provide the project name without user prompt:

$ foliant init --name Awesome Docs
✔ Generating Foliant project
Project "Awesome Docs" created in awesome-docs

Another useful option is --quiet, which hides all output except for the path to the generated project:

$ foliant init --name Awesome Docs --quiet

To see all available options, run foliant init --help:

$ foliant init --help
usage: foliant init [-h] [-n NAME] [-t NAME or PATH] [-q]

Generate new Foliant project.

optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of the Foliant project
  -t NAME or PATH, --template NAME or PATH
                        Name of a built-in project template or path to custom one
  -q, --quiet           Hide all output accept for the result. Useful for piping.

Project Templates

A project template is a regular Foliant project but containing placeholders in files. When the project is generated, the placeholders are replaced with the values you provide. Currently, there are two placeholders: $title and $slug.

There is a built-in template called base. It's used by default if no template is specified.

Project details

Download files

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

Files for foliantcontrib.init, version 1.0.8
Filename, size File type Python version Upload date Hashes
Filename, size foliantcontrib.init-1.0.8-py3-none-any.whl (6.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size foliantcontrib.init-1.0.8.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page