initial setup. make pages work, basic layouts, config, markdown blog
This commit is contained in:
parent
6979f11d92
commit
af0f3e6268
13 changed files with 438 additions and 12 deletions
66
content/layouts/base.njk
Normal file
66
content/layouts/base.njk
Normal file
|
@ -0,0 +1,66 @@
|
|||
---js
|
||||
{
|
||||
nav: [
|
||||
{title: "Mastodon", url: "https://dook.business/@RikSolo"},
|
||||
{title: "Instagram", url: "https://instagram.com/rikberkelder"}
|
||||
]
|
||||
}
|
||||
---
|
||||
|
||||
{% macro navItem(title, url, hyphen, target='_self') %}
|
||||
<span>
|
||||
<a href="{{url}}" target="{{target}}">{{title}}</a>
|
||||
{% if hyphen %} - {% endif %}
|
||||
</span>
|
||||
{% endmacro %}
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="language" content="English" />
|
||||
<meta name="google-site-verification" content="x17arJy33V33DYnmMYybZciXngFd8R8xn1UZRdp7qxo" />
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css">
|
||||
|
||||
<title>{% if title %}{{title}} | {% endif %}Rik Berkelder</title>
|
||||
|
||||
<style>
|
||||
/* Specify in CSS */
|
||||
body {
|
||||
font-family: 'Fira Code', monospace;
|
||||
}
|
||||
|
||||
@supports (font-variation-settings: normal) {
|
||||
body {
|
||||
font-family: 'Fira Code VF', monospace;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
{% for ni in collections.page %}
|
||||
{{navItem(ni.data.title, ni.data.permalink, not loop.last )}}
|
||||
{% endfor %}
|
||||
<span> | </span>
|
||||
{% for ni in nav %}
|
||||
{{navItem(ni.title, ni.url, not loop.last , '_blank')}}
|
||||
{% endfor %}
|
||||
<span> | </span>
|
||||
{{navItem("RBLicht", "https://rblicht.nl", true, '_blank')}}
|
||||
{{navItem("RBSolutions", "https://rbsolutions.cc", false, '_blank')}}
|
||||
|
||||
</div>
|
||||
{{content | safe}}
|
||||
|
||||
<script src="//instant.page/5.2.0" type="module"
|
||||
integrity="sha384-jnZyxPjiipYXnSU0ygqeac2q7CVYMbh84q0uHVRRxEtvFPiQYbXWUorga2aqZJ0z"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
8
content/layouts/blogpost.njk
Normal file
8
content/layouts/blogpost.njk
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
layout: 'base.njk'
|
||||
---
|
||||
|
||||
<h1>{{title}}</h1>
|
||||
<small>{{date}} {% if modified !== date %}(Last modified: {{modified}}){% endif %}</small> </br>
|
||||
<a href="/blog/"><- Back to posts list</a>
|
||||
{{content | safe}}
|
Loading…
Add table
Add a link
Reference in a new issue