diff --git a/content/posts/command-line-flake-arguments/index.md b/content/posts/command-line-flake-arguments/index.md index ecdf7e7..d360533 100644 --- a/content/posts/command-line-flake-arguments/index.md +++ b/content/posts/command-line-flake-arguments/index.md @@ -13,7 +13,7 @@ heroPrompt = "A rogue program hacking through the firewall, in the style of Tron > While many readers will be very familiar with the concept of a function and the idea of parameterizing some piece of code or data, others might appreciate a bit of background. [Take a look at the appendix for a tangential explainer of some fundamental ideas referenced throughout this post.](#appendix) -
+
From outside of a flake's Nix expression, the flake is a black box, a mapping from its input sources to the artifacts that it outputs. There is no built-in way to pass an arbitrary value, a boolean flag or string, from the command line in order to override a deeply nested configuration embedded in your flake. In most cases, this is fine, and you can work around many apparent needs for a one off override by building separate outputs for different purposes. Your flakes will probably come out better designed if you can use them strictly as intended. diff --git a/templates/atom.xml b/templates/atom.xml index 5b6fb2b..57614ed 100644 --- a/templates/atom.xml +++ b/templates/atom.xml @@ -1,3 +1,4 @@ +{% import "macros/macros.html" as post_macros %} {{ config.title }} @@ -8,28 +9,36 @@ {%- if config.description %} <subtitle>{{ config.description }}</subtitle> {%- endif %} + <author> + <name>mat ess</name> + <email>mat@mat.services</email> + <uri>https://www.mat.services</uri> + </author> <link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/> - <link href=" - {%- if section -%} - {{ section.permalink | escape_xml | safe }} - {%- else -%} - {{ config.base_url | escape_xml | safe }} - {%- endif -%} - "/> + <icon>{{ get_url(path="/images/favicon.svg") }}</icon> + <rights>© 2022 mat ess</rights> <generator uri="https://www.getzola.org/">Zola</generator> <updated>{{ last_updated | date(format="%+") }}</updated> <id>{{ feed_url | safe }}</id> {%- for page in pages %} {%- if page.draft %} {% continue %} - {% endif -%} + {% endif %} <entry xml:lang="{{ page.lang }}"> <title>{{ page.title }} {{ page.date | date(format="%+") }} {{ page.updated | default(value=page.date) | date(format="%+") }} {{ page.permalink | safe }} - {{ page.content }} + + + + + {{ page.content }} + - {%- endfor %} + {% endfor %} \ No newline at end of file diff --git a/templates/macros/macros.html b/templates/macros/macros.html index b17c694..c23790b 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -63,14 +63,7 @@
{% endif -%} - {%- if page.extra.hero %} -
- {{ page.extra.heroPrompt }} - generated using Stable Diffusion -
-

{{ page.extra.heroPrompt }} - generated using Stable Diffusion

-
-
- {% endif -%} + {{ post_macros::hero(page=page) }} {%- if page.extra.tldr %}
tl;dr: @@ -126,4 +119,15 @@
{% endif -%} -{% endmacro content -%} \ No newline at end of file +{% endmacro content -%} + +{% macro hero(page) %} +{%- if page.extra.hero %} +
+ {{ page.extra.heroPrompt }} - generated using Stable Diffusion +
+

{{ page.extra.heroPrompt }} - generated using Stable Diffusion

+
+
+{% endif -%} +{% endmacro hero -%}