d3c3nt

[DORMANT] a fairly decent theme for the zola static site engine
git clone git://git.figbert.com/d3c3nt.git
Log | Files | Refs | README | LICENSE

commit 34e215ce5b5c6e967fc6229b15497a6907992b10
parent ddab2c232676266b6e9aca6b8471a1825791e434
Author: FIGBERT <figbert@figbert.com>
Date:   Wed, 26 Aug 2020 17:23:16 -0700

:sparkles: Add article Tera template

Diffstat:
Mconfig.toml | 1+
Atemplates/article.html | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/config.toml b/config.toml @@ -31,4 +31,5 @@ icon = "/icon.png" 404 = "/404.svg" twitter = "@therealFIGBERT" goatcounter = "figbert" +author = "FIGBERT" diff --git a/templates/article.html b/templates/article.html @@ -0,0 +1,63 @@ +{% extends "base.html" %} + +{% block posthead %} + <script type="application/ld+json"> + { + "@context": "https://schema.org", + "@type": "NewsArticle", + "mainEntityOfPage": { + "@type": "WebPage", + "@id": "https://google.com/article" + }, + "headline": "{{ page.title }}", + "image": [], + "datePublished": "{{ page.date | date(format="%+") }}", + "dateModified": "{{ page.date | date(format="%+") }}"{% if config.extra.author %}, + "author": { + "@type": "Person", + "name": "{{ config.extra.author }}" + }, + "publisher": { + "@type": "Organization", + "name": "{{ config.extra.author }}"{% if config.extra.icon %}, + "logo": { + "@type": "ImageObject", + "url": "{{ get_url(path=config.extra.icon) }}" + } + {% endif %} + } + {% endif %} + } + </script> + + <script type="application/ld+json"> + { + "@context": "https://schema.org", + "@type": "BreadcrumbList", + "itemListElement": [ + { + "@type": "ListItem", + "position": 1, + "name": "Blog", + "item": "{{ get_url(path="@/posts/_index.md") }}" + }, + { + "@type": "ListItem", + "position": 2, + "name": "{{ page.title }}", + "item": "{{ page.permalink }}" + } + ] + } + </script> +{% endblock %} + +{% block content %} + <div> + <h1>{{ page.title }}</h1> + <small>{{ page.date | date(format="%B %d, %Y") }}</small> + </div> + + <div>{{ page.content | safe }}</div> +{% endblock content %} +