diff --git a/machines/kat-son/doc/0002-chore-remove-useless-dependencies.patch b/machines/kat-son/doc/0002-chore-remove-useless-dependencies.patch new file mode 100644 index 0000000..74b8cb9 --- /dev/null +++ b/machines/kat-son/doc/0002-chore-remove-useless-dependencies.patch @@ -0,0 +1,24 @@ +From d32ae9c3386ad1d896d8a54271138111b579d7e7 Mon Sep 17 00:00:00 2001 +From: catvayor +Date: Thu, 12 Dec 2024 17:04:45 +0100 +Subject: [PATCH 2/2] chore: remove useless dependencies + +--- + layouts/index.html | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/layouts/index.html b/layouts/index.html +index 63a6158..780ea78 100644 +--- a/layouts/index.html ++++ b/layouts/index.html +@@ -17,7 +17,6 @@ + + + +- + + + +-- +2.47.0 + diff --git a/machines/kat-son/doc/hugo-theme-extranix-options-search.nix b/machines/kat-son/doc/hugo-theme-extranix-options-search.nix index cfcbba6..df95ade 100644 --- a/machines/kat-son/doc/hugo-theme-extranix-options-search.nix +++ b/machines/kat-son/doc/hugo-theme-extranix-options-search.nix @@ -2,6 +2,7 @@ fetchFromGitHub, stdenv, lib, + fetchurl, }: stdenv.mkDerivation { name = "hugo-theme-extranix-options-search"; @@ -15,12 +16,48 @@ stdenv.mkDerivation { patches = [ ./0001-fix-pretty-no-defaults.patch + ./0002-chore-remove-useless-dependencies.patch ]; - installPhase = '' - mkdir $out - cp -r * $out - ''; + installPhase = + let + js-search = fetchurl { + url = "https://unpkg.com/js-search@2.0.1/dist/umd/js-search.min.js"; + hash = "sha256-LD9UsSATk+xTzAbk8nD2gA2bjHKvetXtCMDAFkM2K5Q="; + }; + jquery = fetchurl { + url = "https://code.jquery.com/jquery-3.7.1.slim.min.js"; + hash = "sha256-kmHvs0B+OpCW5GVHUNjv9rOmY0IvSIRcf7zGUDTDQM8="; + }; + bootstrap.css.main = fetchurl { + url = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"; + hash = "sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w="; + }; + bootstrap.css.theme = fetchurl { + url = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"; + hash = "sha256-ZT4HPpdCOt2lvDkXokHuhJfdOKSPFLzeAJik5U/Q+l4="; + }; + bootstrap.js = fetchurl { + url = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"; + hash = "sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8="; + }; + in + '' + mkdir $out + rm static/images/favicon.* + cp -r * $out + cp ${js-search} $out/static/js/js-search.min.js + cp ${jquery} $out/static/js/jquery.slim.min.js + cp ${bootstrap.css.main} $out/static/css/bootstrap.min.css + cp ${bootstrap.css.theme} $out/static/css/bootstrap-theme.min.css + cp ${bootstrap.js} $out/static/js/bootstrap.min.js + substituteInPlace $out/layouts/index.html \ + --replace-fail 'https://unpkg.com/js-search@2.0.1/dist/umd/js-search.min.js' js/js-search.min.js \ + --replace-fail 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js' js/jquery.slim.min.js \ + --replace-fail 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' css/bootstrap.min.css \ + --replace-fail 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css' css/bootstrap-theme.min.css \ + --replace-fail 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js' js/bootstrap.min.js \ + ''; meta = { description = "Theme which implements a nix modules options search machine."; diff --git a/machines/kat-son/static-data/images/favicon.ico b/machines/kat-son/static-data/images/favicon.ico new file mode 100644 index 0000000..4cf5eac Binary files /dev/null and b/machines/kat-son/static-data/images/favicon.ico differ diff --git a/machines/kat-son/static-data/images/favicon.png b/machines/kat-son/static-data/images/favicon.png new file mode 100644 index 0000000..a08469d Binary files /dev/null and b/machines/kat-son/static-data/images/favicon.png differ