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>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en" prefix="og: https://ogp.me/ns#">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
{% include "_og.njk" %}
|
||||||
<title>{{ title }} - mestizo.monster</title>
|
<title>{{ title }} - mestizo.monster</title>
|
||||||
<link href="/css/main.css" rel="stylesheet" />
|
<link href="/css/main.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% include "_header.njk" %}
|
{% include "_header.njk" %}
|
||||||
<main>{{ content | safe }}</main>
|
{{ content | safe }}
|
||||||
{% include "_footer.njk" %}
|
{% include "_footer.njk" %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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,6 +2,11 @@
|
||||||
layout: base.njk
|
layout: base.njk
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<nav><a href="/">home</a> > <a href="{{ page.url }}">{{ title }}</a></nav>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<main>
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
<ul>
|
<ul>
|
||||||
{%- for post in ( collections.post | sortByDate ) -%}
|
{%- for post in ( collections.post | sortByDate ) -%}
|
||||||
|
|
@ -12,3 +17,4 @@ layout: base.njk
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
</main>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,16 @@
|
||||||
layout: base.njk
|
layout: base.njk
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{% 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>
|
<article>
|
||||||
<hgroup>
|
<hgroup>
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
|
|
@ -13,4 +23,23 @@ layout: base.njk
|
||||||
</ul>
|
</ul>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
<section>{{ content | safe }}</section>
|
<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>
|
</article>
|
||||||
|
</main>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
title: "about"
|
title: "about"
|
||||||
layout: base.njk
|
layout: main.njk
|
||||||
images: ["about/taco.png"]
|
|
||||||
description: "but who is taco? and how much does it weigh?"
|
description: "but who is taco? and how much does it weigh?"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ a:visited {
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
background-color: var(--color-dark-brown);
|
background-color: var(--color-dark-brown);
|
||||||
|
color: var(--color-gray);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
|
|
@ -90,7 +91,7 @@ a:visited {
|
||||||
footer {
|
footer {
|
||||||
p {
|
p {
|
||||||
font-size: 1.1em;
|
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 {
|
article {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
hgroup {
|
hgroup {
|
||||||
|
|
@ -75,7 +83,23 @@ article {
|
||||||
text-align: justify;
|
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 {
|
blockquote {
|
||||||
margin: 1em;
|
margin: 1em;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
|
|
||||||
2
index.md
2
index.md
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
title: "home"
|
title: "home"
|
||||||
layout: base.njk
|
layout: main.njk
|
||||||
description: "words by taco, the mestizo monster."
|
description: "words by taco, the mestizo monster."
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ keywords:
|
||||||
"life",
|
"life",
|
||||||
"technology",
|
"technology",
|
||||||
]
|
]
|
||||||
|
section: technology
|
||||||
images: ["posts/moving-on-from-freenom/header.png"]
|
images: ["posts/moving-on-from-freenom/header.png"]
|
||||||
description: "what's the harm in a free domain name?"
|
description: "what's the harm in a free domain name?"
|
||||||
aliases: ["../2023/10/06/moving-on-from-freenom/"]
|
aliases: ["../2023/10/06/moving-on-from-freenom/"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue