Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
EpocDotFr committed May 15, 2024
1 parent 5fa9f19 commit 16b1167
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ After cloning/downloading the repo:
$ pip install .
```

A [CLI](cli.md) (`staticjinjaplus`) will be made available upon installation in any case.
A CLI ([`staticjinjaplus`](cli.md)) will be made available upon installation in any case.
30 changes: 28 additions & 2 deletions docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,32 @@ Return the file content of the given file, marked as safe to be rendered by Jinj

**Type:** List[Dict[str, Any]]

List of all valid template files (as seen by staticjinja) found in the `TEMPLATES_DIR` directory. Dictionary include
source filename, rendered template URL, file extension, and for Markdown (`.md`) files their parsed metadata.
List of all valid template files (as seen by staticjinja) found in the `TEMPLATES_DIR` directory. Dictionaries contained
in this list owns the following keys and values.

`source` (str)
: The template filename.

**Example:** `wow/about.html`

`type` (str)
: The type (file extension) of the template.

**Example:** `html`

`url` (str)
: The rendered template URL.

Setting `USE_HTML_EXTENSION` configuration value to `False` will remove the `.html` suffix, including for Markdown
templates output.

**Example:** `/wow/about.html`

`meta` (Dict[str, str])
: If `type` equals `md`: metadata parsed from the source Markdown file. Multiline values have been concatenated using
`\n` without extra spaces.

**Example:** `{'my-metadata': 'any value'}`

**Examples:**

Expand Down Expand Up @@ -163,6 +187,8 @@ values are detailed below.
`markdown.url` (str)
: The rendered Markdown template URL.

Setting `USE_HTML_EXTENSION` configuration value to `False` will remove the `.html` suffix.

**Example:** `/blog/my-article.html`

`markdown.meta` (Dict[str, str])
Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ nav:
markdown_extensions:
- codehilite:
use_pygments: true
- toc
- toc:
permalink: true
- smarty
- admonition
- footnotes
Expand Down

0 comments on commit 16b1167

Please sign in to comment.