You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guide/docs/docs.md
+32-5Lines changed: 32 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,12 @@
3
3
The Data Hub allows you to create generic documentation pages below the *Docs* section in the navigation.
4
4
For this create [Markdown files](https://www.markdownguide.org/basic-syntax/) inside the `./docs/` folder of your project.
5
5
6
-
The File `Home.md` inside this folder is used to display the home page of your Data Hub. Other than that you free to create any and as many files as needed. The navigation shows the up to one folder depth.
6
+
The File `Home.md` inside this folder is used to display the home page of your Data Hub. Other than that you free to create any and as many files as needed. The navigation shows files up to one folder depth.
7
7
8
-
- To **sort** the items in the navigation you can prepend a prefix to filename like this `10_*`, `20_*`, … This prefix will not show in the navigation item name.
8
+
- To **sort** the items in the navigation you can prepend a prefix to the filename like this `10_*`, `20_*`, … This prefix will not show in the navigation item name.
9
9
- For **translating** pages you can create files with the same name but an additional suffix consisting of the language code, i.e., if `Project.md` contains the English variant, `Project.de.md` contains the German one. English is expected to be the default language.
10
10
11
-
Additionally, you can add a front matter, a YAML based configuration between `---`separators at the beginning of your Markdown files consisting of further attributes of the files. This can be used to change the display name of an entry, i.e., for translated pages that should not have the file (English) name as navigation entry use this:
11
+
Additionally, you can add a front matter, a YAML based configuration before a `---`separator at the beginning of your Markdown files consisting of further attributes of the files. This can be used to change the display name of an entry, i.e., for translated pages that should not have the filename (English) as navigation link:
12
12
13
13
14
14
```md [Project.de.md]
@@ -21,13 +21,40 @@ title: Projekt
21
21
Lorem…
22
22
```
23
23
24
-
## Images
24
+
## Links
25
25
26
-
You can add images to your documentation, the files need to be placed inside the folder `./docs/images/`. Inside the Markdown files include them with ``. For example the image at `./docs/images/example.png` would be included by ``.
26
+
Besides the standard way of creating links in markdown (`[<text>](<url>)`), you can also link to parts of the Data Hub.
27
+
28
+
To link to other markdown pages inside the `docs/`folder use the filepath form the `docs/` folder, i.e., `[other page](./10_Other page.md)` (the path needs to originate in `docs/`).
29
+
30
+
To link to Shapes, Shape types and Data Layers you can use the following syntax. If you leave the text empty it will be automatically set to the name of the object.
31
+
32
+
- Shapes: `[](shape_key=<key>)`
33
+
- Shape type: `[](type_key=<key>)`
34
+
- Data Layer: `[](datalayer_key=<key>)`
35
+
36
+
Additionally you can also use the Django Template URL tag like this: `[]({% url "<app>:<name>" [parameters] %})`
37
+
38
+
## Images & files
39
+
40
+
To insert images in a document you can use the standard Markdown syntax for images ``. The path should originate form `docs/`, i.e., ` to include the image saved at `docs/image.png`.
41
+
42
+
If you need more complex markup in an HTML `<img>` you can use the `{% file "<path>" %}` Django Template tag like this:
The path again needs to originate from inside the `docs/` folder.
49
+
50
+
This can also be used inside links to, i.e. link to files: `[PDF file]({% file './infos.pdf' %})`.
27
51
28
52
29
53
## Variables
30
54
31
55
The Markdown content gets processed by the Django Template Engine beforehand. So you can also use variables and template tags available from the Django framework. The variables names need to be put between double curly braces like this <codev-pre>{{ var_name }}</code>.
0 commit comments