diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 35ea24a..e485e37 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,19 +14,26 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v31 + - name: Install Nix + uses: cachix/install-nix-action@v31 with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + nix_path: nixpkgs=channel:nixos-unstable - name: Setup Nix store cache uses: actions/cache@v4 with: - path: | - ~/.cache/nix - ~/nix-store-cache - key: ${{ runner.os }}-nix-${{ hashFiles('flake.lock') }} + path: /nix/store + key: ${{ runner.os }}-nix-store-${{ hashFiles('**/flake.lock') }} restore-keys: | - ${{ runner.os }}-nix- + ${{ runner.os }}-nix-store- + + - 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: Build site (pull request) if: github.event_name == 'pull_request' diff --git a/config.toml b/config.toml index c3c579c..899e592 100644 --- a/config.toml +++ b/config.toml @@ -38,34 +38,21 @@ 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 @@ -95,21 +82,6 @@ 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". @@ -120,64 +92,22 @@ show_remote_source = true # Defaults 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 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 -# Show the author(s) of a page. +# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts). # 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_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. - +footnote_backlinks = 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 @@ -207,17 +137,6 @@ 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 @@ -261,13 +180,12 @@ 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 = "forgejo", url = "https://code.softinio.com/softinio", icon = "forgejo" }, + { name = "git", url = "https://code.softinio.com/softinio", icon = "git" }, { 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. @@ -302,10 +220,6 @@ 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. @@ -348,45 +262,3 @@ 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 1433611..0978092 100644 --- a/content/about/index.md +++ b/content/about/index.md @@ -1,6 +1,7 @@ +++ title = "About" template = "info-page.html" +path = "about" [extra] isso = false @@ -9,14 +10,15 @@ 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 72ea260..9755d9b 100644 --- a/content/archived/_index.md +++ b/content/archived/_index.md @@ -1,5 +1,6 @@ +++ 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 f5bae9f..78ade06 100644 --- a/content/post/_index.md +++ b/content/post/_index.md @@ -1,5 +1,6 @@ +++ 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 17b40ee..4ee8429 100644 --- a/content/projects/_index.md +++ b/content/projects/_index.md @@ -7,5 +7,4 @@ 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 2a6d243..281f673 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", "Project"] +tags = ["Scala", "DuckDB", "Database"] categories = ["Project"] [extra] diff --git a/content/projects/fishee/index.md b/content/projects/fishee/index.md index 8eff939..0940e8b 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", "Project"] +tags = ["Fish Shell", "Swift", "Terminal Tools"] categories = ["Project"] [extra] diff --git a/content/projects/scaladex-nvim/index.md b/content/projects/scaladex-nvim/index.md index 0d9008d..b0548c7 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", "Project"] +tags = ["Scala", "lua", "neovim"] categories = ["Project"] [extra] @@ -30,3 +30,4 @@ 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 4e614d7..176844d 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", "Project"] +tags = ["Scala", "Typelevel"] categories = ["Project"] [extra] diff --git a/content/projects/zio-actors/index.md b/content/projects/zio-actors/index.md index 63397db..f52e39c 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", "Project"] +tags = ["actor model", "concurrency", "distributed systems", "scala", "functional programming", "zio"] categories = ["Project"] [extra] diff --git a/content/subscribe/index.md b/content/subscribe/index.md index 0878315..934e29b 100644 --- a/content/subscribe/index.md +++ b/content/subscribe/index.md @@ -1,8 +1,10 @@ +++ 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 172fca7..de3da8a 100644 --- a/content/til/_index.md +++ b/content/til/_index.md @@ -1,5 +1,6 @@ +++ paginate_by = 5 +path = "/til" title = "Things I've Learned" sort_by = "date" template = "section.html" @@ -8,3 +9,4 @@ insert_anchor_links = "left" [extra] show_previous_next_article_links = true +++ + diff --git a/flake.lock b/flake.lock index 87e42fa..cf55e4b 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1749794982, - "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", + "lastModified": 1707956935, + "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", + "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", "type": "github" }, "original": { @@ -25,17 +25,17 @@ "theme": { "flake": false, "locked": { - "lastModified": 1749415357, - "narHash": "sha256-RAugqePumSe6nQZa7luSNNb1VGAyNjs/m9M6swWZBW0=", + "lastModified": 1707564545, + "narHash": "sha256-m0XIxf3yKBKJwbSonAPDjw7DPHDi0BgRMhhD3FArWA4=", "owner": "welpo", "repo": "tabi", - "rev": "2e29782279d8154cb9c6f1df9a2401612ec77948", + "rev": "7e428c899b1bf595100e1448578f9cfc84ad3355", "type": "github" }, "original": { "owner": "welpo", "repo": "tabi", - "rev": "2e29782279d8154cb9c6f1df9a2401612ec77948", + "rev": "7e428c899b1bf595100e1448578f9cfc84ad3355", "type": "github" } } diff --git a/flake.nix b/flake.nix index bf05b09..09ca219 100644 --- a/flake.nix +++ b/flake.nix @@ -3,44 +3,29 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; - theme = { - url = "github:welpo/tabi/2e29782279d8154cb9c6f1df9a2401612ec77948"; + theme = { + url = "github:welpo/tabi/7e428c899b1bf595100e1448578f9cfc84ad3355"; 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}" @@ -50,29 +35,22 @@ ''; 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/git.svg b/static/social_icons/git.svg new file mode 100644 index 0000000..6b6a26a --- /dev/null +++ b/static/social_icons/git.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/peertube.svg b/static/social_icons/peertube.svg new file mode 100644 index 0000000..0e6e228 --- /dev/null +++ b/static/social_icons/peertube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/partials/footer.html b/templates/partials/footer.html index 9492093..7b0e77c 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -2,23 +2,21 @@ {%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%} -{%- 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 -%} +{%- if config.markdown.external_links_target_blank -%} + {%- set blank_target = "target=_blank" -%} +{%- else -%} + {%- set blank_target = "" -%} +{%- endif -%}
@@ -112,3 +108,4 @@ {% include "partials/search_modal.html" %} {%- endif -%}
+ diff --git a/templates/partials/header.html b/templates/partials/header.html index f2bc489..48d4d06 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -1,10 +1,5 @@ - - {%- 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 -%} - @@ -16,39 +11,21 @@ {% endif %} {% if config.extra.favicon_emoji %} - + {% endif %} - {# 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 %} + {# Feed #} + {# CSS #} {# Load subset of glyphs for header. Avoids flashing issue in Firefox #} - {% if config.extra.enable_subset %} - {% if config.extra.custom_subset == true %} - - {% elif lang == 'en' %} - - {% elif lang == 'es' %} - - {% endif %} + {% if config.extra.custom_subset and config.extra.custom_subset == true %} + + {% elif lang == 'en' %} + + {% elif lang == 'es' %} + {% endif %} {# Define array of CSS files to load. main.css is always loaded. #} @@ -93,8 +70,8 @@ {%- elif page.summary %} - - + + {%- else %} @@ -103,13 +80,47 @@ {% if is_404 %} + {% else %} + + + + {% endif %} {# Image for social media sharing #} - {%- include "partials/social_media_images.html" -%} + {%- 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 %} {# Add og:locale and hreflang tags for multilingual sites #} {%- if config.languages | length > 0 and current_url %} @@ -138,6 +149,8 @@ + {%- include "partials/content_security_policy.html" -%} + {%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%} {# If JavaScript is disabled, hide the button. #} @@ -149,11 +162,6 @@ {%- include "partials/analytics.html" -%} {%- endif -%} - {# Socials #} - {%- if config.extra.fediverse_creator -%} - - {%- endif -%} - {# Search #} {%- if config.build_search_index -%} {%- if config.search.index_format -%} @@ -183,3 +191,4 @@ {%- include "partials/custom_header.html" -%} + diff --git a/wrangler.toml b/wrangler.toml index c751984..ca07018 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,2 +1,3 @@ name = "softinio" -pages_build_output_dir = "./dist" +route = { pattern = "https://www.softinio.com", custom_domain = true } +