summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--content/_index.md8
-rw-r--r--flake.lock17
-rw-r--r--flake.nix26
-rw-r--r--site/2023-11-15-scraping-images-from-open-tabs.md (renamed from content/2023-11-15-scraping-images-from-open-tabs.md)10
-rw-r--r--site/2026-02-20-pleasant-arch-setup.md (renamed from content/2026-02-20-pleasant-arch-setup.md)9
-rw-r--r--site/index.html7
-rw-r--r--site/sakura.css243
-rw-r--r--soupault.toml83
-rw-r--r--templates/base.html37
-rw-r--r--templates/blog-page.html17
-rw-r--r--templates/index.html40
-rw-r--r--templates/main.html11
13 files changed, 360 insertions, 152 deletions
diff --git a/.gitignore b/.gitignore
index 1141ca6..cc85a87 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
/.direnv
-/public
+/build
+/.soupault-cache
# nix
/result
-/themes
diff --git a/content/_index.md b/content/_index.md
deleted file mode 100644
index de8afa0..0000000
--- a/content/_index.md
+++ /dev/null
@@ -1,8 +0,0 @@
-+++
-title = "Sorre"
-description = "Random thoughts written down so I can come back to them later"
-template = "index.html"
-page_template = "blog-page.html"
-sort_by = "date"
-paginate_by = 5
-+++
diff --git a/flake.lock b/flake.lock
index dc9814d..6b0e3cb 100644
--- a/flake.lock
+++ b/flake.lock
@@ -108,28 +108,11 @@
"type": "github"
}
},
- "radion-theme": {
- "flake": false,
- "locked": {
- "lastModified": 1770534778,
- "narHash": "sha256-MmoBeVK65XaUVeQn21s78P8DZEajmcqQYPLp94AZnE4=",
- "owner": "micahkepe",
- "repo": "radion",
- "rev": "76aaf58d60822922632631883c92af035dc764b0",
- "type": "github"
- },
- "original": {
- "owner": "micahkepe",
- "repo": "radion",
- "type": "github"
- }
- },
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
- "radion-theme": "radion-theme",
"treefmt-nix": "treefmt-nix"
}
},
diff --git a/flake.nix b/flake.nix
index 81a581d..1c48918 100644
--- a/flake.nix
+++ b/flake.nix
@@ -12,10 +12,6 @@
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
- radion-theme = {
- url = "github:micahkepe/radion";
- flake = false;
- };
};
outputs =
@@ -28,25 +24,17 @@
systems = [ "x86_64-linux" ];
perSystem =
{ config, pkgs, ... }:
- let
- theme = inputs.radion-theme;
- themeName = ((builtins.fromTOML (builtins.readFile "${theme}/theme.toml")).name);
- in
{
packages = {
default = config.packages.website;
website = pkgs.stdenv.mkDerivation {
pname = "sorre-website";
- version = "2026-02-20";
+ version = "2026-02-21";
src = ./.;
- nativeBuildInputs = [ pkgs.zola ];
- configurePhase = ''
- mkdir -p "themes/${themeName}"
- cp -r ${theme}/* "themes/${themeName}"
- '';
- buildPhase = "zola build";
- installPhase = "cp -r public $out";
+ nativeBuildInputs = [ pkgs.soupault pkgs.pandoc ];
+ buildPhase = "soupault";
+ installPhase = "cp -r build $out";
};
docker-image = pkgs.dockerTools.buildImage {
@@ -82,11 +70,7 @@
minimalMkShell = pkgs.mkShell.override { stdenv = stdenvMinimal; };
in
minimalMkShell {
- packages = with pkgs; [ zola ] ++ builtins.attrValues config.treefmt.build.programs;
- shellHook = ''
- mkdir -p themes
- ln -sn "${theme}" "themes/${themeName}"
- '';
+ packages = with pkgs; [ soupault ] ++ builtins.attrValues config.treefmt.build.programs;
};
treefmt = {
diff --git a/content/2023-11-15-scraping-images-from-open-tabs.md b/site/2023-11-15-scraping-images-from-open-tabs.md
index 271d975..b0aebb6 100644
--- a/content/2023-11-15-scraping-images-from-open-tabs.md
+++ b/site/2023-11-15-scraping-images-from-open-tabs.md
@@ -1,8 +1,8 @@
-+++
-title = "Scraping images from open tabs"
-date = "2023-11-15"
-updated = "2023-11-15"
-+++
+# Scraping images from open tabs
+
+<time id="post-upload-date">2023-11-15</time>
+<time id="post-update-date">2023-11-15</time>
+
```zsh
cat export.json \
| jaq --raw-output '..["url"]? | strings' \
diff --git a/content/2026-02-20-pleasant-arch-setup.md b/site/2026-02-20-pleasant-arch-setup.md
index 6925a34..93f35b0 100644
--- a/content/2026-02-20-pleasant-arch-setup.md
+++ b/site/2026-02-20-pleasant-arch-setup.md
@@ -1,8 +1,7 @@
-+++
-title = "A pleasant Arch Linux setup"
-date = "2026-02-20"
-updated = "2026-02-20"
-+++
+# A pleasant Arch Linux setup
+
+<time id="post-upload-date">2026-02-20</time>
+<time id="post-update-date">2026-02-20</time>
Recently I distrohopped back to Arch Linux on my laptop and, given the
opportunity for a fresh start, wanted to keep the setup tidy. In this post I
diff --git a/site/index.html b/site/index.html
new file mode 100644
index 0000000..49822cd
--- /dev/null
+++ b/site/index.html
@@ -0,0 +1,7 @@
+<h1>Sorre</h1>
+
+<p>Random thoughts written down so I can come back to them later.</p>
+<p>Blog still under construction...</p>
+
+<div id="blog-index">
+</div>
diff --git a/site/sakura.css b/site/sakura.css
new file mode 100644
index 0000000..7d1886a
--- /dev/null
+++ b/site/sakura.css
@@ -0,0 +1,243 @@
+/* Sakura.css v1.5.1
+ * ================
+ * Minimal css theme.
+ * Project: https://github.com/oxalorg/sakura/
+ */
+/* Body */
+html {
+ font-size: 62.5%;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
+}
+
+body {
+ font-size: 1.8rem;
+ line-height: 1.618;
+ max-width: 38em;
+ margin: auto;
+ color: #4a4a4a;
+ background-color: #f9f9f9;
+ padding: 13px;
+}
+
+@media (max-width: 684px) {
+ body {
+ font-size: 1.53rem;
+ }
+}
+@media (max-width: 382px) {
+ body {
+ font-size: 1.35rem;
+ }
+}
+h1, h2, h3, h4, h5, h6 {
+ line-height: 1.1;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
+ font-weight: 700;
+ margin-top: 3rem;
+ margin-bottom: 1.5rem;
+ overflow-wrap: break-word;
+ word-wrap: break-word;
+ -ms-word-break: break-all;
+ word-break: break-word;
+}
+
+h1 {
+ font-size: 2.35em;
+}
+
+h2 {
+ font-size: 2em;
+}
+
+h3 {
+ font-size: 1.75em;
+}
+
+h4 {
+ font-size: 1.5em;
+}
+
+h5 {
+ font-size: 1.25em;
+}
+
+h6 {
+ font-size: 1em;
+}
+
+p {
+ margin-top: 0px;
+ margin-bottom: 2.5rem;
+}
+
+small, sub, sup {
+ font-size: 75%;
+}
+
+hr {
+ border-color: #1d7484;
+}
+
+a {
+ text-decoration: none;
+ color: #1d7484;
+}
+a:visited {
+ color: #144f5a;
+}
+a:hover {
+ color: #982c61;
+ border-bottom: 2px solid #4a4a4a;
+}
+
+ul {
+ padding-left: 1.4em;
+ margin-top: 0px;
+ margin-bottom: 2.5rem;
+}
+
+li {
+ margin-bottom: 0.4em;
+}
+
+blockquote {
+ margin-left: 0px;
+ margin-right: 0px;
+ padding-left: 1em;
+ padding-top: 0.8em;
+ padding-bottom: 0.8em;
+ padding-right: 0.8em;
+ border-left: 5px solid #1d7484;
+ margin-bottom: 2.5rem;
+ background-color: #f1f1f1;
+}
+
+blockquote p {
+ margin-bottom: 0;
+}
+
+img, video {
+ height: auto;
+ max-width: 100%;
+ margin-top: 0px;
+ margin-bottom: 2.5rem;
+}
+
+/* Pre and Code */
+pre {
+ background-color: #f1f1f1;
+ display: block;
+ padding: 1em;
+ overflow-x: auto;
+ margin-top: 0px;
+ margin-bottom: 2.5rem;
+ font-size: 0.9em;
+}
+
+code, kbd, samp {
+ font-size: 0.9em;
+ padding: 0 0.5em;
+ background-color: #f1f1f1;
+ white-space: pre-wrap;
+}
+
+pre > code {
+ padding: 0;
+ background-color: transparent;
+ white-space: pre;
+ font-size: 1em;
+}
+
+/* Tables */
+table {
+ text-align: justify;
+ width: 100%;
+ border-collapse: collapse;
+ margin-bottom: 2rem;
+}
+
+td, th {
+ padding: 0.5em;
+ border-bottom: 1px solid #f1f1f1;
+}
+
+/* Buttons, forms and input */
+input, textarea {
+ border: 1px solid #4a4a4a;
+}
+input:focus, textarea:focus {
+ border: 1px solid #1d7484;
+}
+
+textarea {
+ width: 100%;
+}
+
+.button, button,
+input[type=submit],
+input[type=reset],
+input[type=button],
+input[type=file]::file-selector-button {
+ display: inline-block;
+ padding: 5px 10px;
+ text-align: center;
+ text-decoration: none;
+ white-space: nowrap;
+ background-color: #1d7484;
+ color: #f9f9f9;
+ border-radius: 1px;
+ border: 1px solid #1d7484;
+ cursor: pointer;
+ box-sizing: border-box;
+}
+.button:hover, button:hover,
+input[type=submit]:hover,
+input[type=reset]:hover,
+input[type=button]:hover,
+input[type=file]::file-selector-button:hover {
+ background-color: #982c61;
+ color: #f9f9f9;
+ outline: 0;
+}
+
+.button[disabled], button[disabled],
+input[type=submit][disabled],
+input[type=reset][disabled],
+input[type=button][disabled],
+input[type=file][disabled] {
+ cursor: default;
+ opacity: 0.5;
+}
+.button:focus-visible, button:focus-visible,
+input[type=submit]:focus-visible,
+input[type=reset]:focus-visible,
+input[type=button]:focus-visible,
+input[type=file]:focus-visible {
+ outline-style: solid;
+ outline-width: 2px;
+}
+
+textarea, select, input {
+ color: #4a4a4a;
+ padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
+ margin-bottom: 10px;
+ background-color: #f1f1f1;
+ border: 1px solid #f1f1f1;
+ border-radius: 4px;
+ box-shadow: none;
+ box-sizing: border-box;
+}
+textarea:focus, select:focus, input:focus {
+ border: 1px solid #1d7484;
+ outline: 0;
+}
+
+input[type=checkbox]:focus {
+ outline: 1px dotted #1d7484;
+}
+
+label, legend, fieldset {
+ display: block;
+ margin-bottom: 0.5rem;
+ font-weight: 600;
+}
diff --git a/soupault.toml b/soupault.toml
new file mode 100644
index 0000000..415470d
--- /dev/null
+++ b/soupault.toml
@@ -0,0 +1,83 @@
+[settings]
+ verbose = true
+ debug = false
+
+ # Where input files (pages and assets) are stored.
+ site_dir = "site"
+ build_dir = "build"
+
+ # Files with other extensions are considered static assets
+ # and copied to build/ unchanged.
+ page_file_extensions = ["htm", "html", "md", "rst", "adoc"]
+
+ # Files with these extensions are ignored.
+ ignore_extensions = ["draft", "priv"]
+
+ # Treat files as content to insert in the template,
+ # unless they have an <html> element in them.
+ generator_mode = true
+ complete_page_selector = "html"
+
+ # Use templates/main.html file for the page template.
+ default_template_file = "templates/main.html"
+
+ # The content will be inserted into its <main> element,
+ # after its last already existing child.
+ default_content_selector = "main"
+ default_content_action = "append_child"
+
+ # Set the document type to HTML5, unless the page already has
+ # a doctype declaration.
+ doctype = "<!DOCTYPE html>"
+ keep_doctype = true
+
+ # Indent HTML tags for readability
+ pretty_print_html = true
+
+ # Translate site/about.html to build/about/index.html
+ # If set to false, then site/about.html will become build/about.html
+ clean_urls = true
+
+ # Look for plugin files in plugins/
+ plugin_discovery = true
+ plugin_dirs = ["plugins"]
+
+
+[preprocessors]
+ md = 'pandoc -f commonmark+smart -t html'
+
+
+[widgets.insert-sakura-css]
+ widget = 'insert_html'
+ selector = 'head'
+ html = """ <link rel="stylesheet" href="/sakura.css" type="text/css"> """
+
+
+[index]
+ sort_descending = true
+ sort_type = 'calendar'
+ sort_by = 'upload-date'
+
+ date_formats = ['%F']
+
+[index.fields.title]
+ selector = ['h1']
+
+[index.fields.uploaddate]
+ selector = ['time#post-upload-date']
+ extract_attribute = 'datetime'
+ fallback_to_content = true
+
+[index.fields.updatedate]
+ selector = ['time#post-update-date']
+ extract_attribute = 'datetime'
+ fallback_to_content = true
+
+[index.views.blog]
+ index_selector = "#blog-index"
+ index_item_template = """
+ <h2><a href="{{url}}">{{title}}</a></h2>
+ <p><strong>Uploaded:</strong> {{uploaddate}}</p>
+ <p><strong>Last update:</strong> {{updatedate}}.</p>
+ """
+
diff --git a/templates/base.html b/templates/base.html
deleted file mode 100644
index cf1edbc..0000000
--- a/templates/base.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
- <meta charset="UTF-8">
- <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
- <meta content="width=device-width, initial-scale=1" name="viewport" />
-
- {% if page.title %}
- {% set title = page.title %}
- {% elif section.title %}
- {% set title = section.title %}
- {% elif config.title %}
- {% set title = config.title %}
- {% endif %}
- {% if title %}<title>{{ title }}</title>{% endif %}
-
- {% if config.generate_feed %}
- <link rel="alternate" type="application/atom+xml" title="RSS" href="{{ get_url(path="atom.xml", trailing_slash=false)}}">
- {% endif %}
-
- <link rel="stylesheet" href="{{ get_url(path='site.css', trailing_slash=false) | safe }}" />
- <style>
- code {
- color: var(--note-bg-light);
- padding: .1rem .2rem;
- }
- </style>
-</head>
-
-<body theme="auto">
- <main style="max-width: 50rem;padding: 2rem 6rem;">
- {% block content %} {% endblock %}
- </main>
-</body>
-
-</html>
diff --git a/templates/blog-page.html b/templates/blog-page.html
deleted file mode 100644
index 2e54a27..0000000
--- a/templates/blog-page.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
-
-<header>
- <h1 id="title">
- {{ page.title }}
- </h1>
- <div>
- <p>written: {{ page.date }}</p>
- <p>updated: {{ page.updated }}</p>
- </div>
- <a href="/">home</a>
-</header>
-
-{{ page.content | safe }}
-{% endblock content %} \ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
deleted file mode 100644
index 11ff2d2..0000000
--- a/templates/index.html
+++ /dev/null
@@ -1,40 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
-<h1 id="page-title">
- {{ section.title }}
-</h1>
-
-<p>{{ section.description }}</p>
-
-<nav>
- <table>
- <caption>
- Posts
- </caption>
- <thead>
- <tr>
- <td>Title</td>
- <td>Date</td>
- </tr>
- </thead>
- <tbody>
- {% for page in paginator.pages %}
- <tr>
- <td><a href="{{ page.permalink | safe }}">{{page.title}}</a></td>
- <td>{{ page.date }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- <nav class="pagination">
- {% if paginator.previous %}
- <a class="previous" href="{{ paginator.previous }}">‹ Previous</a>
- {% endif %}
- {% if paginator.next %}
- <a class="next" href="{{ paginator.next }}">Next ›</a>
- {% endif %}
- </nav>
-</nav>
-
-{% endblock %} \ No newline at end of file
diff --git a/templates/main.html b/templates/main.html
new file mode 100644
index 0000000..0300fa6
--- /dev/null
+++ b/templates/main.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+ <main>
+ <!-- content will go here -->
+ </main>
+</body>
+</html>