diff options
| author | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2025-08-28 02:36:37 +0300 |
|---|---|---|
| committer | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2025-08-28 02:36:37 +0300 |
| commit | e27f950fdf93ccd05f06e3065c015cb5d41763ef (patch) | |
| tree | 4b6217b5849981988b142aa0c02c62cf74ce96fa | |
| parent | 91627c2d531a34ae032141af4e18bb1bd8619125 (diff) | |
Massive changes to:
- meta tags
- opacity levels
- pagespeed optimization
- enabled more configs, preparing for search functionality
Changes to be committed:
modified: config.toml
modified: content/about.md
modified: content/posts/rust.md
modified: sass/_predefined.scss
modified: templates/index.html
| -rw-r--r-- | config.toml | 8 | ||||
| -rw-r--r-- | content/about.md | 2 | ||||
| -rw-r--r-- | content/posts/rust.md | 6 | ||||
| -rw-r--r-- | sass/_predefined.scss | 2 | ||||
| -rw-r--r-- | templates/index.html | 90 |
5 files changed, 73 insertions, 35 deletions
diff --git a/config.toml b/config.toml index bce794b..362ad9c 100644 --- a/config.toml +++ b/config.toml @@ -64,7 +64,7 @@ external_links_target_blank = false # Whether to set rel="nofollow" for all external links external_links_no_follow = false -# Whether to set rel="noreferrer" for all external links +# Whether to set rel="noreferrer" for all external links (privacy preserving) external_links_no_referrer = true # Whether smart punctuation is enabled (changing quotes, dashes, dots in their typographic form) @@ -117,11 +117,7 @@ email = "iustin@alphara.art" [extra.meta] -website_type = "blog" # either "blog" or "article" - I haven't seen any difference though - -keywords = "blog, technology, science, philosophy, mathematics, artificial intelligence, AI research, machine learning, data science, deep learning, neural networks, Linux, Void Linux, OpenBSD, system administration, open source, FOSS, developer tools, programming, coding, tutorials, programming languages, software development, software engineering, computer science, algorithms, cybersecurity" - -preview_image_src = "https://alphara.art/Alphara.png" +preview_image_src = "Alphara.png" preview_image_alt = "Alphara" twitter_card = "summary_large_image" # either "summary" or "summary_large_image" (for big preview image) diff --git a/content/about.md b/content/about.md index edb41be..8db90ce 100644 --- a/content/about.md +++ b/content/about.md @@ -17,4 +17,4 @@ Here you'll see the following general topics: I'm pretty much sticking to these. Feel free to contact me if you want to. -
\ No newline at end of file + diff --git a/content/posts/rust.md b/content/posts/rust.md index 9ed9ca3..737611f 100644 --- a/content/posts/rust.md +++ b/content/posts/rust.md @@ -1,5 +1,6 @@ +++ title = "Rust For 1 Week" +description = "My first impressions and learning journey after spending a week with the Rust programming language." date = 2025-07-30 draft = false @@ -7,6 +8,11 @@ draft = false tags = ["programming"] [extra] +# You can optionally add a specific image for social media previews +# If you don't add this, it will use the site-wide default from your config.toml +image_src = "images/20250730210132.png" +image_alt = "A table from the Rust book showing error types" + math = false disable_comments = true toc = false diff --git a/sass/_predefined.scss b/sass/_predefined.scss index 3ef8a06..b12d67d 100644 --- a/sass/_predefined.scss +++ b/sass/_predefined.scss @@ -27,7 +27,7 @@ $code-fonts: Consolas, "Andale Mono WT", "Andale Mono", Menlo, Monaco, // Mixins // @mixin dimmed { - opacity: 0.7; + opacity: 1; } @mixin aTag { diff --git a/templates/index.html b/templates/index.html index c968941..b8af3c2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,37 +10,72 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta http-equiv="X-UA-Compatible" content="ie=edge"/> + {% set page_title = page.title | default(value=config.title) %} + {% set page_description = page.description | default(value=config.description) %} + {% set page_url = page.permalink | default(value=config.base_url) %} + {% set page_image_src = page.extra.image_src | default(value=config.extra.meta.preview_image_src) %} + {% set page_image_alt = page.extra.image_alt | default(value=config.extra.meta.preview_image_alt) %} + + <title>{{ page_title }}</title> + + {% set canonical_url = config.base_url %} + {% if page %} + {% set canonical_url = page.permalink %} + {% elif section %} + {% set canonical_url = section.permalink %} + {% elif term %} + {% set canonical_url = term.permalink %} + {% endif %} + <link rel="canonical" href="{{ canonical_url }}"> + <!-- Instructions for web crawlers --> <meta name="robots" content="index, follow"> - - <!--- Below are the meta tags that are important for SEO \\ they are also important for social media sharing embeds ---> - <meta name="description" content="{{ config.description }}"> - <meta name="keywords" content="{{ config.extra.meta.keywords }}"> - <meta name="title" content="{{ config.title }}"> + <meta name="description" content="{{ page_description }}"> <meta name="author" content="{{ config.extra.author.name }}"> + + <!--- Many websites use Open Graph so it has become standard to include ---> - <meta property="og:title" content="{{ config.title }}"> + <meta property="og:title" content="{{ page_title }}"> <meta property="og:site_name" content="{{ config.title }}"> - <meta property="og:description" content="{{ config.description }}"> - <meta property="og:image" content="{{ config.extra.meta.preview_image_src }}"> - <meta property="og:image:alt" content="{{ config.extra.meta.preview_image_alt }}"> + <meta property="og:description" content="{{ page_description }}"> + <meta property="og:image" content="{{ get_url(path=page_image_src) }}"> + <meta property="og:image:alt" content="{{ page_image_alt }}"> + + <meta property="og:url" content="{{ page_url }}"> + <meta property="og:type" content="{% if page %}article{% else %}website{% endif %}"> + + {# --- START: Add Rich Article Data (if it's a page) --- #} + {% if page %} + {# Published time in the required ISO 8601 format #} + <meta property="article:published_time" content="{{ page.date | date(format="%+") }}"> + + {# Author's name #} + <meta property="article:author" content="{{ config.extra.author.name }}"> + + {# Loop through all the tags for this page #} + {% if page.taxonomies and page.taxonomies.tags %} + {% for tag in page.taxonomies.tags %} + <meta property="article:tag" content="{{ tag }}"> + {% endfor %} + {% endif %} + {% endif %} + {# --- END: Rich Article Data --- #} + - <meta property="og:url" content="{{ config.base_url }}"> - <meta property="og:type" content="{{ config.extra.meta.website_type }}"> <!--- Below is for twitter general info ---> <meta name="twitter:domain" content="{{ config.base_url }}"> - <meta name="twitter:description" content="{{ config.description }}"> - <meta name="twitter:title" content="{{ config.title }}"> + <meta name="twitter:description" content="{{ page_description }}"> + <meta name="twitter:title" content="{{ page_title }}"> <!--- Below is for twitter sharing previews \\ you can test this at https://threadcreator.com/tools/twitter-card-validator ---> <meta name="twitter:card" content="{{ config.extra.meta.twitter_card }}"> - <meta name="twitter:image" content="{{ config.extra.meta.preview_image_src }}"> - <meta name="twitter:image:src" content="{{ config.extra.meta.preview_image_src }}"> - <meta name="twitter:image:alt" content="{{ config.extra.meta.preview_image_alt }}"> + <meta name="twitter:image" content="{{ get_url(path=page_image_src) }}"> + <meta name="twitter:image:src" content="{{ get_url(path=page_image_src) }}"> + <meta name="twitter:image:alt" content="{{ page_image_alt }}"> <!--- If you have accounts on twitter that are relevant to your site ---> <meta name="twitter:site" content="{{ config.extra.meta.twitter_creator }}"> @@ -53,17 +88,22 @@ <link rel="icon" type="image/png" sizes="32x32" href="{{ get_url(path="favicon-32x32.png") }}"/> <link rel="icon" type="image/png" sizes="16x16" href="{{ get_url(path="favicon-16x16.png") }}"/> - <!-- <link rel="manifest" href="{{ get_url(path="site.webmanifest") }}"> PWA + android manifest --> + <link rel="shortcut icon" href="{{ get_url(path="favicon.ico") }}"/> + <link rel="mask-icon" href="{{ get_url(path="safari-pinned-tab.svg") }}" color="#030303"> <meta name="msapplication-TileColor" content="#603cba"> - <!-- <meta name="theme-color" content="#ffffff"> discord fancy ruler line on the left of link preview embeds --> - <link rel="shortcut icon" href="{{ get_url(path="favicon.ico") }}"/> + <!--PWA + android manifest--> + <link rel="manifest" href="{{ get_url(path="site.webmanifest") }}"> + + <!--discord fancy ruler line on the left of link preview embeds--> + <meta name="theme-color" content="#828ff9"> <!-- #ace6f0 #828ff9 #e94c80 --> + + <!-- Stylesheets --> <!--<link rel="stylesheet" href="{{ get_url(path="style.css") }}"/> old way of doing this, inefficient --> - {# 1. Load our single combined critical CSS file. #} {% set critical_css = load_data(path="static/css/critical.css", required=false) %} @@ -79,19 +119,15 @@ <noscript><link rel="stylesheet" href="{{ get_url(path='style.css') }}"></noscript> <!-- Stylesheets End --> + + {% if page.extra.math %} <!-- Math rendering with KaTeX --> <link rel="stylesheet" href="{{ get_url(path="katex/katex.min.css") }}"> {% endif %} - {% if page.title %} - <title>{{ page.title }}</title> - {% else %} - <title>{{ config.title }}</title> - {% endif %} - {% if config.generate_feeds %} - <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path=config.feed_filenames[0], trailing_slash=false) }}"> + <link rel="alternate" type="application/atom+xml" title="Atom Feed" href="{{ get_url(path=config.feed_filenames[0], trailing_slash=false) }}"> {% endif %} </head> |
