mirror of
https://git.tacowolf.net/TacoWolf/mestizo.monster.git
synced 2026-06-12 08:50:04 -04:00
feat(breadcrumbs): add to posts and other pages
This commit is contained in:
parent
ab2e16865d
commit
ab9618665e
10 changed files with 122 additions and 28 deletions
22
_includes/_og.njk
Normal file
22
_includes/_og.njk
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{% if tags == "post" %}
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="https://mestizo.monster/{{ url }}" />
|
||||
<meta property="article:author" content="https://mestizo.monster/about" />
|
||||
<meta property="article:section" content="{{ section }}" />
|
||||
{% for tag in keywords %}
|
||||
<meta property="article:tag" content="{{ tag }}" />
|
||||
{% endfor %}
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta property="og:title" content="{{ title }} - mestizo.monster" />
|
||||
<meta property="og:description" content="{{ description }}" />
|
||||
<meta property="og:image" content="https://mestizo.monster/img/taco.svg" />
|
||||
<meta property="og:image:alt" content="a vector image of a smiling cartoon taco." />
|
||||
{% else %}
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://mestizo.monster{{ page.url }}" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta property="og:title" content="{{ title }} - mestizo.monster" />
|
||||
<meta property="og:description" content="{{ description }}" />
|
||||
<meta property="og:image" content="https://mestizo.monster/img/taco.svg" />
|
||||
<meta property="og:image:alt" content="a vector image of a smiling cartoon taco." />
|
||||
{% endif %}
|
||||
|
|
@ -1,14 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="en" prefix="og: https://ogp.me/ns#">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
{% include "_og.njk" %}
|
||||
<title>{{ title }} - mestizo.monster</title>
|
||||
<link href="/css/main.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
{% include "_header.njk" %}
|
||||
<main>{{ content | safe }}</main>
|
||||
{{ content | safe }}
|
||||
{% include "_footer.njk" %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
11
_includes/main.njk
Normal file
11
_includes/main.njk
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
layout: base.njk
|
||||
---
|
||||
|
||||
{% if title != "home" %}
|
||||
<section>
|
||||
<nav><a href="/">home</a> > <a href="{{ page.url }}">{{ title }}</a></nav>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<main>{{ content | safe }}</main>
|
||||
|
|
@ -2,13 +2,19 @@
|
|||
layout: base.njk
|
||||
---
|
||||
|
||||
{{ content | safe }}
|
||||
<ul>
|
||||
{%- for post in ( collections.post | sortByDate ) -%}
|
||||
<li>
|
||||
<a href="{{ post.url }}">{{ post.data.date }} - {{ post.data.title }}</a>
|
||||
({{ post.content | readingTime }})<br />
|
||||
<em>{{ post.data.description }}</em>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
<section>
|
||||
<nav><a href="/">home</a> > <a href="{{ page.url }}">{{ title }}</a></nav>
|
||||
</section>
|
||||
|
||||
<main>
|
||||
{{ content | safe }}
|
||||
<ul>
|
||||
{%- for post in ( collections.post | sortByDate ) -%}
|
||||
<li>
|
||||
<a href="{{ post.url }}">{{ post.data.date }} - {{ post.data.title }}</a>
|
||||
({{ post.content | readingTime }})<br />
|
||||
<em>{{ post.data.description }}</em>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -2,15 +2,44 @@
|
|||
layout: base.njk
|
||||
---
|
||||
|
||||
<article>
|
||||
<hgroup>
|
||||
<h1>{{ title }}</h1>
|
||||
<p>{{ description }}</p>
|
||||
<ul>
|
||||
<li><strong>author:</strong> <a href="/about">daniel a. gallegos (taco)</a></li>
|
||||
<li><strong>reading time:</strong> about {{ content | readingTime }}</li>
|
||||
<li><strong>published:</strong> {{ date }}</li>
|
||||
</ul>
|
||||
</hgroup>
|
||||
<section>{{ content | safe }}</section>
|
||||
</article>
|
||||
{% set previousPost = collections.post | getPreviousCollectionItem %}
|
||||
{% set nextPost = collections.post | getNextCollectionItem %}
|
||||
|
||||
<section>
|
||||
<nav>
|
||||
<a href="/">home</a> > <a href="/posts">posts</a> > <a href="{{ page.url }}">{{ title }}</a>
|
||||
</nav>
|
||||
</section>
|
||||
|
||||
<main>
|
||||
<article>
|
||||
<hgroup>
|
||||
<h1>{{ title }}</h1>
|
||||
<p>{{ description }}</p>
|
||||
<ul>
|
||||
<li><strong>author:</strong> <a href="/about">daniel a. gallegos (taco)</a></li>
|
||||
<li><strong>reading time:</strong> about {{ content | readingTime }}</li>
|
||||
<li><strong>published:</strong> {{ date }}</li>
|
||||
</ul>
|
||||
</hgroup>
|
||||
<section>{{ content | safe }}</section>
|
||||
<nav>
|
||||
<ol>
|
||||
<li>
|
||||
previously... <br />{% if previousPost %}
|
||||
<a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a>
|
||||
{% else %}
|
||||
...not much.
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
...up next<br />{% if nextPost %}
|
||||
<a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a>
|
||||
{% else %}
|
||||
...who knows?
|
||||
{% endif %}
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</article>
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
title: "about"
|
||||
layout: base.njk
|
||||
images: ["about/taco.png"]
|
||||
layout: main.njk
|
||||
description: "but who is taco? and how much does it weigh?"
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ a:visited {
|
|||
|
||||
nav {
|
||||
background-color: var(--color-dark-brown);
|
||||
color: var(--color-gray);
|
||||
}
|
||||
|
||||
h1,
|
||||
|
|
@ -90,7 +91,7 @@ a:visited {
|
|||
footer {
|
||||
p {
|
||||
font-size: 1.1em;
|
||||
color: var(--color-dark-purple);
|
||||
color: var(--color-gray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,14 @@ article {
|
|||
}
|
||||
}
|
||||
|
||||
section {
|
||||
nav {
|
||||
margin-top: 1em;
|
||||
padding: 1em;
|
||||
border-radius: 0.42em;
|
||||
}
|
||||
}
|
||||
|
||||
article {
|
||||
padding: 0.5em;
|
||||
hgroup {
|
||||
|
|
@ -75,7 +83,23 @@ article {
|
|||
text-align: justify;
|
||||
}
|
||||
}
|
||||
nav {
|
||||
ol {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
li:first-of-type {
|
||||
text-align: left;
|
||||
}
|
||||
li:last-of-type {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 1em;
|
||||
padding: 1em;
|
||||
|
|
|
|||
2
index.md
2
index.md
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "home"
|
||||
layout: base.njk
|
||||
layout: main.njk
|
||||
description: "words by taco, the mestizo monster."
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ keywords:
|
|||
"life",
|
||||
"technology",
|
||||
]
|
||||
section: technology
|
||||
images: ["posts/moving-on-from-freenom/header.png"]
|
||||
description: "what's the harm in a free domain name?"
|
||||
aliases: ["../2023/10/06/moving-on-from-freenom/"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue