From beccccb61fa1bc88cbc5dbf160d6c9a48869e92e Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 25 May 2025 15:45:17 +1000 Subject: [PATCH 01/23] build site via zola --- .envrc | 1 + .gitignore | 2 + config.toml | 16 ++++++++ content/_index.md | 5 +++ flake.lock | 61 ++++++++++++++++++++++++++++++ flake.nix | 30 +++++++++++++++ src/index.html => static/style.css | 48 ----------------------- templates/blog.html | 20 ++++++++++ templates/blog_list.html | 14 +++++++ templates/chrome.html | 30 +++++++++++++++ templates/homepage.html | 20 ++++++++++ 11 files changed, 199 insertions(+), 48 deletions(-) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 config.toml create mode 100644 content/_index.md create mode 100644 flake.lock create mode 100644 flake.nix rename src/index.html => static/style.css (55%) create mode 100644 templates/blog.html create mode 100644 templates/blog_list.html create mode 100644 templates/chrome.html create mode 100644 templates/homepage.html diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5bfb5c9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +.direnv diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..55119e4 --- /dev/null +++ b/config.toml @@ -0,0 +1,16 @@ +# The URL the site will be built for +base_url = "https://astolfo.org" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = false + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = true + +[markdown] +# Whether to do syntax highlighting +# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola +highlight_code = true + +[extra] +# Put all your custom variables here diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..c080c46 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,5 @@ ++++ +title = "astolfo.org | homepage" +page_template = "homepage.html" +template = "homepage.html" ++++ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1f6c611 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1747060738, + "narHash": "sha256-ByfPRQuqj+nhtVV0koinEpmJw0KLzNbgcgi9EF+NVow=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "eaeed9530c76ce5f1d2d8232e08bec5e26f18ec1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c4f5caa --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +{ + # from https://ilanjoselevich.com/blog/building-websites-using-nix-flakes-and-zola/ + description = "the website for astolfo.org"; + + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + packages.website = pkgs.stdenv.mkDerivation rec { + pname = "astolfo.org"; + version = "1.0"; + src = ./src; + nativeBuildInputs = [ pkgs.zola ]; + buildPhase = "zola build"; + installPhase = "cp -r public $out"; + }; + defaultPackage = self.packages.${system}.website; + devShell = pkgs.mkShell { + packages = with pkgs; [ + zola + ]; + }; + } + ); +} diff --git a/src/index.html b/static/style.css similarity index 55% rename from src/index.html rename to static/style.css index 219abea..cd31dcc 100644 --- a/src/index.html +++ b/static/style.css @@ -1,50 +1,3 @@ - - - - - astolfo.org - - -
- -
- -
-
-

- a - s - t - o - l - f - o - . - o - r - g -

-
-
- - - - - - diff --git a/templates/blog.html b/templates/blog.html new file mode 100644 index 0000000..7ef04b1 --- /dev/null +++ b/templates/blog.html @@ -0,0 +1,20 @@ +{% extends "chrome.html" %}/html> +{% block content %} +
+
+

+ a + s + t + o + l + f + o + . + o + r + g +

+
+
+{% endblock content %} diff --git a/templates/blog_list.html b/templates/blog_list.html new file mode 100644 index 0000000..aec7c1a --- /dev/null +++ b/templates/blog_list.html @@ -0,0 +1,14 @@ +{% extends "chrome.html" %}/html> + +{% block content %} +

+ {{ section.title }} +

+ +{% endblock content %} diff --git a/templates/chrome.html b/templates/chrome.html new file mode 100644 index 0000000..ffac21c --- /dev/null +++ b/templates/chrome.html @@ -0,0 +1,30 @@ + + + + + astolfo.org + + + +
+ +
+ + {% block content %} {% endblock content %} + + + + diff --git a/templates/homepage.html b/templates/homepage.html new file mode 100644 index 0000000..7ef04b1 --- /dev/null +++ b/templates/homepage.html @@ -0,0 +1,20 @@ +{% extends "chrome.html" %}/html> +{% block content %} +
+
+

+ a + s + t + o + l + f + o + . + o + r + g +

+
+
+{% endblock content %} From 44e1ea0c08f4d16967941dd23edc66a08e7e52c2 Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 3 Aug 2025 21:46:35 +1000 Subject: [PATCH 02/23] use 11ty --- .gitignore | 1 + README.md | 2 - _includes/base.html | 33 + _includes/blog.html | 9 + _site/README/index.html | 1 + .../_layouts/base/index.html | 4 +- _site/base/index.html | 30 + _site/blog/first/index.html | 316 ++++++ _site/blog/index.html | 41 + static/style.css => _site/bundle.css | 105 +- _site/img/astolfos/footer.png | Bin 0 -> 1260432 bytes _site/index.html | 72 ++ blog/blog.json | 4 + blog/first.md | 313 ++++++ blog/index.md | 7 + bundle.css | 142 +++ config.toml | 16 - content/_index.md | 5 - eleventy.config.js | 4 + flake.lock | 6 +- flake.nix | 10 +- img/astolfos/footer.png | Bin 0 -> 1260432 bytes index.html | 42 + package.json | 11 + templates/blog.html | 20 - templates/blog_list.html | 14 - templates/homepage.html | 20 - yarn.lock | 905 ++++++++++++++++++ 28 files changed, 2002 insertions(+), 131 deletions(-) create mode 100644 _includes/base.html create mode 100644 _includes/blog.html create mode 100644 _site/README/index.html rename templates/chrome.html => _site/_layouts/base/index.html (88%) create mode 100644 _site/base/index.html create mode 100644 _site/blog/first/index.html create mode 100644 _site/blog/index.html rename static/style.css => _site/bundle.css (62%) create mode 100644 _site/img/astolfos/footer.png create mode 100644 _site/index.html create mode 100644 blog/blog.json create mode 100644 blog/first.md create mode 100644 blog/index.md create mode 100644 bundle.css delete mode 100644 config.toml delete mode 100644 content/_index.md create mode 100644 eleventy.config.js create mode 100644 img/astolfos/footer.png create mode 100644 index.html create mode 100644 package.json delete mode 100644 templates/blog.html delete mode 100644 templates/blog_list.html delete mode 100644 templates/homepage.html create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 5bfb5c9..480cc0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store .direnv +node_modules diff --git a/README.md b/README.md index 6a7242d..53dd698 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ # astolfo.org - -the source code of astolfo.org \ No newline at end of file diff --git a/_includes/base.html b/_includes/base.html new file mode 100644 index 0000000..6724510 --- /dev/null +++ b/_includes/base.html @@ -0,0 +1,33 @@ + + + + + astolfo.org + + + + + + + + +
{{ content }}
+ + + + diff --git a/_includes/blog.html b/_includes/blog.html new file mode 100644 index 0000000..5143571 --- /dev/null +++ b/_includes/blog.html @@ -0,0 +1,9 @@ +--- +layout: base.html +--- + +
+

{{ title }}

+
+ {{ content }} +
diff --git a/_site/README/index.html b/_site/README/index.html new file mode 100644 index 0000000..dcfda15 --- /dev/null +++ b/_site/README/index.html @@ -0,0 +1 @@ +

astolfo.org

diff --git a/templates/chrome.html b/_site/_layouts/base/index.html similarity index 88% rename from templates/chrome.html rename to _site/_layouts/base/index.html index ffac21c..0d80c26 100644 --- a/templates/chrome.html +++ b/_site/_layouts/base/index.html @@ -3,7 +3,7 @@ astolfo.org - +
@@ -15,7 +15,7 @@
- {% block content %} {% endblock content %} + From bb4ea44b3e820516cdc1a18d9f1d027d0aa2a432 Mon Sep 17 00:00:00 2001 From: Nico Date: Mon, 4 Aug 2025 23:42:46 +1000 Subject: [PATCH 06/23] add navbar to footer --- _includes/base.html | 16 ++++++++++-- bundle.css | 61 ++++++++++++++++++++++++++------------------- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/_includes/base.html b/_includes/base.html index 415b731..f24dbc0 100644 --- a/_includes/base.html +++ b/_includes/base.html @@ -18,11 +18,23 @@
{{ content }}
-