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" -%} -