30 |
31 | {% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
32 | {% include ".icons/" ~ icon ~ ".svg" %}
33 |
34 |
35 | {{ config.main_repo_name }}
36 |
37 |
--------------------------------------------------------------------------------
/mkdocs.yml:
--------------------------------------------------------------------------------
1 | # main repo will be displayed in the header
2 | main_repo_name: foliant-docs/foliant
3 | main_repo_url: https://github.com/foliant-docs/foliant
4 |
5 | repo_name: foliant-docs/docs
6 | repo_url: https://github.com/foliant-docs/docs
7 | edit_uri: edit/master/src/
8 | theme:
9 | name: material
10 | custom_dir: !path ./theme/
11 | palette:
12 | - scheme: default
13 | primary: "rgba(0, 0, 0, 0.87)"
14 | accent: light blue
15 | toggle:
16 | icon: material/weather-night
17 | name: Switch to dark mode
18 | - scheme: slate
19 | toggle:
20 | icon: material/weather-sunny
21 | name: Switch to light mode
22 | font:
23 | text: PT Sans
24 | code: PT Mono
25 | logo: assets/images/octopus-white.svg
26 | favicon: assets/images/octopus-black-32.ico
27 | features:
28 | - search.suggest
29 | - search.highlight
30 | - navigation.top
31 | icon:
32 | repo: fontawesome/brands/github-alt
33 | features:
34 | - search.suggest
35 | - search.highlight
36 | - navigation.instant
37 | - navigation.top
38 |
39 |
40 | extra:
41 | social:
42 | - icon: fontawesome/brands/github
43 | link: https://github.com/foliant-docs/foliant
44 | - icon: fontawesome/regular/file-pdf
45 | link: /docs/assets/foliant-docs.pdf
46 | analytics:
47 | provider: google
48 | property: UA-120535275-2
49 | plugins:
50 | - tags:
51 | tags_file: tags.md
52 | - search:
53 | lang:
54 | - en
55 |
56 | markdown_extensions:
57 | - def_list
58 | - pymdownx.highlight
59 | - toc:
60 | permalink: true
61 | - admonition
62 | - pymdownx.details
63 | - pymdownx.superfences
64 | extra_css:
65 | - 'stylesheets/extra.css'
66 |
--------------------------------------------------------------------------------
/src/tutorials/preprocessor/intro.md:
--------------------------------------------------------------------------------
1 | ---
2 | tags:
3 | - tutorial
4 | - preprocessor
5 | ---
6 |
7 | # Introduction
8 |
9 | Creating preprocessors for Foliant is quite straightforward because they are essentially just Python scripts wrapped in a `Preprocessor` class, which is provided by Foliant core. In this tutorial, we will go through all steps of creating a new preprocessor.
10 |
11 | The full source code of the preprocessor created in this tutorial can be found [here](https://github.com/foliant-docs/preprocessor_tutorial).
12 |
13 | ---
14 |
15 | First of all, we need to decide what our preprocessor will do. Let's say you need a preprocessor that will generate some placeholder gibberish text for your documentation, somewhat like [Lorem Ipsum](https://lipsum.com/).
16 |
17 | We need a way to tell Foliant to insert the placeholder into a specific part of our document. The Foliant way of doing that is using an XML-tag like the following.
18 |
19 | ```html
20 |