-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the saga11 wiki! {#
aria-expanded="false" aria-expanded="true" tabindex="0"
aria-current="page"
aria-controls="nav-menu-ex-2" #}
{# ------------------------------------------------------ LISTING --------------------------------------------------------#}
{# Graps the menu from the settings config (set in _data/menu.json) #}
{% for item in menu.main %} {# if the menu url is part of this link ex /post/ for an item in /post/foobar #} {% if item.url in page.url -%} {{ item.title }} {% else %} {{ item.title }} {% endif %} {% endfor %} #}{# All pages #}
{% for item in collections.allPages | sortByOrder %} {% if item.url in page.url -%} {{item.data.title}} {% else %} {{item.data.title}} {% endif %} {% endfor %}{# All post #}
{% for item in collections.allPosts %} {% if item.url in page.url -%} {{item.data.title}} {% else %} {{item.data.title}} {% endif %} {% endfor %}{# Previous - Next #}
{%- if collections.allPosts %} {%- set nextPost = collections.allPosts | getNextCollectionItem(page) %} {%- set previousPost = collections.allPosts | getPreviousCollectionItem(page) %} {%- if nextPost or previousPost %}{%- if previousPost %}
<a href="{{ previousPost.url | url }}">{{ previousPost.data.title }}</a>
{% endif %}
{%- if nextPost %}
<a href="{{ nextPost.url | url }}">{{ nextPost.data.title }}</a>
{% endif %}
{%- endif %} {%- endif %}
{# Tags #}
{%- for tag in tags | filterTagList -%} {# grap the markdown files from relation-tag and loop through them get page gets the permalink set in relation-tag.json#} {% for item in collections.all | getPage("/tags/" + tag + "/") %} {{ item.data.title}}, {% endfor %} {% endfor %}{# Section is set as a {{ section }} #}
{% if section %} {% for item in collections[section] %} {{item.data.title}}{{ item.data.teaser }}
{# ------------------------------------------------------ Images --------------------------------------------------------#} {# {% imageBackgroundStyle "image", “size”, “format webp/png/jpg/gif” %} #} {# size: [null] format [null] #} {% imageBackgroundStyle "assets/img/ident.png", “150” %}
{% image image, [320, 600, 1200], "(min-width: 30em) 50vw, 100vw", "a picture", "shadow-lg", "eager" %}
Default content template
---
title: my title
layout: base.njk
eleventyExcludeFromCollections: false
permalink: "mega-awesome-stuff/"
tags: post
date: Last Modified
eleventyNavigation:
key: contact
parent: about
order: 1
---
{{ page | dump}} {{ eleventy | dump }}