From db348a3e2685bfc8c5a76ad20fd17ec81d7cecb1 Mon Sep 17 00:00:00 2001 From: bedroesb Date: Mon, 24 Jul 2023 13:51:06 +0200 Subject: [PATCH] add info about website sections --- pages/documentation/website_sections.md | 58 ++++++++++++++++++++++++- pages/example_pages/overview_tiles.md | 38 ---------------- 2 files changed, 57 insertions(+), 39 deletions(-) diff --git a/pages/documentation/website_sections.md b/pages/documentation/website_sections.md index 588aa539..f74fb975 100644 --- a/pages/documentation/website_sections.md +++ b/pages/documentation/website_sections.md @@ -2,6 +2,62 @@ title: Website sections --- -## +When content grows, the need to categorize grows. The theme makes it possible to categorize in the [sidebar](navigation_structures#sidebar), but also to list pages in a nice way that belong to the same section. +A section is simple a collection of pages of the same `type`, see [page mechanics](page_mechanics). Adding the pages you want to list in an overview, can be simply done by tagging them with a type (in the example `type: example_pages`) in the metadata and listing that type using the snippets below. + +## Section tiles with information +``` +{% raw %} +{% include section-navigation-tiles.html type="example_pages" affiliations=true search=true except="index.md" %} +{% endraw %} +``` + +Becomes: + +{% include section-navigation-tiles.html type="example_pages" affiliations=true search=true except="index.md" %} + +### Parameters + +* `affiliations`: Turn on filtering by affiliation (`true` or `false`) +* `search`: enable search in the tiles (`true` or `false`) +* `except`: `, ` separated list of page file names which should be excluded, including the file extension. +* `col`: give an integer to specify the number of columns/section cards per row. Default: 2. + + +## Section tiles simple + +``` +{% raw %} +{% include section-navigation-tiles-simple.html type="example_pages" %} +{% endraw %} +``` + + +{% include section-navigation-tiles-simple.html type="example_pages" %} + +### Parameters + +* `except`: `, ` separated list of page names which should be excluded, including the file extension. +* `col`: give an integer to specify the number of columns/section cards per row. Default: 2. + + + +## A more clever way of tagging pages with a certain type + +It is important to know that you can also set the these key-value pairs on multiple pages at the same time by specifying them in the `_config.yml` file as described in the [Jekyll documentation](https://jekyllrb.com/docs/configuration/front-matter-defaults/) using the frontmatter defaults. + +Example + +```yml +defaults: + - + scope: + path: "pages/data_life_cycle" + values: + type: data_life_cycle + +``` + +This will give all markdown files in the `pages/data_life_cycle` subdirectory the *data_life_cycle* type. \ No newline at end of file diff --git a/pages/example_pages/overview_tiles.md b/pages/example_pages/overview_tiles.md index 29b3d892..4e0e9b9d 100644 --- a/pages/example_pages/overview_tiles.md +++ b/pages/example_pages/overview_tiles.md @@ -1,41 +1,3 @@ --- title: Overview page example --- - -Nam non sollicitudin sapien. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Maecenas consectetur nulla nec rutrum rhoncus. Sed non urna sem. Maecenas sed lobortis urna, hendrerit aliquet massa. Phasellus felis dui, feugiat ut sapien vel, mattis dictum eros. Suspendisse in felis sit amet dui elementum rutrum tristique eget velit. Sed hendrerit, ante sit amet hendrerit cursus, ante nibh accumsan nibh, vitae rhoncus quam ipsum placerat ante. - -## Section tiles with information -``` -{% raw %} -{% include section-navigation-tiles.html type="example_pages" affiliations=true search=true except="index.md" %} -{% endraw %} -``` - -Becomes: - -{% include section-navigation-tiles.html type="example_pages" affiliations=true search=true except="index.md" %} - -### Parameters - -* `affiliations`: Turn on filtering by affiliation (`true` or `false`) -* `search`: enable search in the tiles (`true` or `false`) -* `except`: `, ` separated list of page file names which should be excluded, including the file extension. -* `col`: give an integer to specify the number of columns/section cards per row. Default: 2. - - -## Section tiles simple - -``` -{% raw %} -{% include section-navigation-tiles-simple.html type="example_pages" %} -{% endraw %} -``` - - -{% include section-navigation-tiles-simple.html type="example_pages" %} - -### Parameters - -* `except`: `, ` separated list of page names which should be excluded, including the file extension. -* `col`: give an integer to specify the number of columns/section cards per row. Default: 2. -