From a9625c62d73f3a2bdc639cea8aa786d6e452a0b1 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 22 Sep 2024 12:58:54 -0700 Subject: use a dedicated template for notes That way I can have a TOC and a few other things. --- content/notes/containerd-to-firecracker.md | 1 + content/notes/cpu-power-management.md | 1 + content/notes/making-sense-intel-amd-cpus.md | 1 + content/notes/stuff-about-pcie.md | 1 + content/notes/working-with-go.md | 1 + content/notes/working-with-nix.md | 1 + templates/note.html | 44 ++++++++++++++++++++++++++++ 7 files changed, 50 insertions(+) create mode 100644 templates/note.html diff --git a/content/notes/containerd-to-firecracker.md b/content/notes/containerd-to-firecracker.md index 9716735..4f822d8 100644 --- a/content/notes/containerd-to-firecracker.md +++ b/content/notes/containerd-to-firecracker.md @@ -1,6 +1,7 @@ --- title: containerd to firecracker date: 2021-05-15 +template: note.html --- fly.io had an [interesting diff --git a/content/notes/cpu-power-management.md b/content/notes/cpu-power-management.md index bbbd2e6..d7df15b 100644 --- a/content/notes/cpu-power-management.md +++ b/content/notes/cpu-power-management.md @@ -1,6 +1,7 @@ --- title: CPU power management date: 2023-01-22 +template: note.html --- ## Maximum power consumption of a processor diff --git a/content/notes/making-sense-intel-amd-cpus.md b/content/notes/making-sense-intel-amd-cpus.md index 75392c6..5cdd5e4 100644 --- a/content/notes/making-sense-intel-amd-cpus.md +++ b/content/notes/making-sense-intel-amd-cpus.md @@ -1,6 +1,7 @@ --- title: Making sense of Intel and AMD CPUs naming date: 2021-12-29 +template: note.html --- ## Intel diff --git a/content/notes/stuff-about-pcie.md b/content/notes/stuff-about-pcie.md index b540d24..3dbe24f 100644 --- a/content/notes/stuff-about-pcie.md +++ b/content/notes/stuff-about-pcie.md @@ -1,6 +1,7 @@ --- title: Stuff about PCIe date: 2022-01-03 +template: note.html --- ## Speed diff --git a/content/notes/working-with-go.md b/content/notes/working-with-go.md index 29f1737..574b23e 100644 --- a/content/notes/working-with-go.md +++ b/content/notes/working-with-go.md @@ -1,6 +1,7 @@ --- title: Working with Go date: 2021-08-05 +template: note.html --- _This document assumes go version \>= 1.16_. diff --git a/content/notes/working-with-nix.md b/content/notes/working-with-nix.md index 1f5da81..70d5fbb 100644 --- a/content/notes/working-with-nix.md +++ b/content/notes/working-with-nix.md @@ -1,6 +1,7 @@ --- title: working with nix date: 2022-05-10 +template: note.html --- ## the `nix develop` command diff --git a/templates/note.html b/templates/note.html new file mode 100644 index 0000000..1d85b62 --- /dev/null +++ b/templates/note.html @@ -0,0 +1,44 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }} - {{ config.title }}{% endblock title %} + +{% block content -%} +
+

{{ page.title }}

+ + {% if page.toc %} +
+ +
+
    + {% for h1 in page.toc %} +
  • + {{ h1.title }} + {% if h1.children %} + + {% endif %} +
  • + {% endfor %} +
+
+
+ {% endif %} + + {{ page.content | safe -}} +
+ + + +{%- endblock content %} -- cgit 1.4.1