feat: use collections and add frontmatter

This commit is contained in:
sthag 2024-08-11 15:15:07 +02:00
parent c18ed30b74
commit da86b19aba
19 changed files with 117 additions and 136 deletions

View file

@ -1,9 +1,11 @@
---
permalink: "/"
title: Index
tags:
- index
---
<!-- index.screen -->
{% set pageBase = hippie.pageBase %}
{% set pageId = "index" %}
{% set pageId = page.fileSlug %}
{% set pageClass = "h_full_view" %}
{% extends "demo/_default.njk" %}
@ -14,6 +16,7 @@ permalink: "/"
{% endblock %}
{% block body %}
<!-- {{ page.fileSlug }}.page -->
<div class="wrap">
<div class="hello">
<h2>This is
@ -40,26 +43,26 @@ permalink: "/"
</div>
<nav>
<ul class="list_link">
{% for link in index %}
{% for link in collections.index %}
<li>
<a href="demo/{{ link.href }}">{{ link.text }}</a>
<a href="{{ link.page.url }}">{{ link.data.title }}</a>
</li>
{% endfor %}
</ul>
</nav>
<h3>Pages</h3>
<h3>Page</h3>
<ul class="list_link">
{% for link in pages %}
{% for link in collections.page | sort(false, false, 'data.title') %}
<li>
<a href="demo/{{ link.href }}">{{ link.text }}</a>
<a href="{{ link.page.url }}">{{ link.data.title }}</a>
</li>
{% endfor %}
</ul>
<h3>Demo</h3>
<h3>Example</h3>
<ul class="list_link">
{% for link in demo %}
{% for link in collections.example %}
<li>
<a href="demo/{{ link.href }}">{{ link.text }}</a>
<a href="{{ link.page.url }}">{{ link.data.title }}</a>
</li>
{% endfor %}
</ul>