Skip to content

Commit 6fedf4e

Browse files
committed
📚 DOCS: Note abs vs rel paths
1 parent ced2280 commit 6fedf4e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎docs/index.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ For example, to use external files:
7575

7676
```restructuredtext
7777
.. timeline::
78-
:events: events.yaml
79-
:template: template.txt
78+
:events: /path/to/events.yaml
79+
:template: /path/to/template.txt
8080
```
8181

82+
If a path starts with `/`, then it is relative to the Sphinx source directory, otherwise it is relative to the current document.
83+
8284
## Jinja templates
8385

8486
The template is a [Jinja2](https://jinja.palletsprojects.com) template, which is rendered for each event.
@@ -129,12 +131,14 @@ The event dictionary is available as the `e` variable, and the following additio
129131

130132
events
131133
: Path to the timeline data file, otherwise the data is read from the content.
134+
If the path starts with `/`, then it is relative to the Sphinx source directory, otherwise it is relative to the current document.
132135

133136
events-format
134137
: The format of the events. Can be `json`, `yaml`, or `csv`. Defaults to `yaml`.
135138

136139
template
137140
: Path to the template file, otherwise the template is read from the content.
141+
If the path starts with `/`, then it is relative to the Sphinx source directory, otherwise it is relative to the current document.
138142

139143
max-items
140144
: The maximum number of items to show. Defaults to all.

0 commit comments

Comments
 (0)