summaryrefslogtreecommitdiff
path: root/source/_includes
diff options
context:
space:
mode:
Diffstat (limited to 'source/_includes')
-rw-r--r--source/_includes/footer.html4
-rw-r--r--source/_includes/image.html14
-rw-r--r--source/_includes/preamble.html2
3 files changed, 12 insertions, 8 deletions
diff --git a/source/_includes/footer.html b/source/_includes/footer.html
index d91d3d5..b3679e8 100644
--- a/source/_includes/footer.html
+++ b/source/_includes/footer.html
@@ -1,7 +1,7 @@
<hr>
<div class="footl noha">
-&copy; Marcus R.A. Newman,
-<a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>.
+&copy; 2023 Marcus R.A. Newman,
+<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>.
</div>
<div class="footr noha">
<a href="https://prefetch.goatcounter.com/">Visitor statistics</a>
diff --git a/source/_includes/image.html b/source/_includes/image.html
index 5b4f35f..df13976 100644
--- a/source/_includes/image.html
+++ b/source/_includes/image.html
@@ -2,6 +2,8 @@
{% assign name = name_dot_format | first %}
{% assign format = name_dot_format | last %}
+{% assign version = include.version | default: "1" %}
+
{% comment %} Let 'suffix' = last 4 chars of 'name', 'prefix' = the rest {% endcomment %}
{% assign suffix = name | slice: -4, 4 %}
{% assign rname = name | split: "" | reverse | join: "" %}
@@ -27,14 +29,16 @@
{% assign add_style = 'style="' | append: set_style | append: '"' %}
{% endif %}
<p>
-<a href="{{ name_full }}.{{ format }}">
+<a href="{{ name_full }}.{{ format }}?v={{ version }}">
<picture>
- <source srcset="{{ name_half }}.avif" type="image/avif">
+ <source srcset="{{ name_half }}.avif?v={{ version }}" type="image/avif">
{% if name_full == name_half %}
- <img src="{{ name_half }}.{{ format }}" {{ add_class }} {{ add_style }} alt="{{ include.alt }}" title="{{ include.alt }}">
+ <img src="{{ name_half }}.{{ format }}?v={{ version }}" {{ add_class }} {{ add_style }}
+ alt="{{ include.alt }}" title="{{ include.alt }}">
{% else %}
- <source srcset="{{ name_half }}.webp" type="image/webp">
- <img src="{{ name_half }}.jpg" {{ add_class }} {{ add_style }} alt="{{ include.alt }}" title="{{ include.alt }}">
+ <source srcset="{{ name_half }}.webp?v={{ version }}" type="image/webp">
+ <img src="{{ name_half }}.jpg?v={{ version }}" {{ add_class }} {{ add_style }}
+ alt="{{ include.alt }}" title="{{ include.alt }}">
{% endif %}
</picture>
</a>
diff --git a/source/_includes/preamble.html b/source/_includes/preamble.html
index 7b57115..4d3c92f 100644
--- a/source/_includes/preamble.html
+++ b/source/_includes/preamble.html
@@ -19,6 +19,6 @@
{% endif %}
<link rel="stylesheet" href="/infra/css/main.css?v=20221119">
-{% if jekyll.environment != "development" %}
+{% if jekyll.environment == "production" %}
<script data-goatcounter="https://prefetch.goatcounter.com/count" async src="/infra/js/count.js?v=20221103"></script>
{% endif %}