From 9356e79e1a357e160ba855284da3bf06fa0024ee Mon Sep 17 00:00:00 2001 From: Parker TenBroeck <51721964+ParkerTenBroeck@users.noreply.github.com> Date: Sun, 18 Jan 2026 13:57:33 -0500 Subject: [PATCH] updated to zola 0.22, added theme to code blocks --- .github/workflows/zola-pages.yml | 2 +- .gitignore | 1 + config.toml | 11 ++-- content/projects/generators.md | 16 ++++++ default.nix | 17 +++++- sass/footer.scss | 2 +- sass/header.scss | 2 +- sass/style.scss | 8 ++- sass/theme.scss | 3 +- static/giallo.css | 91 ++++++++++++++++++++++++++++++++ templates/base.html | 1 + 11 files changed, 143 insertions(+), 11 deletions(-) create mode 100644 .gitignore create mode 100644 static/giallo.css diff --git a/.github/workflows/zola-pages.yml b/.github/workflows/zola-pages.yml index ddba655..216a646 100644 --- a/.github/workflows/zola-pages.yml +++ b/.github/workflows/zola-pages.yml @@ -23,7 +23,7 @@ jobs: - name: Build Zola + upload Pages artifact uses: getzola/github-pages@066755243e69f508fd1a74739fbf1a65f656c790 with: - zola_version: v0.21.0 + zola_version: v0.22.0 deploy: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d298be1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public/ \ No newline at end of file diff --git a/config.toml b/config.toml index 9c23f5e..38d0698 100644 --- a/config.toml +++ b/config.toml @@ -29,10 +29,15 @@ taxonomies = [ {name = "tags", feed=true} ] +minify_html = 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 render_emoji = true bottom_footnotes = true github_alerts = true + + +[markdown.highlighting] +theme = "github-dark" +style = "class" +error_on_missing_language = true \ No newline at end of file diff --git a/content/projects/generators.md b/content/projects/generators.md index 27fe7c0..2f1db74 100644 --- a/content/projects/generators.md +++ b/content/projects/generators.md @@ -6,4 +6,20 @@ date = 2025-05-07 [taxonomies] tags = ["java", "bytecode"] +++ + + +```java +public static Future echo(@Cancellation("close") Socket socket) throws IOException { + try(socket){ + var buffer = ByteBuffer.allocate(4096*2); + while(true){ + bytes_received = socket.read(buffer).await() + bytes_received; + buffer.flip(); + bytes_sent = socket.write_all(buffer).await() + bytes_sent; + buffer.clear().limit(buffer.capacity()); + } + } +} +``` + https://github.com/ParkerTenBroeck/generators \ No newline at end of file diff --git a/default.nix b/default.nix index 572abd3..e82bfd8 100644 --- a/default.nix +++ b/default.nix @@ -1,5 +1,18 @@ -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: +let + unstable = + import + (fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"; + sha256 = "sha256:09qwbfkvk3jmqlpgis4v1m1fmh7zffi8drybb03mjqa95bynbs99"; + }) + { + system = pkgs.stdenv.hostPlatform.system; + }; +in pkgs.mkShell { - buildInputs = [ pkgs.zola ]; + buildInputs = [ unstable.zola ]; } diff --git a/sass/footer.scss b/sass/footer.scss index cabf4d0..9b29a1f 100644 --- a/sass/footer.scss +++ b/sass/footer.scss @@ -5,5 +5,5 @@ footer { border-top-style: solid; border-top-width: 4px; - border-top-color: var(--grey); + border-top-color: var(--grey-light); } \ No newline at end of file diff --git a/sass/header.scss b/sass/header.scss index b6c66b2..2d4e23d 100644 --- a/sass/header.scss +++ b/sass/header.scss @@ -14,7 +14,7 @@ header { text-decoration-color: var(--primary)!important; &:hover { - text-decoration-color: var(--grey)!important; + text-decoration-color: var(--grey-light)!important; } } diff --git a/sass/style.scss b/sass/style.scss index e14b9e7..ffae118 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -4,6 +4,10 @@ @use "blog.scss"; @use "fonts.scss"; +.z-code{ + overflow-x: auto; +} + body { background: var(--bg-0); color: var(--fg-1); @@ -33,7 +37,7 @@ a { text-decoration: underline; text-decoration-thickness: 0.30ex; - text-decoration-color: var(--grey); + text-decoration-color: var(--grey-light); &:hover { text-decoration-color: var(--primary); @@ -77,7 +81,7 @@ h6 { } code { - background: var(--bg-1); + background: var(--grey-dark); border-radius: 3px; font-family: 'Berkeley Mono'; padding: .15rem .3rem; diff --git a/sass/theme.scss b/sass/theme.scss index 27ca2a4..32f62a9 100644 --- a/sass/theme.scss +++ b/sass/theme.scss @@ -4,7 +4,8 @@ --bg-0: #1d1d1d; --bg-1: #131313; - --grey: #777; + --grey-light: #777; + --grey-dark: #24292E; --fg-0: #eee; --fg-1: #ccc; diff --git a/static/giallo.css b/static/giallo.css new file mode 100644 index 0000000..783c850 --- /dev/null +++ b/static/giallo.css @@ -0,0 +1,91 @@ +/* + * theme "github-dark" generated by giallo + */ + +.z-code { + color: #E1E4E8; + background-color: #24292E; +} + +.z-hl { + background-color: #2B3036; +} + +.giallo-ln { + color: #444D56; +} + +.z-comment { color: #6A737D; } +.z-constant { color: #79B8FF; } +.z-entity { color: #B392F0; } +.z-keyword { color: #F97583; } +.z-storage { color: #F97583; } +.z-string { color: #9ECBFF; } +.z-support { color: #79B8FF; } +.z-variable { color: #FFAB70; } +.z-carriage-return { color: #24292E; background-color: #F97583; font-style: italic;text-decoration: underline; } +.z-variable { color: #79B8FF; } +.z-source { color: #9ECBFF; } +.z-string.z-comment { color: #6A737D; } +.z-variable.z-language { color: #79B8FF; } +.z-entity.z-name { color: #B392F0; } +.z-storage.z-type { color: #F97583; } +.z-meta.z-property-name { color: #79B8FF; } +.z-variable.z-other { color: #E1E4E8; } +.z-invalid.z-broken { color: #FDAEB7; font-style: italic; } +.z-invalid.z-deprecated { color: #FDAEB7; font-style: italic; } +.z-invalid.z-illegal { color: #FDAEB7; font-style: italic; } +.z-invalid.z-unimplemented { color: #FDAEB7; font-style: italic; } +.z-message.z-error { color: #FDAEB7; } +.z-source.z-regexp { color: #DBEDFF; } +.z-string.z-regexp { color: #DBEDFF; } +.z-support.z-constant { color: #79B8FF; } +.z-support.z-variable { color: #79B8FF; } +.z-meta.z-module-reference { color: #79B8FF; } +.z-markup.z-heading { color: #79B8FF; font-weight: bold; } +.z-markup.z-quote { color: #85E89D; } +.z-markup.z-italic { color: #E1E4E8; font-style: italic; } +.z-markup.z-bold { color: #E1E4E8; font-weight: bold; } +.z-markup.z-underline { text-decoration: underline; } +.z-markup.z-strikethrough { text-decoration: line-through; } +.z-markup.z-deleted { color: #FDAEB7; background-color: #86181D; } +.z-markup.z-inserted { color: #85E89D; background-color: #144620; } +.z-markup.z-changed { color: #FFAB70; background-color: #C24E00; } +.z-markup.z-ignored { color: #2F363D; background-color: #79B8FF; } +.z-markup.z-untracked { color: #2F363D; background-color: #79B8FF; } +.z-meta.z-separator { color: #79B8FF; font-weight: bold; } +.z-meta.z-output { color: #79B8FF; } +.z-brackethighlighter.z-tag { color: #D1D5DA; } +.z-brackethighlighter.z-curly { color: #D1D5DA; } +.z-brackethighlighter.z-round { color: #D1D5DA; } +.z-brackethighlighter.z-square { color: #D1D5DA; } +.z-brackethighlighter.z-angle { color: #D1D5DA; } +.z-brackethighlighter.z-quote { color: #D1D5DA; } +.z-brackethighlighter.z-unmatched { color: #FDAEB7; } +.z-entity.z-name { color: #79B8FF; font-weight: bold; } +.z-punctuation.z-definition.z-comment { color: #6A737D; } +.z-entity.z-name.z-constant { color: #79B8FF; } +.z-variable.z-other.z-constant { color: #79B8FF; } +.z-variable.z-other.z-enummember { color: #79B8FF; } +.z-variable.z-parameter.z-function { color: #E1E4E8; } +.z-entity.z-name.z-tag { color: #85E89D; } +.z-storage.z-modifier.z-package { color: #E1E4E8; } +.z-storage.z-modifier.z-import { color: #E1E4E8; } +.z-storage.z-type.z-java { color: #E1E4E8; } +.z-punctuation.z-definition.z-string { color: #9ECBFF; } +.z-string.z-regexp.z-character-class { color: #DBEDFF; } +.z-markup.z-inline.z-raw { color: #79B8FF; } +.z-punctuation.z-definition.z-deleted { color: #FDAEB7; background-color: #86181D; } +.z-punctuation.z-definition.z-inserted { color: #85E89D; background-color: #144620; } +.z-punctuation.z-definition.z-changed { color: #FFAB70; background-color: #C24E00; } +.z-meta.z-diff.z-range { color: #B392F0; font-weight: bold; } +.z-meta.z-diff.z-header { color: #79B8FF; } +.z-string.z-other.z-link { color: #DBEDFF; text-decoration: underline; } +.z-constant.z-character.z-escape { color: #DBEDFF; } +.z-source.z-ruby.z-embedded { color: #DBEDFF; } +.z-string.z-regexp.z-arbitrary-repitition { color: #DBEDFF; } +.z-constant.z-character.z-escape { color: #85E89D; font-weight: bold; } +.z-meta.z-diff.z-header.z-from-file { color: #FDAEB7; background-color: #86181D; } +.z-meta.z-diff.z-header.z-to-file { color: #85E89D; background-color: #144620; } +.z-constant.z-other.z-reference.z-link { color: #DBEDFF; text-decoration: underline; } +.z-punctuation.z-definition.z-list.z-begin.z-markdown { color: #FFAB70; } diff --git a/templates/base.html b/templates/base.html index c01ce32..dc52857 100644 --- a/templates/base.html +++ b/templates/base.html @@ -24,6 +24,7 @@ {% endif %} + {%- if page.extra.stylesheets or section.extra.stylesheets %} {%- for stylesheet in page.extra.stylesheets | default(value=section.extra.stylesheets) %}