From ffd19ef330a142f6d2cb85a3bd4a5492013da5cc Mon Sep 17 00:00:00 2001 From: tdro Date: Fri, 9 Dec 2022 01:03:04 -0500 Subject: shell.nix: Update hugo to version 0.108.0 Looks safe --- assets/css/syntax-highlight-default.css | 1 + assets/js/index.js | 28 ++++++++++++++-------------- shell.nix | 28 ++++++++-------------------- 3 files changed, 23 insertions(+), 34 deletions(-) diff --git a/assets/css/syntax-highlight-default.css b/assets/css/syntax-highlight-default.css index 18e5ab5..2379996 100644 --- a/assets/css/syntax-highlight-default.css +++ b/assets/css/syntax-highlight-default.css @@ -13,6 +13,7 @@ padding: 0.25rem 0.75rem; margin: 0 1rem 0 -0.75rem; user-select: none; + text-decoration: none; } .chroma .ln a:hover { diff --git a/assets/js/index.js b/assets/js/index.js index b26ece2..8927f21 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -12,7 +12,7 @@ let settings = { pager: {} }; - const url1 = self.location.href.split("#")[0].split("?")[0]; + const url = self.location.href.split("#")[0].split("?")[0]; const scrollRestore = (url)=>{ if (history.scrollRestoration) history.scrollRestoration = "manual"; if (localStorage["settings"]) { @@ -53,7 +53,7 @@ } }; self.addEventListener("DOMContentLoaded", function() { - scrollRestore(url1); + scrollRestore(url); self.addEventListener("click", function(event) { const up = document.getElementById("top"); const back = document.getElementById("back"); @@ -61,10 +61,10 @@ }); }); self.addEventListener("scroll", function() { - scrollTrack(url1); + scrollTrack(url); }); self.addEventListener("hashchange", function() { - scrollRestore(url1); + scrollRestore(url); }); })(); (function() { @@ -224,12 +224,12 @@ mouseoverTimer = undefined; } } - function mousedownShortcutListener(event1) { + function mousedownShortcutListener(event) { if (performance.now() - lastTouchTimestamp < 1111) { return; } - const linkElement = event1.target.closest("a"); - if (event1.which > 1 || event1.metaKey || event1.ctrlKey) { + const linkElement = event.target.closest("a"); + if (event.which > 1 || event.metaKey || event.ctrlKey) { return; } if (!linkElement) { @@ -315,8 +315,8 @@ [ "click", "touchstart" - ].forEach(function(event1) { - self.addEventListener(event1, function(event) { + ].forEach(function(event) { + self.addEventListener(event, function(event) { const menus = document.querySelectorAll("micro-metadata-menu"); const triggers = document.querySelectorAll("micro-metadata-menu input"); hideIfClickedOutside(menus, triggers, event); @@ -392,7 +392,7 @@ container.removeAttribute("data-focus"); } }); - let data1 = {}; + let data = {}; function isEmpty(obj) { return Object.keys(obj).length === 0; } @@ -406,7 +406,7 @@ if (paginated) { fetchJson(remote.next_url, local); } - data1 = local; + data = local; } function fetchJson(url, store) { const httpRequest = new XMLHttpRequest(); @@ -443,12 +443,12 @@ ] }; query.addEventListener("keyup", function() { - search(query.value, data1.items, options); + search(query.value, data.items, options); }); query.addEventListener("focusin", function() { - search(query.value, data1.items, options); + search(query.value, data.items, options); }); - search(query.value, data1.items, options); + search(query.value, data.items, options); }).catch((error)=>{ console.log("Error failed to load fuzzy sort: " + error); }); diff --git a/shell.nix b/shell.nix index 151c411..e031d07 100644 --- a/shell.nix +++ b/shell.nix @@ -3,8 +3,8 @@ let name = "nix-shell.canory"; pkgs = import (builtins.fetchTarball { - url = "https://releases.nixos.org/nixos/22.05/nixos-22.05.998.d17a56d90ec/nixexprs.tar.xz"; - sha256 = "084dzb7fmchfhhflrgprjjv7qz3j7vxw3d01f82q8p4g1x7hzn36"; + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; }) { }; validatornu = pkgs.callPackage (pkgs.fetchurl { @@ -17,41 +17,29 @@ let sha256 = "1ciwifsx2hrp0ymm077zfb5q8ravrk545bda1q249y2spw9np4ms"; }) { }; - check-jsonschema = pkgs.callPackage (pkgs.fetchurl { - url = "https://raw.githubusercontent.com/NixOS/nixpkgs/82e9e32436d5886102f1e5f7c17aed8475504991/pkgs/development/tools/check-jsonschema/default.nix"; - sha256 = "sha256-PImZIMGa6+DE2f4tXiPS8ck7enThJvi9uiyxHvXm9WQ"; - }) { }; - - hugo = pkgs.callPackage ({ lib, buildGo118Module, fetchgit, installShellFiles }: - - buildGo118Module rec { + hugo = pkgs.callPackage ({ lib, buildGoModule, fetchgit, installShellFiles }: + buildGoModule rec { pname = "hugo"; - version = "0.101.0"; + version = "0.108.0"; src = fetchgit { rev = "v${version}"; url = "https://github.com/gohugoio/hugo.git"; - sha256 = "sha256-Fodcefp8xdSV2tt6ZYaKdcLqVe2upEngQr6M+wV5wnw="; + sha256 = "sha256-MbpBGqu7IwQCf9DjSfIDi25ZGJYTI6xxSk9wPWxychw="; }; doCheck = false; proxyVendor = true; - vendorSha256 = "sha256-rReqDOhBKZO1qa3C4jmewGgmhLvvOYyxwWqsdm+6DzM="; + vendorSha256 = "sha256-ECA7xy7h3nkslW6bjjZWy3IxvF3Y1TTlGq8Os6R9UvA="; tags = [ "extended" ]; subPackages = [ "." ]; nativeBuildInputs = [ installShellFiles ]; - postInstall = '' - $out/bin/hugo gen man - installManPage man/* - ''; - meta = { license = lib.licenses.asl20; homepage = "https://gohugo.io"; description = "A fast and modern static website engine"; - maintainers = with lib.maintainers; [ schneefux Br1ght0ne Frostman ]; }; }) { }; @@ -60,10 +48,10 @@ in mkShellPure { inherit hugo; packages = [ - check-jsonschema hugo validatornu pkgs.busybox + pkgs.check-jsonschema pkgs.deno pkgs.entr pkgs.git -- cgit v1.2.3