From f080a22e1637e2b74408f1664a4a6407e74a8b39 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 09:15:14 -0700 Subject: [PATCH 1/9] theme update and related improvements --- config.toml | 131 +++++++++++++++++++++++- content/about/index.md | 8 +- content/archived/_index.md | 1 - content/post/_index.md | 1 - content/projects/_index.md | 1 + content/projects/duck4s/index.md | 2 +- content/projects/fishee/index.md | 2 +- content/projects/scaladex-nvim/index.md | 3 +- content/projects/scalanews/index.md | 2 +- content/projects/zio-actors/index.md | 2 +- content/subscribe/index.md | 2 - content/til/_index.md | 2 - flake.lock | 14 +-- flake.nix | 62 +++++++---- static/social_icons/peertube.svg | 0 templates/partials/footer.html | 39 +++---- templates/partials/header.html | 91 ++++++++-------- 17 files changed, 249 insertions(+), 114 deletions(-) mode change 100644 => 100755 static/social_icons/peertube.svg diff --git a/config.toml b/config.toml index 899e592..31096ea 100644 --- a/config.toml +++ b/config.toml @@ -38,21 +38,34 @@ index_format = "elasticlunr_json" [markdown] highlight_code = true +bottom_footnotes = true highlight_theme = "css" smart_punctuation = true +external_links_class = "external" [link_checker] internal_level = "warn" +skip_prefixes = [ + "https://www.vultr.com/", +] +skip_anchor_prefixes = [ + "https://github.com/", +] [extra] peertube = "https://watch.softinio.com/c/softinio/videos" twitter_meta = "SalarRahmanian" # for SEO: twitter:site and twitter:creator +fediverse_creator = { handle = "softinio", domain = "social.softinio.com"} # google = "Your Google Site verification code." # bing = "Your Bing Site verification code." # Check out the documentation (or the comments below) to learn how to customise tabi: # https://welpo.github.io/tabi/blog/mastering-tabi-settings/ +# Use sans-serif font everywhere. +# By default, the serif font is only used in articles. +override_serif_with_sans = false + # Enable JavaScript theme toggler to allow users to switch between dark/light mode. # If disabled, your site will only use the theme specified in the `default_theme` variable. theme_switcher = true @@ -82,6 +95,21 @@ browser_theme_color = "#f56a00" # You can load a stylesheet for a single post by adding it to the [extra] section of the post's front matter, following this same format. stylesheets = [] +# Remote repository for your Zola site. +# Used for `show_remote_changes` and `show_remote_source` (see below). +# Supports GitHub, GitLab, Gitea, and Codeberg. +remote_repository_url = "https://github.com/softinio/softinio.com" +# Set this to "auto" to try and auto-detect the platform based on the repository URL. +# Accepted values are "github", "gitlab", "gitea", and "codeberg". +remote_repository_git_platform = "github" # Defaults to "auto". +# Branch in the repo hosting the Zola site. +remote_repository_branch = "main" # Defaults to "main". +# Show a link to the commit history of updated posts, right next to the last updated date. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_remote_changes = true # Defaults to true. +# Show a link to the repository of the site, right next to the "Powered by Zola & tabi" text. +show_remote_source = true # Defaults to true. + # Sets the default canonical URL for all pages. # Individual pages can override this in the [extra] section using canonical_url. # Example: "$base_url/blog/post1" will get the canonical URL "https://example.com/blog/post1". @@ -92,22 +120,64 @@ stylesheets = [] # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy copy_button = true +# Make code block names clickable if they are URLs (loads ~400 bytes of JavaScript). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +code_block_name_links = false + # Show the reading time of a page. # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy show_reading_time = true -# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts). +# Show the author(s) of a page. # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy -footnote_backlinks = false +show_author = false + +# Show the date of a page below its title. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +show_date = true + +# Determines how dates are displayed in the post listing (e.g. front page or /blog). Options: +# "date" - Show only the original date of the post (default if unset). +# "updated" - Show only the last updated date of the post. If there is no last updated date, it shows the original date. +# "both" - Show both the original date and the last updated date. +post_listing_date = "date" + +# Show "Jump to posts" link next to series' title. +# By default, the link appears automatically when a series description exceeds 2000 characters. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# show_jump_to_posts = true + +# Determines if indexes should be increasing (false) or decreasing (true) in series' posts list. +# It has only effect if the section uses indexes metadata (which is only the case for series as of now). +# Can be set at section levels, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +post_listing_index_reversed = false # Defaults to false. + # Enable KaTeX for all posts. # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy katex = false +# Enable Mermaid diagrams for all posts. +# Loads ~2.5MB of JavaScript. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +mermaid = false + +# Serve Mermaid JavaScript locally. Version bundled with tabi. +# If set to false, it will load the latest version from JSDelivr. +# Only relevant when `mermaid = true`. +serve_local_mermaid = true + + # Show links to previous and next articles at the bottom of posts. # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy show_previous_next_article_links = false +# Invert order of the links to previous and next articles at the bottom of posts. +# By default, next articles are on the left side of the page and previous articles are on the right side. +# To reverse the order (next articles on the right and previous articles on the left), set it to true. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +invert_previous_next_article_links = false + # Whether the navigation for previous/next article should match the full width of the site (same as the navigation bar at the top) or the article width. # To match the navigation bar at the top, set it to true. previous_next_article_links_full_width = true @@ -137,6 +207,17 @@ separator = "•" # Compact: tag_name^n (superscript number) compact_tags = false +# How tags are sorted in a Tags listing based on templates/tags/list.html. +# "name" for alphabetical, "frequency" for descending count of posts. +# Default: "name". +tag_sorting = "name" + +# Show clickable tags above cards.html template (e.g. projects/) to filter the displayed items. +# Loads JS to filter. If JS is disabled, the buttons are links to the tag's page. +# Can be set at the section or config.toml level, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# Default: true +enable_cards_tag_filtering = true + # Invert the order of the site title and page title in the browser tab. # Example: true => "Blog • ~/tabi", false => "~/tabi • Blog" invert_title_order = false @@ -220,6 +301,10 @@ allowed_domains = [ { directive = "frame-src", domains = ["player.vimeo.com", "https://www.youtube-nocookie.com", "https://watch.softinio.com", "https://notes.softinio.com/embed"] }, ] +# Enable the CSP directives configured (or default). +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +enable_csp = true + # Custom subset of characters for the header. # If set to true, the `static/custom_subset.css` file will be loaded first. # This avoids a flashing text issue in Firefox. @@ -262,3 +347,45 @@ avatar = true voting = true page_author_hashes = "" # hash (or list of hashes) of the author. lazy_loading = true # Loads when the comments are in the viewport (using the Intersection Observer API). + +[extra.webmentions] +# To disable for a specific section or page, set webmentions = false in that page/section's front matter's [extra] section. +enable = false +# Specify the domain registered with webmention.io. +domain = "" + +# The HTML ID for the object to fill in with the webmention data. +# Defaults to "webmentions" +# id = "webmentions" + +# data configuration for the webmention.min.js script +# The base URL to use for this page. Defaults to window.location +# page_url = + +# Additional URLs to check, separated by |s +# add_urls + +# The maximum number of words to render in reply mentions. +# wordcount = 20 + +# The maximum number of mentions to retrieve. Defaults to 30. +# max_webmentions = 30 + +# By default, Webmentions render using the mf2 'url' element, which plays +# nicely with webmention bridges (such as brid.gy and telegraph) +# but allows certain spoofing attacks. If you would like to prevent +# spoofing, set this to a non-empty string (e.g. "true"). +# prevent_spoofing + +# What to order the responses by; defaults to 'published'. See +# https://github.com/aaronpk/webmention.io#api +# sort_by + +# The order to sort the responses by; defaults to 'up' (i.e. oldest +# first). See https://github.com/aaronpk/webmention.io#api +# sort_dir + +# If set to a non-empty string (e.g. "true"), will display comment-type responses +# (replies/mentions/etc.) as being part of the reactions +# (favorites/bookmarks/etc.) instead of in a separate comment list. +# comments_are_reactions = "true" diff --git a/content/about/index.md b/content/about/index.md index 0978092..1433611 100644 --- a/content/about/index.md +++ b/content/about/index.md @@ -1,7 +1,6 @@ +++ title = "About" template = "info-page.html" -path = "about" [extra] isso = false @@ -10,15 +9,14 @@ quick_navigation_buttons = true I, [Salar Rahmanian](https://www.softinio.com), am a software engineer based in San Francisco Bay Area, California. -I have been developing software since the age of eleven. My current passion is functional programming, big data and distributed systems. +I have been developing software since the age of eleven. My current passion is functional programming, big data and distributed systems. -I am particularly enthusiastic about the Scala Programming language and NixOS and technologies such as Apache Nifi, Kafka, Spark and Akka / Pekko. +I am particularly enthusiastic about the Scala Programming language and NixOS and technologies such as Apache Nifi, Kafka, Spark and Akka / Pekko. -I contribute to open source projects when time allows. +I contribute to open source projects when time allows. At work, I am currently working as a Data Engineer using spark and Databricks alot. For full details of my experience have a look at my [Resume](/resume). As a long term Vim user and Neovim fan I also have started contributing plugins written in Lua for Neovim. {{ full_width_image(src="SalarRahmanianFamily.jpg" alt="Salar Rahmanian's family photo") }} - diff --git a/content/archived/_index.md b/content/archived/_index.md index 9755d9b..72ea260 100644 --- a/content/archived/_index.md +++ b/content/archived/_index.md @@ -1,6 +1,5 @@ +++ paginate_by = 4 -path = "/archived" title = "Archived" sort_by = "date" template = "section.html" diff --git a/content/post/_index.md b/content/post/_index.md index 78ade06..f5bae9f 100644 --- a/content/post/_index.md +++ b/content/post/_index.md @@ -1,6 +1,5 @@ +++ paginate_by = 4 -path = "/post" title = "Articles" sort_by = "date" template = "section.html" diff --git a/content/projects/_index.md b/content/projects/_index.md index 4ee8429..17b40ee 100644 --- a/content/projects/_index.md +++ b/content/projects/_index.md @@ -7,4 +7,5 @@ insert_anchor_links = "left" [extra] show_reading_time = false quick_navigation_buttons = true +enable_cards_tag_filtering = true +++ diff --git a/content/projects/duck4s/index.md b/content/projects/duck4s/index.md index 281f673..2a6d243 100644 --- a/content/projects/duck4s/index.md +++ b/content/projects/duck4s/index.md @@ -4,7 +4,7 @@ description = "A modern, type-safe Scala 3 wrapper library for DuckDB." weight = 3 [taxonomies] -tags = ["Scala", "DuckDB", "Database"] +tags = ["Scala", "DuckDB", "Database", "Project"] categories = ["Project"] [extra] diff --git a/content/projects/fishee/index.md b/content/projects/fishee/index.md index 0940e8b..8eff939 100644 --- a/content/projects/fishee/index.md +++ b/content/projects/fishee/index.md @@ -4,7 +4,7 @@ description = "Fishee is a command-line interface (CLI) tool designed specifical weight = 4 [taxonomies] -tags = ["Fish Shell", "Swift", "Terminal Tools"] +tags = ["Fish Shell", "Swift", "Terminal Tools", "Project"] categories = ["Project"] [extra] diff --git a/content/projects/scaladex-nvim/index.md b/content/projects/scaladex-nvim/index.md index b0548c7..0d9008d 100644 --- a/content/projects/scaladex-nvim/index.md +++ b/content/projects/scaladex-nvim/index.md @@ -4,7 +4,7 @@ description = "Lua Library and Neovim Plugin to search scaladex for scala packag weight = 2 [taxonomies] -tags = ["Scala", "lua", "neovim"] +tags = ["Scala", "lua", "neovim", "Project"] categories = ["Project"] [extra] @@ -30,4 +30,3 @@ I then used it to create a [Neovim](https://neovim.io) plugin and [telescope.nvi - Repository: - README: - diff --git a/content/projects/scalanews/index.md b/content/projects/scalanews/index.md index 176844d..4e614d7 100644 --- a/content/projects/scalanews/index.md +++ b/content/projects/scalanews/index.md @@ -4,7 +4,7 @@ description = "Scala bloggers directory and news feed using RSS" weight = 1 [taxonomies] -tags = ["Scala", "Typelevel"] +tags = ["Scala", "Typelevel", "Project"] categories = ["Project"] [extra] diff --git a/content/projects/zio-actors/index.md b/content/projects/zio-actors/index.md index f52e39c..63397db 100644 --- a/content/projects/zio-actors/index.md +++ b/content/projects/zio-actors/index.md @@ -4,7 +4,7 @@ description = "A High performance, purely functional library for building, compo weight = 5 [taxonomies] -tags = ["actor model", "concurrency", "distributed systems", "scala", "functional programming", "zio"] +tags = ["actor model", "concurrency", "distributed systems", "scala", "functional programming", "zio", "Project"] categories = ["Project"] [extra] diff --git a/content/subscribe/index.md b/content/subscribe/index.md index 934e29b..0878315 100644 --- a/content/subscribe/index.md +++ b/content/subscribe/index.md @@ -1,10 +1,8 @@ +++ title = "Subscribe" template = "subscribe.html" -path = "subscribe" [extra] isso = false quick_navigation_buttons = true +++ - diff --git a/content/til/_index.md b/content/til/_index.md index de3da8a..172fca7 100644 --- a/content/til/_index.md +++ b/content/til/_index.md @@ -1,6 +1,5 @@ +++ paginate_by = 5 -path = "/til" title = "Things I've Learned" sort_by = "date" template = "section.html" @@ -9,4 +8,3 @@ insert_anchor_links = "left" [extra] show_previous_next_article_links = true +++ - diff --git a/flake.lock b/flake.lock index cf55e4b..dfad55a 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1707956935, - "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", "type": "github" }, "original": { @@ -25,17 +25,17 @@ "theme": { "flake": false, "locked": { - "lastModified": 1707564545, - "narHash": "sha256-m0XIxf3yKBKJwbSonAPDjw7DPHDi0BgRMhhD3FArWA4=", + "lastModified": 1749415357, + "narHash": "sha256-RAugqePumSe6nQZa7luSNNb1VGAyNjs/m9M6swWZBW0=", "owner": "welpo", "repo": "tabi", - "rev": "7e428c899b1bf595100e1448578f9cfc84ad3355", + "rev": "2e29782279d8154cb9c6f1df9a2401612ec77948", "type": "github" }, "original": { "owner": "welpo", "repo": "tabi", - "rev": "7e428c899b1bf595100e1448578f9cfc84ad3355", + "rev": "2e29782279d8154cb9c6f1df9a2401612ec77948", "type": "github" } } diff --git a/flake.nix b/flake.nix index 09ca219..bf05b09 100644 --- a/flake.nix +++ b/flake.nix @@ -3,29 +3,44 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; - theme = { - url = "github:welpo/tabi/7e428c899b1bf595100e1448578f9cfc84ad3355"; + theme = { + url = "github:welpo/tabi/2e29782279d8154cb9c6f1df9a2401612ec77948"; flake = false; }; }; - outputs = { self, nixpkgs, theme }: - let - themeName = ((builtins.fromTOML (builtins.readFile "${theme}/theme.toml")).name); - allSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; - forAllSystems = nixpkgs.lib.genAttrs allSystems; - nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); - in - { - packages = forAllSystems (system: + outputs = + { + self, + nixpkgs, + theme, + }: + let + themeName = ((builtins.fromTOML (builtins.readFile "${theme}/theme.toml")).name); + allSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forAllSystems = nixpkgs.lib.genAttrs allSystems; + nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); + in + { + packages = forAllSystems ( + system: let pkgs = nixpkgsFor.${system}; - in { + in + { default = pkgs.stdenv.mkDerivation rec { name = "softinio-${system}"; version = "0.1"; src = ./.; - nativeBuildInputs = with pkgs; [ nodePackages_latest.wrangler zola ]; + nativeBuildInputs = with pkgs; [ + nodePackages_latest.wrangler + zola + ]; configurePhase = '' mkdir -p themes ln -snf "${theme}" "themes/${themeName}" @@ -35,22 +50,29 @@ ''; installPhase = '' mkdir -p $out - cp -r public/* $out + cp -r public/* $out ''; }; - }); + } + ); - devShells = forAllSystems (system: + devShells = forAllSystems ( + system: let pkgs = nixpkgsFor.${system}; - in { + in + { default = pkgs.mkShell { - buildInputs = with pkgs; [ nodePackages_latest.wrangler zola ]; + buildInputs = with pkgs; [ + nodePackages_latest.wrangler + zola + ]; shellHook = '' mkdir -p themes ln -snf "${theme}" "themes/${themeName}" ''; }; - }); - }; + } + ); + }; } diff --git a/static/social_icons/peertube.svg b/static/social_icons/peertube.svg old mode 100644 new mode 100755 diff --git a/templates/partials/footer.html b/templates/partials/footer.html index 7b0e77c..9492093 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -2,21 +2,23 @@ {%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%} -{%- if config.markdown.external_links_target_blank -%} - {%- set blank_target = "target=_blank" -%} -{%- else -%} - {%- set blank_target = "" -%} -{%- endif -%} +{%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank) -%} + +{#- Feed icon -#} +{%- set feed_url = feed_utils::get_feed_url() -%} +{%- set should_show_feed = feed_utils::should_show_footer_feed_icon() == "true" -%} + +{%- set should_show_footer_icons = should_show_feed or config.extra.socials or config.extra.email -%}
@@ -108,4 +112,3 @@ {% include "partials/search_modal.html" %} {%- endif -%}
- diff --git a/templates/partials/header.html b/templates/partials/header.html index 48d4d06..f2bc489 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -1,5 +1,10 @@ + + {%- if macros_settings::evaluate_setting_priority(setting="enable_csp", page=page | default(value=""), section=section | default(value=""), default_global_value="true") == "true" -%} + {%- include "partials/content_security_policy.html" -%} + {%- endif -%} + @@ -11,21 +16,39 @@ {% endif %} {% if config.extra.favicon_emoji %} - + {% endif %} - {# Feed #} - + {# Feeds #} + {% if config.generate_feeds | default(value=config.generate_feed) %} + {% if config.feed_filenames %} + {# Zola 0.19 and newer #} + {% for feed in config.feed_filenames %} + {% if feed == "atom.xml" %} + + {% elif feed == "rss.xml" %} + + {% else %} + + {% endif %} + {% endfor %} + {% else %} + {# Older Zola versions #} + {% set feed_url = config.feed_filename | default(value="atom.xml") %} + + {% endif %} + {% endif %} {# CSS #} {# Load subset of glyphs for header. Avoids flashing issue in Firefox #} - {% if config.extra.custom_subset and config.extra.custom_subset == true %} - - {% elif lang == 'en' %} - - {% elif lang == 'es' %} - + {% if config.extra.enable_subset %} + {% if config.extra.custom_subset == true %} + + {% elif lang == 'en' %} + + {% elif lang == 'es' %} + + {% endif %} {% endif %} {# Define array of CSS files to load. main.css is always loaded. #} @@ -70,8 +93,8 @@ {%- elif page.summary %} - - + + {%- else %} @@ -80,47 +103,13 @@ {% if is_404 %} - {% else %} - - - - {% endif %} {# Image for social media sharing #} - {%- set social_media_card = macros_settings::evaluate_setting_priority(setting="social_media_card", page=page | default(value=""), section=section | default(value=""), default_global_value="") -%} - {% if social_media_card %} - {# Try to construct the image path relative to the current page #} - {% set colocated_path = page.colocated_path | default(value="") %} - {% set file_path = colocated_path ~ social_media_card %} - - {# Fetch metadata to verify image existence at the relative path #} - {%- set meta = get_image_metadata(path=file_path, allow_missing=true) -%} - - {# Check if relative path exists, else try absolute path #} - {% if meta %} - {% set final_path = file_path %} - {% else %} - {# If the relative path didn't work, try fetching metadata for the absolute path #} - {% set meta = get_image_metadata(path=social_media_card, allow_missing=true) %} - {% if meta %} - {% set final_path = social_media_card %} - {% else %} - {# Throw an error if the image doesn't exist at either path #} - {{ throw(message="Could not get metadata for the specified social media card image in page " ~ page.path ~ ". Attempted relative path: '" ~ file_path ~ "' and absolute path: '" ~ social_media_card ~ "'. Ensure the file exists at one of these locations.") }} - {% endif %} - {% endif %} - - {# Generate the social media meta tags #} - - - - - - {% endif %} + {%- include "partials/social_media_images.html" -%} {# Add og:locale and hreflang tags for multilingual sites #} {%- if config.languages | length > 0 and current_url %} @@ -149,8 +138,6 @@ - {%- include "partials/content_security_policy.html" -%} - {%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%} {# If JavaScript is disabled, hide the button. #} @@ -162,6 +149,11 @@ {%- include "partials/analytics.html" -%} {%- endif -%} + {# Socials #} + {%- if config.extra.fediverse_creator -%} + + {%- endif -%} + {# Search #} {%- if config.build_search_index -%} {%- if config.search.index_format -%} @@ -191,4 +183,3 @@ {%- include "partials/custom_header.html" -%} - From b085cb0ab64237be9b68aca9854e31e37614988e Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 10:24:41 -0700 Subject: [PATCH 2/9] update image permissions --- static/social_icons/peertube.svg | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 static/social_icons/peertube.svg diff --git a/static/social_icons/peertube.svg b/static/social_icons/peertube.svg old mode 100755 new mode 100644 From 0b571eeefda605214856caeef641d7d729e0420a Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 11:13:28 -0700 Subject: [PATCH 3/9] remove duplicate icons and add bluesky to social links --- config.toml | 3 ++- static/social_icons/git.svg | 1 - static/social_icons/peertube.svg | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 static/social_icons/git.svg delete mode 100644 static/social_icons/peertube.svg diff --git a/config.toml b/config.toml index 31096ea..c3c579c 100644 --- a/config.toml +++ b/config.toml @@ -261,12 +261,13 @@ socials = [ { name = "mastodon", url = "https://social.softinio.com/@softinio", icon = "mastodon" }, { name = "x", url = "https://x.com/SalarRahmanian", icon = "x" }, { name = "linkedin", url = "https://www.linkedin.com/in/salarrahmanian/", icon = "linkedin" }, - { name = "git", url = "https://code.softinio.com/softinio", icon = "git" }, + { name = "forgejo", url = "https://code.softinio.com/softinio", icon = "forgejo" }, { name = "github", url = "https://github.com/softinio/", icon = "github" }, { name = "codeberg", url = "https://codeberg.org/softinio", icon = "codeberg" }, { name = "twitch", url = "https://www.twitch.tv/softinio", icon = "twitch" }, { name = "peertube", url = "https://watch.softinio.com/c/softinio/videos", icon = "peertube" }, { name = "youtube", url = "https://www.youtube.com/@Salar_Rahmanian", icon = "youtube" }, + { name = "bluesky", url = "https://bsky.app/profile/salarrahmanian.bsky.social", icon = "bluesky" }, ] # Extra menu to show on the footer, below socials section. diff --git a/static/social_icons/git.svg b/static/social_icons/git.svg deleted file mode 100644 index 6b6a26a..0000000 --- a/static/social_icons/git.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/static/social_icons/peertube.svg b/static/social_icons/peertube.svg deleted file mode 100644 index 0e6e228..0000000 --- a/static/social_icons/peertube.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 08117969149a148fa2056e0d3d930459d7c17c52 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 11:21:48 -0700 Subject: [PATCH 4/9] Flake update --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index dfad55a..87e42fa 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1749285348, - "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", + "lastModified": 1749794982, + "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", + "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", "type": "github" }, "original": { From feb58d1fca59872c40d736cd6ed3b10062b14940 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 11:35:44 -0700 Subject: [PATCH 5/9] update cloudflare config to include output directory --- wrangler.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrangler.toml b/wrangler.toml index ca07018..254213f 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,3 +1,3 @@ name = "softinio" +pages_build_output_dir = "./dist" route = { pattern = "https://www.softinio.com", custom_domain = true } - From d37819d6f30a91d4c02de559253cb192f023435b Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 11:42:10 -0700 Subject: [PATCH 6/9] switch to using determinate systems gha for ci --- .github/workflows/deploy.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e485e37..fb20c99 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,25 +15,13 @@ jobs: uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v31 - with: - nix_path: nixpkgs=channel:nixos-unstable + uses: DeterminateSystems/determinate-nix-action@v3 - - name: Setup Nix store cache - uses: actions/cache@v4 - with: - path: /nix/store - key: ${{ runner.os }}-nix-store-${{ hashFiles('**/flake.lock') }} - restore-keys: | - ${{ runner.os }}-nix-store- + - name: Setup FlakeHub Cache + uses: DeterminateSystems/flakehub-cache-action@main - - name: Cache flake inputs - uses: actions/cache@v4 - with: - path: ~/.cache/nix - key: ${{ runner.os }}-nix-flake-${{ hashFiles('**/flake.lock') }} - restore-keys: | - ${{ runner.os }}-nix-flake- + - name: Check Nix flake + uses: DeterminateSystems/nix-flake-checker-action@main - name: Build site (pull request) if: github.event_name == 'pull_request' From 75329b7d63fca90ab1ffcd43cfabea2ee8e9b14e Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 11:43:48 -0700 Subject: [PATCH 7/9] correction to action name --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fb20c99..fdf6907 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: uses: DeterminateSystems/flakehub-cache-action@main - name: Check Nix flake - uses: DeterminateSystems/nix-flake-checker-action@main + uses: DeterminateSystems/flake-checker-action@main - name: Build site (pull request) if: github.event_name == 'pull_request' From 1c5505ece5ca0464f4a3e00188fe4af88123d5be Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 11:57:27 -0700 Subject: [PATCH 8/9] remove route from cloudflare config and replace determinate cache with github own one --- .github/workflows/deploy.yml | 14 +++++++++----- wrangler.toml | 1 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fdf6907..f880cf5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,11 +17,15 @@ jobs: - name: Install Nix uses: DeterminateSystems/determinate-nix-action@v3 - - name: Setup FlakeHub Cache - uses: DeterminateSystems/flakehub-cache-action@main - - - name: Check Nix flake - uses: DeterminateSystems/flake-checker-action@main + - name: Setup Nix store cache + uses: actions/cache@v4 + with: + path: | + ~/.cache/nix + ~/nix-store-cache + key: ${{ runner.os }}-nix-${{ hashFiles('flake.lock') }} + restore-keys: | + ${{ runner.os }}-nix- - name: Build site (pull request) if: github.event_name == 'pull_request' diff --git a/wrangler.toml b/wrangler.toml index 254213f..c751984 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,3 +1,2 @@ name = "softinio" pages_build_output_dir = "./dist" -route = { pattern = "https://www.softinio.com", custom_domain = true } From 632d16313054b1d5b3c3477693faab0e85e27399 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 14 Jun 2025 12:03:48 -0700 Subject: [PATCH 9/9] replace determinate nix with usual one I use --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f880cf5..35ea24a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,8 +14,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/determinate-nix-action@v3 + - uses: cachix/install-nix-action@v31 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Nix store cache uses: actions/cache@v4