diff --git a/hosts/demo/content/installation/index.md b/hosts/demo/content/installation/index.md index b464eaf5..f40994f0 100644 --- a/hosts/demo/content/installation/index.md +++ b/hosts/demo/content/installation/index.md @@ -47,7 +47,7 @@ Default markdown engine is _flexmark_. hostname: localhost template: engine: thymeleaf -markdownd: +markdown: engine: flexmark ``` diff --git a/hosts/demo/content/templating/index.md b/hosts/demo/content/templating/index.md index b4a85832..c4fa45e3 100644 --- a/hosts/demo/content/templating/index.md +++ b/hosts/demo/content/templating/index.md @@ -1,6 +1,6 @@ --- title: Templates & Engines -template: start.html +template: content.html menu: title: Templating position: 20 @@ -12,4 +12,6 @@ Aktuell kann zwischen folgenden TemplateEngines zur Verfügung. * [Thymeleaf](https://thymeleaf.org) * [Pebble](https://pebbletemplates.io/) -* [Apache Freemarker](https://freemarker.apache.org/) \ No newline at end of file +* [Apache Freemarker](https://freemarker.apache.org/) + +For information about configuration of template engien to be used see the [per host config](/installation#per-host-config) \ No newline at end of file diff --git a/hosts/demo/content/templating/index.part.01.md b/hosts/demo/content/templating/index.part.01.md new file mode 100644 index 00000000..a60da1ef --- /dev/null +++ b/hosts/demo/content/templating/index.part.01.md @@ -0,0 +1,17 @@ +--- +title: Navigation +template: content.part.html +--- + +Navigation is realy simple. + +```html + +``` \ No newline at end of file diff --git a/hosts/demo/content/templating/index.part.02.md b/hosts/demo/content/templating/index.part.02.md new file mode 100644 index 00000000..4109d353 --- /dev/null +++ b/hosts/demo/content/templating/index.part.02.md @@ -0,0 +1,35 @@ +--- +title: List of pages +template: content.part.html +--- + +Whenever you want to print out a list of pages, the nodeListFunction is a tiny little helper. +Keep in mind, that the nodelist function does not return the hole rendered HTML content but just an excerpt of 200 characters. + +```html + +
+ +

+

+ + goto +
+
+``` + +#### UseCase Blog +Assume, your project has the following content structure for the blog, with the defaults _page = 1_ and _pageSize = 5_ +``` +blog/ +---2023-09/ +------entry1.md +------entry2.md +---2023-10/ +------entry1.md +``` +This nodeList call will return all content nodes in all subfolders of the folder blog/ +```javascript +${nodeList.from("/blog/*").list()} +``` diff --git a/hosts/demo/templates/content.part.html b/hosts/demo/templates/content.part.html index 13397303..69d10932 100644 --- a/hosts/demo/templates/content.part.html +++ b/hosts/demo/templates/content.part.html @@ -2,6 +2,6 @@

- readmore +
\ No newline at end of file diff --git a/hosts/demo/templates/libs/header.html b/hosts/demo/templates/libs/header.html index ca569c85..ae9c0944 100644 --- a/hosts/demo/templates/libs/header.html +++ b/hosts/demo/templates/libs/header.html @@ -22,7 +22,7 @@