Skip to main content

Slate backend for Foliant documentation generator.

Project description

Slate Backend for Foliant

Slate backend generates API documentation from Markdown using Slate docs generator.

This backend operates two targets:

  • site — build a standalone website;
  • slate — generate a slate project out from your Foliant project.

Installation

$ pip install foliantcontrib.slate

Usage

Convert Foliant project to Slate:

$ foliant make slate
✔ Parsing config
✔ Applying preprocessor flatten
✔ Making slate
─────────────────────
Result: My_Project-2018-09-19.src/

Build a standalone website:

$ foliant make site
✔ Parsing config
✔ Applying preprocessor flatten
✔ Making site
─────────────────────
Result: My_Project-2018-09-19.slate/

Config

You don't have to put anything in the config to use Slate backend. If it is installed, Foliant detects it.

To customize the output, use options in backend_config.slate section:

backend_config:
  slate:
    shards_path: data/shards
    header:
        title: My API documentation
        language_tabs:
          - xml: Response example
        search: true

shards_path : Path to the shards directory relative to Foliant project dir. Shards allow you to customize Slate's layout, add scripts etc. More info on shards in the following section. Default: shards

header : Params to be copied into the beginning of Slate main Markdown file index.html.md. They allow you to change the title of the website, toggle search and add language tabs. More info in Slate Wiki.

About shards

Shards is just a folder with files which will be copied into the generated Slate project replacing all files in there. If you follow the Slate project structure you can replace stylesheets, scripts, images, layouts etc to customize the view of the resulting site.

For example, I want to customize standard Slate stylesheets. I look at the Slate repo and see that they lie in the folder <slate>/source/stylesheets. I create new stylesheets with the same names as the original ones and put them into my shards dir like that:

shards\
    source\
        stylesheets\
            _variables.scss
            screen.css.scss

These stylesheets will replace the original ones in the Slate project just before the website will be baked. So the page will use my styles in the end.

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

foliantcontrib.slate-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foliantcontrib.slate-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file foliantcontrib.slate-1.0.0.tar.gz.

File metadata

  • Download URL: foliantcontrib.slate-1.0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.14.2 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.1

File hashes

Hashes for foliantcontrib.slate-1.0.0.tar.gz
Algorithm Hash digest
SHA256 27eac0a8e49115d3b5e7d2783925cdf78e545ac424aeb6098f7c48bdfcaf07f1
MD5 ceb0cd9c60a36e37e2800cbd5d007c02
BLAKE2b-256 7d87cf8863085e7a3b1ce9c98e2f9ae80efc68ecce486fa897be254ae934f602

See more details on using hashes here.

File details

Details for the file foliantcontrib.slate-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: foliantcontrib.slate-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.14.2 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.1

File hashes

Hashes for foliantcontrib.slate-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cdfa5285d2095a80a2268d85a15cab983d619647f80dce6722ebf6f1e3b47bf
MD5 8294e114e41ffe97c5aefe22a7da4db0
BLAKE2b-256 70d7997fe49ff39966626be7ae80b3ed87e3ab15769c070eb1c3694dcf4216f8

See more details on using hashes here.

Supported by

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