Commit 2f8655f
committed
Allow maps to appear at any directory level
Before this change, the root `content/_index.md` file would always
render using `layouts/index.html` (which hard-coded the ability to
render maps), and it was not possible to render maps anywhere else.
Instead, make map rendering details a partial which can be invoked from
anywhere, and wire up a `map` layout that can be opted into with
`layout = "map"` in frontmatter. `layouts/index.html` also calls this
same partial, so they behave the same - we're just hard-coding that the
root layout should always be a map layout, just like any other map
layout can be.
Also, un-set the root Piscine layout - it's ignored, hugo always uses
`layouts/index.html` for the root layout, so stop pretending it uses a
module layout (which, incidentally, it doesn't).1 parent ce20333 commit 2f8655f
File tree
4 files changed
+30
-27
lines changed- common-theme/layouts
- _default
- partials
- org-cyf-piscine/content
4 files changed
+30
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 2 | + | |
28 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
0 commit comments