From 32a0e091236e5e0d46ac2a12e16804ff1361e467 Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 29 Apr 2025 22:16:00 +0300 Subject: [PATCH 1/2] Add flake and fix config.toml remove theme.toml It appears you based the repo on a theme or something? --- config.toml | 13 +++++++--- flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ theme.toml | 13 ---------- 4 files changed, 143 insertions(+), 17 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 theme.toml diff --git a/config.toml b/config.toml index bd9f87f..272eda6 100644 --- a/config.toml +++ b/config.toml @@ -1,12 +1,17 @@ -base_url = "https://getzola.github.io/book/" +# The URL the site will be built for +base_url = "https://bluespec.dev" + +# Whether to automatically compile all Sass files in the sass directory compile_sass = true -title = "book theme" -description = "A book theme" + +# 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 highlight_theme = "css" [extra] -book_number_chapters = true +# Put all your custom variables here diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..21b4780 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1745870676, + "narHash": "sha256-IpldIaWrlasZZlKHPxitkrJ1ex4EVphuWYXVDdF5kf4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fdb6c240562c5ad516253419cc6f26819705d3e0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "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" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5ef33e9 --- /dev/null +++ b/flake.nix @@ -0,0 +1,73 @@ +{ + inputs = { + nixpkgs = { + url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = + inputs: + inputs.utils.lib.eachDefaultSystem ( + system: + let + pkgs = import inputs.nixpkgs { + localSystem = system; + overlays = [ + (final: prev: { + bluespec-docs = prev.callPackage ( + { + stdenv, + zola, + git, + }: + stdenv.mkDerivation ({ + pname = "bluespec-docs"; + version = "0.1.0"; + src = inputs.self; + + nativeBuildInputs = [ + zola + git + ]; + buildPhase = '' + zola build + ''; + + installPhase = '' + mkdir -p $out + cp -r public $out + ''; + }) + ) { }; + + serve-site = prev.writers.writeBashBin "serve-site" '' + ${prev.lib.getExe prev.zola} build --base-url "" + ${prev.lib.getExe prev.python3} -m http.server --bind 127.0.0.1 8081 --directory ./public + ''; + }) + ]; + }; + in + { + packages = { + default = inputs.self.packages."${system}".bluespec-docs; + bluespec-docs = pkgs.bluespec-docs; + }; + + apps = { + # `nix run` will run this + default = { + type = "app"; + program = "${pkgs.serve-site}/bin/serve-site"; + }; + }; + + devShells.default = + with pkgs; + mkShell { + inputsFrom = [ bluespec-docs ]; + }; + } + ); +} diff --git a/theme.toml b/theme.toml deleted file mode 100644 index b343822..0000000 --- a/theme.toml +++ /dev/null @@ -1,13 +0,0 @@ -name = "book" -description = "A book theme inspired from GitBook/mdBook" -license = "MIT" -homepage = "https://github.com/getzola/book" -min_version = "0.17.0" -demo = "https://getzola.github.io/book/" - -[extra] -book_number_chapters = true - -[author] -name = "Vincent Prouillet" -homepage = "https://www.vincentprouillet.com" -- 2.50.1 From 679d8a4023de8937c5b46440261d0f5fc6103d90 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 4 Aug 2025 23:55:42 +0300 Subject: [PATCH 2/2] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/fdb6c240562c5ad516253419cc6f26819705d3e0?narHash=sha256-IpldIaWrlasZZlKHPxitkrJ1ex4EVphuWYXVDdF5kf4%3D' (2025-04-28) → 'github:nixos/nixpkgs/5b09dc45f24cf32316283e62aec81ffee3c3e376?narHash=sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY%3D' (2025-08-03) --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 21b4780..9fd1c20 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1745870676, - "narHash": "sha256-IpldIaWrlasZZlKHPxitkrJ1ex4EVphuWYXVDdF5kf4=", - "owner": "NixOS", + "lastModified": 1754214453, + "narHash": "sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "fdb6c240562c5ad516253419cc6f26819705d3e0", + "rev": "5b09dc45f24cf32316283e62aec81ffee3c3e376", "type": "github" }, "original": { -- 2.50.1