<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>mortendk: 11ty</title><subtitle>mortendk webdesigner</subtitle><link href="https://morten.dk/feed.xml" rel="self" /><generator uri="https://saga11.dev">Saga11</generator><logo>https://morten.dk/img/73PAbKsiV4-144w.png</logo><icon>https://morten.dk/img/73PAbKsiV4-144w.png</icon><updated>2025-01-28T10:46:49Z</updated><id>https://morten.dk/tag/11ty</id><author><name>mortendk</name><email></email></author><entry><title>Eleventy hub</title><link href="https://morten.dk/post/eleventy-hub/" /><summary> Today i hacked together an rss feed reader / parser build with 11ty </summary><updated>2025-01-28T10:46:49Z</updated><id>/post/eleventy-hub/</id><content type="html"><![CDATA[<img alt="" loading="lazy" class="" decoding="async" src="/img/Bl7GKr012S-800w.webp" width="800" height="533">]]>

      The eleventy world is slowly growing a small little flatfile builder is growing with developers that seems to have the same idea of how we want our websites to be with 100% markup control and superfast. T his have also kinda kickstarted my own move back towards the old days...


    </content></entry><entry><title>From Nunjucks to liquid</title><link href="https://morten.dk/post/from-nunjucks-to-liquid/" /><summary> While working on the Saga11 project a SSG built on 11ty &amp;amp; DecapCMS, I made the transition from Nunjucks to Liquid for the templates. I found Nunjucks to be a bit outdated, whereas Liquid is widely used and supported by Shopify (caching) simplifying the number of template languages I have to rememberIt’s not that difficult to remember {{ var | filter }}, but it’s still another flavor. Moreover, as far as I know, Liquid is now the default template language in Eleventy.{% for item in collections.foo %}  {{ forloop.index }}  {{ item.data.title }}{% endfor %}Liquid &amp;gt; Custom functionsPreviously, if I needed to do some magic with a collection in Nunjucks, I had to write a eleventyConfig.addCollection() in the eleventy.config.js file. However, with Liquid, I can avoid context shifting when deeply involved in the markup. It was frustrating to create special collections each time, or perhaps I overlooked something in the Nunjucks documentation ? Selecting and outputting data from collections.all is straightforward with plain Liquid.Queries in 11ty CollectionsNow, data queries have become much simpler. For example, to retrieve all content tagged with “foo” and having a title containing “superduper,” limited to the last 2 items:{% assign value = &#34;superduper&#34; %}{% assign items = collections.foo | where: &#34;data.title&#34;, value %}{% for item in items reversed limit: 2 %}&amp;lt;article&gt;  &amp;lt;h3&gt;{{ item.data.title }}&amp;lt;/h3&gt;  &amp;lt;p&gt;{{ item.templateContent }}&amp;lt;/p&gt;&amp;lt;/article&gt;{% endfor %}I feel like a complete badass, effortlessly grabbing and manipulating data in templates.Headaches after changing to liquidMy biggest issue so far is that eleventys liquid implementation dosnt yet support named arguments and to rember the syntax have changed a bit.{{ nunjucks | replace(&#34;foo&#34;, &#34;bar&#34;) }}{{ liquid | replace: &#34;foo&#34;, &#34;bar&#34; }}The good thing is that if a plugin requires the named syntax, you can temporarily fix it with the render plugin and change the template language whenever it’s needed, as I had to do with the Eleventy Favicon Generation plugin.{% renderTemplate &#34;njk&#34;%}  {% set icon = &#34;src/_system/icon.png&#34; %}  {% favicons icon, appleIconBgColor=&#34;#bada55&#34;, appleIconPadding=10, generateManifest=false %}{% endrenderTemplate %}ResourcesNunjucks Documentationliquidjs.comshopify.github.io/liquidShopify Cheat Sheet </summary><updated>2025-01-28T10:46:49Z</updated><id>/post/from-nunjucks-to-liquid/</id><content type="html"><![CDATA[<img alt="" loading="lazy" class="" decoding="async" src="/img/NiuPLRKvrt-800w.webp" width="800" height="354">]]>

      While working on the Saga11 project a SSG built on 11ty &amp; DecapCMS, I made the transition from Nunjucks to Liquid for the templates. I found Nunjucks to be a bit outdated, whereas Liquid is widely used and supported by Shopify (caching) simplifying the number of template languages I have...


    </content></entry><entry><title>Har pc signet jordan Larsson ?</title><link href="https://morten.dk/post/har-pc-signet-jordan-larsson/" /><summary>  Hvordan et website som leverde “gode råd” til fc københavns sportsdirektør  endte som en  præsentations video da klubben &amp; Jordan Larsson  fik papir på hinanden. En case for Web og socialemedier og bruge hinandens forcer. </summary><updated>2025-01-28T10:46:49Z</updated><id>/post/har-pc-signet-jordan-larsson/</id><content type="html"><![CDATA[<img alt="" loading="lazy" class="" decoding="async" src="/img/FX9JjvGzeO-800w.webp" width="800" height="450">]]>

      Jordan billed: Lars Ronborg Web vs Social Media ? Kan web egentligt noget i forhold til lukkede netværk som Facebook, Instagram, TikTok osv.? Web er langsommere, det kræver lidt at publicere, det er “gammelt” og lidt usexet tech som HTML, CSS &amp; Javascript. Sociale medier er fantastiske til at skabe...


    </content></entry></feed>
