Skip to content

Content editing

Thorsten Marx ㋡ edited this page Oct 31, 2023 · 13 revisions

Content file format

Content Files contains to areas. The header or metadata and the content area.

Example content file

---
title: Startpage
description: "header is in yaml"
template: start.html
---

Here comes the content of your page, formatted with markdown

Header

Menu options

If you use the navigationFunction to build the menu of your site, there are some options to influence the menu entry for a node.

menu:
    title: The Blog
    position: 100
    visible: false

Sections

Whenever you need to provide more complex content on a page, sections come in handy. Sections are just like simple content pages, but are not found via the nodeListFunction or navigationFunction, but are assigned to a page. You can have multiple content files for the same section. Each section can have its own rendering template.

Naming convention

Assume you content page is names: index.md

Your sections must be named as follows: index.<section_name>.md
for example: index.content.md

If your sections must be in a specific order, use this naming: index.<section_name>..md
for example: index.content.1.md and index.content.2.md

Accessing sections in template code

<div class="container" th:if="${sections.containsKey('part')}">
	<th:block th:each="part : ${sections.get('part')}">
		<th:block th:utext="${part.content}"></th:block>
	</th:block>
</div>
Clone this wiki locally