Initial commit

This commit is contained in:
Wiktor Zykubek 2024-12-22 01:06:27 +01:00
commit 6ec238ef42
No known key found for this signature in database
27 changed files with 806 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
public/
*.lock

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

5
archetypes/default.md Normal file
View File

@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++

183
assets/css/main.css Normal file
View File

@ -0,0 +1,183 @@
@import url("https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");
body {
background-color: var(--base);
color: var(--text);
font-family: "Funnel Display", sans-serif;
line-height: 1.5;
margin: auto;
max-width: 768px;
}
@media only screen and (max-width: 810px) {
body {
max-width: 90vw;
}
.hidden-on-mobile {
display: none;
}
}
header {
border-bottom: 1px solid var(--highlightLow);
margin-bottom: 1rem;
}
nav > ul {
margin: 0;
padding: 0;
}
nav > ul > li {
display: inline;
list-style: none;
margin-right: 10px;
}
ul {
padding-left: 15px;
}
.flex-space-between {
display: flex;
justify-content: space-between;
}
time {
font-size: 14px;
color: var(--muted);
}
footer {
border-top: 1px solid var(--highlightLow);
margin-top: 1rem;
color: var(--muted);
}
p {
text-align: justify;
font-size: 15px;
}
/* */
:is(h1, h2, h3, h4, h5) {
color: var(--gold);
}
:is(h1, h2, h3, h4, h5) > a {
color: var(--pine);
}
h1 > a {
color: var(--love);
}
a {
color: var(--love);
text-decoration: none;
font-weight: bold;
}
a:hover {
color: var(--rose);
text-decoration: underline;
transition: 0.3s;
}
:is(h1, h2, h3, h4, h5, h6)::before {
content: "#";
color: var(--muted);
margin-right: 10px;
}
header > h1::after {
content: "_";
color: var(--muted);
animation: blink-animation 1.5s steps(5, start) infinite;
-webkit-animation: blink-animation 1.5s steps(5, start) infinite;
}
@keyframes blink-animation {
to {
visibility: hidden;
}
}
@-webkit-keyframes blink-animation {
to {
visibility: hidden;
}
}
.inline-heading {
display: inline;
margin-left: 10px;
}
blockquote {
border-left: 5px solid var(--rose);
border-radius: 3px;
margin: 0px;
background-color: var(--surface);
}
blockquote > p {
margin-left: 10px;
padding: 3px;
}
pre,
code {
background-color: var(--overlay) !important;
font-family: "Roboto Mono", monospace;
font-size: 14px;
border-radius: 3px;
}
pre {
padding: 10px 16px;
overflow: auto;
}
code {
color: var(--gold);
padding: 0px 3px;
}
pre > code {
padding: 0;
}
code > span {
color: var(--iris);
}
table {
margin: auto;
width: 100%;
}
th,
td {
padding: 5px 10px;
}
th {
/*min-width: 180px;*/
background-color: var(--overlay);
text-align: center !important;
}
tr {
max-width: 500px;
}
tr:nth-child(odd) {
background-color: var(--highlightHigh);
}
tr:nth-child(even) {
background-color: var(--highlightMed);
}

View File

@ -0,0 +1,17 @@
* {
--base: #faf4ed;
--surface: #fffaf3;
--overlay: #f2e9e1;
--muted: #9893a5;
--subtle: #797593;
--text: #575279;
--love: #b4637a;
--gold: #ea9d34;
--rose: #d7827e;
--pine: #286983;
--foam: #56949f;
--iris: #907aa9;
--highlightLow: #f4ede8;
--highlightMed: #dfdad9;
--highlightHigh: #cecacd;
}

View File

@ -0,0 +1,17 @@
* {
--base: #191724;
--surface: #1f1d2e;
--overlay: #26233a;
--muted: #6e6a86;
--subtle: #908caa;
--text: #e0def4;
--love: #eb6f92;
--gold: #f6c177;
--rose: #ebbcba;
--pine: #31748f;
--foam: #9ccfd8;
--iris: #c4a7e7;
--highlightLow: #21202e;
--highlightMed: #403d52;
--highlightHigh: #524f67;
}

View File

@ -0,0 +1,17 @@
* {
--base: #232136;
--surface: #2a273f;
--overlay: #393552;
--muted: #6e6a86;
--subtle: #908caa;
--text: #e0def4;
--love: #eb6f92;
--gold: #f6c177;
--rose: #ea9a97;
--pine: #3e8fb0;
--foam: #9ccfd8;
--iris: #c4a7e7;
--highlightLow: #2a283e;
--highlightMed: #44415a;
--highlightHigh: #56526e;
}

1
assets/js/main.js Normal file
View File

@ -0,0 +1 @@
console.log('This site was generated by Hugo.');

15
content/en/_index.md Normal file
View File

@ -0,0 +1,15 @@
+++
title = 'Home'
date = 2023-01-01T08:00:00-07:00
draft = false
+++
_Hello World!_ :wave: I'm **Wiktor** - computer science freak. I love everything about computers, but especially free software, Linux and servers, software development, [music production](https://lugnx.xyz), graphics... Oh, that's a lot, but I didn't even named a half of the things. I don't have enough time in my life to do everything I want to do, but on this website I will share all kind of content for which I found some time and put enough effort.
Find me on
[Gitea](https://git.brono.cloud/wzykubek),
[GitHub](https://github.com/wzykubek),
[Telegram](https://t.me/wzykubek),
[RSS](blog/index.xml)
or
[e-mail](mailto:contact@wzykubek.xyz).

View File

@ -0,0 +1,5 @@
+++
title = 'Blog'
date = '2024-11-23T13:39:35+01:00'
draft = false
+++

View File

@ -0,0 +1,182 @@
+++
date = '2024-11-23T13:39:35+01:00'
draft = false
title = 'Installing Arch Linux with Btrfs, LUKS encryption and YubiKey Authentication'
+++
In this tutorial I will show you how to use your YubiKey with LUKS. In this case we will use our key to shorten encryption password. Person, who will get access to your machine but without key, will be prompted for very long, computer generated password. On the other hand - _you_ - will be prompted only for the PIN for your attached YubiKey. Of course your PIN also should be as long and complicated as possible, but you should be able to memorize it.
## My setup
I will use following configuration:
+ Two partitions: one for EFI system partition, second one for root with Btrfs filesystem. This will allow us creating volumes for directories like `/home` and `/var` with no need to use [LVM](https://en.wikipedia.org/wiki/Logical_volume_management).
+ systemd-boot as a bootloader. This is only my preference, on my main desktop I use rEFInd, but systemd-boot is simpler to configure and is bundled with systemd and that is crucial for me. I perform all procedure on my Chromebook with 16 GB eMMC memory.
+ Encrypted root partition with LUKS which can be unlocked using YubiKey or any other hardware token which support FIDO2 HMAC Secret extension. You can add spare key as well. For critical situation we have also secure (128 characters) password for recovery.
## Prerequisites
+ USB stick with fresh [Arch Linux Live ISO](https://archlinux.org/download/).
Latest ISO should have all the tools we will use so you don't need to install anything additional.
+ Follow official [installation guide](https://wiki.archlinux.org/title/Installation_guide), but use this tutorial in important moments.
## Destroy disk
Wipe disk before encryption.
```bash
cryptsetup open --type plain --key-file /dev/urandom --sector-size 4096 /dev/sda wipeit
```
```bash
dd if=/dev/zero of=/dev/mapper/wipeit status=progress bs=1M
```
```bash
cryptsetup close wipeit
```
## Partitioning
Create only two partitions. One for ESP and one for filesystem. To simplify next steps I will use the following template.
| Partition | Target |
| :-------- | :--------------------- |
| /dev/sda1 | Boot partition |
| /dev/sda2 | Filesystem partition |
Format boot partition using following command.
```bash
mkfs -t fat -F32 /dev/sda1
```
Format second partition as a LUKS volume. This command will prompt you for passphrase. Generate it with your password manager (e.g. Bitwarden) using random characters. I recommend using 128 characters. You will not use it to unlock your drive, it will be only your recovery option in case you loose your YubiKey. This is probably the most painful step, because you need to type this passphrase few times but it is worth it to keep it secure.
```bash
cryptsetup -v luksFormat /dev/sda2
```
Decrypt and open volume (you need to enter password).
```bash
cryptsetup open /dev/sda2 root
```
## Adding YubiKey(s)
Connect only one key at once and run command bellow, enter passphrase and touch your key two times. It won't display anything after password, so you need to remember.
```bash
systemd-cryptenroll --fido2-device=auto --fido2-with-client-pin=true --fido2-with-user-presence=true /dev/sda2
```
If you have spare key, disconnect first one, connect second and run exact same command again.
You can verify if everything is addedd correctly using command bellow.
```bash
cryptsetup luksDump /dev/sda2
```
You should see 3 entries in Keyslots category and two in Tokens.
## Create filesystem on encrypted volume
Create filesystem.
```bash
mkfs -t btrfs /dev/mapper/root
```
Mount mapper.
```bash
mount /dev/mapper/root /mnt
```
Create Btrfs subvolumes.
```bash
btrfs subvolume create /mnt/@
```
```bash
btrfs subvolume create /mnt/@home
```
```bash
btrfs subvolume create /mnt/@var
```
Remount volumes.
```bash
umount /mnt
```
```bash
mount /dev/sda1 --mkdir /mnt/boot
```
```bash
mount /dev/mapper/root -o subvol=@ /mnt
```
```bash
mount /dev/mapper/root -o subvol=@home --mkdir /mnt/home
```
```bash
mount /dev/mapper/root -o subvol=@var --mkdir /mnt/var
```
## Initramfs
Follow next steps of the official guideline, enter chroot and stop at the moment. We need to configure and recreate initramfs image.
Edit `/etc/mkinitcpio.conf`. You need to configure `HOOKS` and `BINARIES` section to contain following items.
> Note: You will need to install `libfido2` on your new system.
```
BINARIES=(/usr/lib/libfido2.so.1)
HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)
```
## Bootloader
In this tutorial I will use systemd-boot. We need to install bootloader on ESP and add some options to decrypt drive on boot.
Install bootloader.
```bash
bootctl install
```
Edit `/boot/loader/loader.conf` and add this line at the beggining:
```
default arch.conf
```
Now create `/boot/loader/entries/arch.conf` with following content. I use Linux Zen kernel but if you use stable one just remove `-zen` from entries.
```
title Arch Linux
linux /vmlinuz-linux-zen
initrd /initramfs-linux-zen.img
options rd.luks.name=YOUR_UUID=root root=/dev/mapper/root rootflags=subvol=@ rw
```
Replace _YOUR_UUID_ with actual UUID of `/dev/sda2`. You can get it from `blkid /dev/sda2` command.
## Final thoughts
You can also setup [Plymouth](https://wiki.archlinux.org/title/Plymouth) to get nice and colorful password or PIN prompt instead of terminal window.
<!--### Additional links-->
<!--[https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#LUKS_on_a_partition](https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#LUKS_on_a_partition)-->
<!--[https://wiki.archlinux.org/title/Dm-crypt/Drive_preparation#dm-crypt_wipe_on_an_empty_device_or_partition](https://wiki.archlinux.org/title/Dm-crypt/Drive_preparation#dm-crypt_wipe_on_an_empty_device_or_partition)-->
<!--[https://wiki.archlinux.org/title/Dm-crypt/System_configuration](https://wiki.archlinux.org/title/Dm-crypt/System_configuration)-->
<!--[https://0pointer.net/blog/unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html](https://0pointer.net/blog/unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html)-->
<!---->

7
content/en/contact.md Normal file
View File

@ -0,0 +1,7 @@
+++
title = 'Contact'
date = '2024-11-23T13:39:35+01:00'
draft = false
+++
Simply, write me an [e-mail](mailto:contact@wzykubek.xyz).

82
hugo.yaml Normal file
View File

@ -0,0 +1,82 @@
baseURL: https://wzykubek.xyz
title: Wiktor Zykubek
copyright: Copyright © 2024 Wiktor Zykubek
defaultContentLanguage: en
defaultContentLanguageInSubdir: true
pluralizeListTitles: false
enableEmoji: true
languages:
en:
contentDir: content/en
disabled: false
languageCode: en
languageDirection: ltr
languageName: English
weight: 1
params:
subtitle: Personal website
menus:
main:
- name: Home
pageRef: /
weight: 10
- name: Blog
pageRef: /blog
weight: 20
- name: Projects
url: https://git.brono.cloud/wzykubek
weight: 30
- name: Music
url: https://lugnx.xyz
weight: 40
- name: Contact
pageRef: /contact
weight: 50
pl:
contentDir: content/pl
disabled: false
languageCode: pl
languageDirection: ltr
languageName: Polski
weight: 2
params:
subtitle: Moja strona
menus:
main:
- name: Strona Główna
pageRef: /
weight: 10
- name: Blog
pageRef: /blog
weight: 20
- name: Projekty
url: https://git.brono.cloud/wzykubek
weight: 30
- name: Muzyka
url: https://lugnx.xyz
weight: 40
- name: Kontakt
pageRef: /contact
weight: 50
params:
contact:
email: contact@wzykubek.xyz
author:
name: Wiktor Zykubek
email: contact@wzykubek.xyz
outputs:
home:
- html
section:
- html
- rss
module:
hugoVersion:
extended: false
min: 0.116.0

View File

@ -0,0 +1 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}"><a href="#{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</a></h{{ .Level }}>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
<header>
{{ partial "header.html" . }}
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
{{ partial "footer.html" . }}
</footer>
</body>
</html>

View File

@ -0,0 +1,14 @@
{{ define "main" }}
{{ .Content }}
{{ range site.Sections.ByWeight.Reverse }}
<h1><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h1>
{{ range first 3 .Pages }}
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
<h3><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3>
{{ end }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,11 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h3><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ .Summary }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,59 @@
{{- $authorEmail := "" }}
{{- with site.Params.author }}
{{- if reflect.IsMap . }}
{{- with .email }}
{{- $authorEmail = . }}
{{- end }}
{{- end }}
{{- end }}
{{- $authorName := "" }}
{{- with site.Params.author }}
{{- if reflect.IsMap . }}
{{- with .name }}
{{- $authorName = . }}
{{- end }}
{{- else }}
{{- $authorName = . }}
{{- end }}
{{- end }}
{{- $pctx := . }}
{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
{{- $pages := slice }}
{{- if or $.IsHome $.IsSection }}
{{- $pages = $pctx.RegularPages }}
{{- else }}
{{- $pages = $pctx.Pages }}
{{- end }}
{{- $limit := .Site.Config.Services.RSS.Limit }}
{{- if ge $limit 1 }}
{{- $pages = $pages | first $limit }}
{{- end }}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo</generator>
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{- range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | transform.XMLEscape | safeHTML }}</description>
</item>
{{- end }}
</channel>
</rss>

View File

@ -0,0 +1,9 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_medium" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ .Content }}
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }}

View File

@ -0,0 +1,11 @@
<p class="flex-space-between">
<span>{{ .Site.Copyright }}</span>
<span class='hidden-on-mobile'>
{{ if eq .Site.Language.LanguageCode "en" }}
Used <a href="https://rosepinetheme.com/">Rosé Pine</a> palette
{{ else if eq .Site.Language.LanguageCode "pl" }}
Wykorzystano paletę kolorów <a href="https://rosepinetheme.com/">Rosé Pine</a>
{{ end }}
</span>
</p>

View File

@ -0,0 +1,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ end }}

View File

@ -0,0 +1,14 @@
{{- with resources.Get "css/main.css" }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}
<!--Implement function to change theme-->
{{- with resources.Get "css/rose-pine-main.css" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- end }}

View File

@ -0,0 +1,12 @@
{{- with resources.Get "js/main.js" }}
{{- if eq hugo.Environment "development" }}
{{- with . | js.Build }}
<script src="{{ .RelPermalink }}"></script>
{{- end }}
{{- else }}
{{- $opts := dict "minify" true }}
{{- with . | js.Build $opts | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,22 @@
<h1>{{ site.Title }}</h1>
<div class='flex-space-between'>
<span>
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
</span>
<span>
{{ if .IsTranslated }}
{{ range .Translations }}
<a href="{{ .Permalink }}">
<span class='hidden-on-mobile'>
{{ .Site.Language.LanguageCode }}
</span>
{{ if eq .Site.Language.LanguageCode "en" }}
{{ ":gb:" | .RenderString }}
{{ else if eq .Site.Language.LanguageCode "pl" }}
{{ ":poland:" | .RenderString }}
{{ end }}
</a>
{{ end }}
{{ end }}
</span>
</div>

View File

@ -0,0 +1,51 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav>
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
</nav>
{{- end }}
{{- define "partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<li>
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
{{- end }}
{{- end }}

View File

@ -0,0 +1,23 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonomy.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
<div>{{ $label }}:</div>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB