<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://pid.brain.run/">
  <title>pid.brain.run</title>
  <subtitle>A place to spotlight attempts into faris&#39;s foray into the world of &#39;AI&#39;</subtitle>
  <link href="https://pid.brain.run/feed.xml" rel="self" />
  <link href="https://pid.brain.run/" />
  
  <updated>2023-01-25T00:00:00Z</updated>
  <id>https://pid.brain.run/</id>
  <author>
    <name>Faris Chebib</name>
    <email>faris+ai@theluckybead.com</email>
  </author>
  <entry>
    <title>Open Graph images</title>
    <link href="https://pid.brain.run/blog/open-graph-images/" />
    <updated>2023-01-25T00:00:00Z</updated>
    <id>https://pid.brain.run/blog/open-graph-images/</id>
    <content
      xml:lang=""
      type="html"
      >&lt;p&gt;When you share your blog posts, a thumbnail image may appear - the image we define in our meta data as an Open Graph Image (&lt;code&gt;og:image&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;This starter generates these images for your blog posts automatically.&lt;/p&gt;
&lt;p&gt;The fallback and default image for all other pages is the image set as &lt;code&gt;opengraph_default&lt;/code&gt; in the &lt;code&gt;meta.js&lt;/code&gt; global data file.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;meta-info.njk&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;meta&lt;/span&gt;
  &lt;span class=&quot;token attr-name&quot;&gt;property&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;og:image&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token attr-name&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;{{ meta.url }}
  {% if (layout == &#39;post&#39;) %}/assets/images/social-preview/{{ title | slugify }}-preview.jpeg
  {% else %}{{ meta.meta_data.opengraph_default }}
  {% endif %}&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To change the look and behaviour of those images and replace the SVG background edit &lt;code&gt;src/social-preview.njk&lt;/code&gt;. The implementation is based on &lt;a href=&quot;https://bnijenhuis.nl/notes/automatically-generate-open-graph-images-in-eleventy/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Bernard Nijenhuis article&lt;/a&gt;.&lt;/p&gt;
</content
    >
  </entry>
  <entry>
    <title>Post with all the markdown</title>
    <link href="https://pid.brain.run/blog/post-with-all-the-markdown/" />
    <updated>2022-11-02T00:00:00Z</updated>
    <id>https://pid.brain.run/blog/post-with-all-the-markdown/</id>
    <content
      xml:lang=""
      type="html"
      >&lt;p&gt;A lot of markdown packages are installed to help you write your posts. You can configure them in &lt;code&gt;config/plugins/markdown.js&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As of my personal preference, there are some presets. For example the automatic conversion of web pages to links (&lt;a href=&quot;http://lenesaile.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;lenesaile.com&lt;/a&gt;) and the automatic addition of &lt;code&gt;target: &#39;_blank&#39;&lt;/code&gt; and &lt;code&gt;rel: &#39;noreferrer noopener&#39;&lt;/code&gt; for external links (all links with the pattern&lt;code&gt;/^https?:/&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;This is a small pitfall! Take care to not prefix your internal links with your domain, or else they will be treated ad external as well. To link internally use this pattern:&lt;/p&gt;
&lt;pre class=&quot;language-plaintext&quot;&gt;&lt;code class=&quot;language-plaintext&quot;&gt;An internal link to the [about page](/about/)&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;h2-heading&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#h2-heading&quot;&gt;h2 Heading&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;h3-heading&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#h3-heading&quot;&gt;h3 Heading&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;h4-heading&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#h4-heading&quot;&gt;h4 Heading&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Muffin bonbon jujubes cheesecake chupa chups shortbread ice cream cotton candy cake. Jelly-o biscuit dessert danish dessert pastry tootsie roll lemon drops gingerbread. Cheesecake donut marzipan sweet roll icing muffin halvah. Dragée donut cake biscuit pie carrot cake sesame snaps jelly-o gummi bears.&lt;/p&gt;
&lt;p&gt;Soufflé topping shortbread lemon.&lt;/p&gt;
&lt;h2 id=&quot;hr&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#hr&quot;&gt;hr&lt;/a&gt;&lt;/h2&gt;
&lt;hr /&gt;
&lt;h2 id=&quot;typographic-replacements&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#typographic-replacements&quot;&gt;Typographic replacements&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The replacement converts this input:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-plaintext&quot;&gt;&lt;code class=&quot;language-plaintext&quot;&gt;(c) (C) (r) (R) (tm) (TM) (p) (P) +-
test.. test... test..... test?..... test!....
!!!!!! ???? ,, -- ---
&quot;Smartypants, double quotes&quot; and &#39;single quotes&#39;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;To this:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;© © ® ® ™ ™ (p) (P) ±&lt;br /&gt;
test… test… test… test?.. test!..&lt;br /&gt;
!!! ??? , – —&lt;br /&gt;
“Smartypants, double quotes” and ‘single quotes’&lt;/p&gt;
&lt;h2 id=&quot;emphasis&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#emphasis&quot;&gt;Emphasis&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;This is bold text&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;This is italic text&lt;/em&gt;&lt;br /&gt;
&lt;s&gt;Strikethrough&lt;/s&gt;&lt;/p&gt;
&lt;h2 id=&quot;blockquote&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#blockquote&quot;&gt;Blockquote&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;rbread. Cheesecake donut marzipan sweet roll icing muffin halvah. Dragée donut cake biscuit pie carrot cake sesame snaps jelly-o gummi bears. Cotton candy cookie croissant fruitcake.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;lists&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#lists&quot;&gt;Lists&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;unordered-lists&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#unordered-lists&quot;&gt;Unordered lists&lt;/a&gt;&lt;/h3&gt;
&lt;ul class=&quot;list&quot;&gt;
&lt;li&gt;Create a list by starting a line with &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, or &lt;code&gt;*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Sub-lists are made by indenting 2 spaces:&lt;/li&gt;
&lt;li&gt;Very simple!&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;ordered-lists&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#ordered-lists&quot;&gt;Ordered lists&lt;/a&gt;&lt;/h3&gt;
&lt;ol class=&quot;list&quot;&gt;
&lt;li&gt;Lorem ipsum dolor sit amet&lt;/li&gt;
&lt;li&gt;Consectetur adipiscing elit&lt;/li&gt;
&lt;li&gt;Integer molestie lorem at massa&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;code&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#code&quot;&gt;Code&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Syntax highlighting&lt;/p&gt;
&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; bar&lt;span class=&quot;token operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;tables&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#tables&quot;&gt;Tables&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;data&lt;/td&gt;
&lt;td&gt;path to data files to supply the data that will be passed into templates.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;engine&lt;/td&gt;
&lt;td&gt;engine to be used for processing templates. Handlebars is the default.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ext&lt;/td&gt;
&lt;td&gt;extension to be used for dest files.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;links&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#links&quot;&gt;Links&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;rel=&amp;quot;noreferrer noopener&amp;quot;&lt;/code&gt; and &lt;code&gt;target=&amp;quot;_blank&amp;quot;&lt;/code&gt; is added automatically to external links. So is an indicator icon, see global-styles.css&lt;br /&gt;
&lt;a href=&quot;http://dev.nodeca.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;link text&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://nodeca.github.io/pica/demo/&quot; title=&quot;title text!&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;link with title&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Autoconverted link &lt;a href=&quot;https://github.com/nodeca/pica&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://github.com/nodeca/pica&lt;/a&gt; (enabled via linkify)&lt;/p&gt;
&lt;h3 id=&quot;emojis&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#emojis&quot;&gt;Emojis&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Classic markup: 😉 :crush: 😢 :tear: 😆 😋&lt;br /&gt;
Shortcuts (emoticons): 😃 😦 😎 😉&lt;/p&gt;
&lt;h3 id=&quot;mark&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#mark&quot;&gt;mark&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;mark&gt;Marked text&lt;/mark&gt;&lt;/p&gt;
&lt;h3 id=&quot;footnotes&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#footnotes&quot;&gt;Footnotes&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Footnote 1 link&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#fn1&quot; id=&quot;fnref1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;.&lt;br /&gt;
Footnote 2 link&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#fn2&quot; id=&quot;fnref2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;.&lt;br /&gt;
Inline footnote&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#fn3&quot; id=&quot;fnref3&quot;&gt;[3]&lt;/a&gt;&lt;/sup&gt; definition.&lt;br /&gt;
Duplicated footnote reference&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#fn2&quot; id=&quot;fnref2:1&quot;&gt;[2:1]&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;*[HTML]: Hyper Text Markup Language&lt;/p&gt;
&lt;hr class=&quot;footnotes-sep&quot; /&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn1&quot; class=&quot;footnote-item&quot;&gt;&lt;p&gt;Footnote &lt;strong&gt;can have markup&lt;/strong&gt;&lt;br /&gt;
and multiple paragraphs. &lt;a href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#fnref1&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;fn2&quot; class=&quot;footnote-item&quot;&gt;&lt;p&gt;Footnote text. &lt;a href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#fnref2&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt; &lt;a href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#fnref2:1&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;fn3&quot; class=&quot;footnote-item&quot;&gt;&lt;p&gt;Text of inline footnote &lt;a href=&quot;https://pid.brain.run/blog/post-with-all-the-markdown/#fnref3&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</content
    >
  </entry>
  <entry>
    <title>Post with a video </title>
    <link href="https://pid.brain.run/blog/post-with-a-video/" />
    <updated>2022-10-31T00:00:00Z</updated>
    <id>https://pid.brain.run/blog/post-with-a-video/</id>
    <content
      xml:lang=""
      type="html"
      >&lt;p&gt;This starter uses Justin Ribeiro’s lite-youtube web component. Add &lt;code&gt;youtube: true&lt;/code&gt; to frontmatter to activate.&lt;/p&gt;
  &lt;div class=&quot;youtube-embed&quot;&gt; &lt;lite-youtube videoid=&quot;Ah6je_bBSH8&quot; style=&quot;background-image: url(&#39;https://i.ytimg.com/vi/Ah6je_bBSH8/hqdefault.jpg&#39;);&quot;&gt;
  &lt;button type=&quot;button&quot; class=&quot;lty-playbtn&quot;&gt;
    &lt;span class=&quot;lyt-visually-hidden&quot;&gt;Alberto Ballesteros - Artista Sin Obra&lt;/span&gt;
  &lt;/button&gt;
&lt;/lite-youtube&gt;&lt;/div&gt;
</content
    >
  </entry>
  <entry>
    <title>Post with an image </title>
    <link href="https://pid.brain.run/blog/post-with-an-image/" />
    <updated>2022-10-12T00:00:00Z</updated>
    <id>https://pid.brain.run/blog/post-with-an-image/</id>
    <content
      xml:lang=""
      type="html"
      >&lt;p&gt;This starter uses Eleventy’s build-time image transformations. Find more info on &lt;a href=&quot;https://www.11ty.dev/docs/plugins/image/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://www.11ty.dev/docs/plugins/image/&lt;/a&gt; and edit settings in &lt;code&gt;config/shortcodes/imagePlaceholder&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For now there are three image sizes: 320px, 570px and 820px.&lt;br /&gt;
820px is the maximum size, equivalent to the width set for our content wrapper in &lt;code&gt;prose.css&lt;/code&gt;: &lt;code&gt;--wrapper-max-width: 55rem;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;sizes&lt;/code&gt; attribute is set to &lt;code&gt;sizes = &#39;(min-width: 55rem) 820px, 100vw&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you want to adjust the wrapper width you should also adjust the image size in the shortcode accordingly.&lt;/p&gt;
&lt;h2 id=&quot;syntax&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-an-image/#syntax&quot;&gt;Syntax&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-plaintext&quot;&gt;&lt;code class=&quot;language-plaintext&quot;&gt;{% imagePlaceholder &quot;path to image&quot;, &quot;alt text&quot;, &quot;caption - optional!&quot; %}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add your own &lt;code&gt;sizes&lt;/code&gt; attribute (note how I set an empty string for the caption):&lt;/p&gt;
&lt;pre class=&quot;language-plaintext&quot;&gt;&lt;code class=&quot;language-plaintext&quot;&gt;{% imagePlaceholder &quot;path to image&quot;, &quot;alt text&quot;, &quot;&quot;, &quot;(min-width:30em)  50vw, 100vw&quot; %}&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;example-image-with-a-caption&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-an-image/#example-image-with-a-caption&quot;&gt;Example image with a caption&lt;/a&gt;&lt;/h3&gt;
&lt;figure&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://pid.brain.run/assets/images/opengraph-default-320w.avif 320w, https://pid.brain.run/assets/images/opengraph-default-570w.avif 570w, https://pid.brain.run/assets/images/opengraph-default-820w.avif 820w&quot; sizes=&quot;(min-width: 55rem) 820px, 100vw&quot; /&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://pid.brain.run/assets/images/opengraph-default-320w.webp 320w, https://pid.brain.run/assets/images/opengraph-default-570w.webp 570w, https://pid.brain.run/assets/images/opengraph-default-820w.webp 820w&quot; sizes=&quot;(min-width: 55rem) 820px, 100vw&quot; /&gt;&lt;source type=&quot;image/jpeg&quot; srcset=&quot;https://pid.brain.run/assets/images/opengraph-default-320w.jpeg 320w, https://pid.brain.run/assets/images/opengraph-default-570w.jpeg 570w, https://pid.brain.run/assets/images/opengraph-default-820w.jpeg 820w&quot; sizes=&quot;(min-width: 55rem) 820px, 100vw&quot; /&gt;&lt;img src=&quot;https://pid.brain.run/assets/images/image-placeholder.png&quot; data-src=&quot;/assets/images/opengraph-default-820w.jpeg&quot; width=&quot;820&quot; height=&quot;546&quot; alt=&quot;The preview for social media&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; /&gt;&lt;/picture&gt;&lt;figcaption class=&quot;cluster font-display&quot;&gt;&lt;p&gt;An interesting caption text.&lt;/p&gt;&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;css&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-an-image/#css&quot;&gt;CSS&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can change the CSS for the page and blog post images in &lt;code&gt;./src/assets/css/blocks/page.css&lt;/code&gt; and &lt;code&gt;./src/assets/css/blocks/blog.css&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.page img&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;max-inline-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;block-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; auto&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.blog img&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;max-inline-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;block-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; auto&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content
    >
  </entry>
  <entry>
    <title>Post with some code</title>
    <link href="https://pid.brain.run/blog/post-with-some-code/" />
    <updated>2022-09-01T00:00:00Z</updated>
    <id>https://pid.brain.run/blog/post-with-some-code/</id>
    <content
      xml:lang=""
      type="html"
      >&lt;p&gt;This theme uses 11ty’s &lt;a href=&quot;https://www.11ty.dev/docs/plugins/syntaxhighlight/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Syntax Highlighting Plugin&lt;/a&gt;, a pack of Eleventy plugins for PrismJS syntax highlighting. No browser/client JavaScript, highlight transformations are all done at build-time.&lt;/p&gt;
&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; cards &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.card&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
cards&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;card&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  card&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;style&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;cursor &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;pointer&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; down&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    up&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    link &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; card&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  card&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;onmousedown&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;down &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  card&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;onmouseup&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    up &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;up &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt; down &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      link&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;// © Heydon Pickering&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;form&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;align-items&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; flex-end&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;flex-wrap&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; wrap&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;gap&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 16px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;/* © Josh Comeau */&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Edit styles in &lt;code&gt;css/blocks/code.css&lt;/code&gt;&lt;/p&gt;
</content
    >
  </entry>
  <entry>
    <title>Post with 301 redirects</title>
    <link href="https://pid.brain.run/blog/post-with-301-redirects/" />
    <updated>2022-08-28T00:00:00Z</updated>
    <id>https://pid.brain.run/blog/post-with-301-redirects/</id>
    <content
      xml:lang=""
      type="html"
      >&lt;p&gt;URLs usually change over time, as you use another CMS or optimize your file structure.&lt;/p&gt;
&lt;p&gt;A 301 is used when a page has permanently changed location.&lt;br /&gt;
Informing about this change is indispensable if you want to keep your incoming links working, be it from organic Google search or other pages that have linked to your content.&lt;/p&gt;
&lt;p&gt;Aleksandr Hovhannisyan came up with an &lt;a href=&quot;https://www.aleksandrhovhannisyan.com/blog/eleventy-netlify-redirects/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;elegant solution for Eleventy and Netlify&lt;/a&gt;. To directly cover several possible previous routes it is created as an array. You can find the loop in &lt;code&gt;_redirects.njk&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;usage&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-301-redirects/#usage&quot;&gt;Usage&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;Frontmatter&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;redirectFrom&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;/old-route/&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;/optionally-another-old-route/&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content
    >
  </entry>
  <entry>
    <title>Post with fetched content</title>
    <link href="https://pid.brain.run/blog/post-with-fetched-content/" />
    <updated>2022-08-28T00:00:00Z</updated>
    <id>https://pid.brain.run/blog/post-with-fetched-content/</id>
    <content
      xml:lang=""
      type="html"
      >&lt;p&gt;&lt;a href=&quot;https://www.11ty.dev/docs/plugins/fetch/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Eleventy Fetch&lt;/a&gt; fetches and caches resources - at configurable intervals.&lt;/p&gt;
&lt;p&gt;This is an example of fetching external data.&lt;br /&gt;
In this case, my public repositories (with more than zero stargazer) and a cache duration of 1 day.&lt;/p&gt;
&lt;p&gt;Endpoint editable in &lt;code&gt;_data/github.js.&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;algosand&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-fetched-content/#algosand&quot;&gt;&lt;a href=&quot;https://github.com/octaflop/algosand&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;algosand&lt;/a&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot;&gt;
  &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z&quot; clip-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
 1 / Late night hacking with basic algorithms. Like yoga before bed. But for the mind.
&lt;h2 id=&quot;arxer&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-fetched-content/#arxer&quot;&gt;&lt;a href=&quot;https://github.com/octaflop/arxer&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;arxer&lt;/a&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot;&gt;
  &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z&quot; clip-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
 1 / Arxer is a web-application to assist public interest research groups with collaboration.
&lt;h2 id=&quot;borsa&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-fetched-content/#borsa&quot;&gt;&lt;a href=&quot;https://github.com/octaflop/borsa&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;borsa&lt;/a&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot;&gt;
  &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z&quot; clip-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
 1 / borsa is a bag of django
&lt;h2 id=&quot;codesketches&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-fetched-content/#codesketches&quot;&gt;&lt;a href=&quot;https://github.com/octaflop/codesketches&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;codesketches&lt;/a&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot;&gt;
  &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z&quot; clip-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
 1 / faris&amp;#39;s public math animations and code sketches
&lt;h2 id=&quot;cyberpython&quot;&gt;&lt;a class=&quot;heading-anchor&quot; href=&quot;https://pid.brain.run/blog/post-with-fetched-content/#cyberpython&quot;&gt;&lt;a href=&quot;https://github.com/octaflop/cyberpython&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;cyberpython&lt;/a&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;currentColor&quot;&gt;
  &lt;path fill-rule=&quot;evenodd&quot; d=&quot;M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z&quot; clip-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;
 1 / demo and slides for SLCPython Aug 2024 meetup
</content
    >
  </entry>
</feed>
