- value:'A reason why I like static site generators'
created:
- value:'2025-05-03T00:00:00+00:00'
changed:
- value:'2025-05-11T08:59:58+00:00'
promote:
- value:false
sticky:
- value:false
default_langcode:
- value:true
revision_translation_affected:
- value:true
path:
- alias:/daily/2025/05/03/like
langcode:en
body:
- value:|
<p>Static site generators <a href="/presentations/sculpin">like Sculpin</a> don't have a database like Drupal.</p>
<p>The files are the database.</p>
<p>In [my website repository][3], the <code>source/_presentations</code> directory contains the files for my presentation pages, so these could be considered the presentations table and rows.</p>
<p>But, because my content is in plain text files, they're very easy and quick to search in a text editor or on the command line using tools like <code>grep</code>.</p>
<p>It's very easy and fast for me to find an old daily email, blog post or article I've written when I need to.</p>
<p>This is also why I use <a href="/presentations/rst2pdf">rst2pdf for my presentation slides</a> and write them in reStructured text. It's very fast to find and re-use content.</p>
<h2 id="counting-my-presentations">Counting my presentations</h2>
<p>Another example is being able to quickly count the number of presentations I've given.</p>
<p>Here's an example of the front matter section from one of my presentations:</p>
<p>I can sort them by adding <code>| sort</code>, but that doesn't matter in this case.</p>
<p>To remove any future presentations, I can pass the current date to <code>awk</code>, filter based on the date and count the number of lines in the result:</p>
<p>This isn't how I'm calculating this on my website (I'm using a <a href="/daily/2025/05/02/extend">custom Twig extension in Sculpin</a> for that), but this is an example of how multiple command line utilities can work together to perform a task - made possible using the static files from my website.</p>
<p>In [my website repository][3], the <code>source/_presentations</code> directory contains the files for my presentation pages, so these could be considered the presentations table and rows.</p>
<p>But, because my content is in plain text files, they're very easy and quick to search in a text editor or on the command line using tools like <code>grep</code>.</p>
<p>It's very easy and fast for me to find an old daily email, blog post or article I've written when I need to.</p>
<p>This is also why I use <a href="/presentations/rst2pdf">rst2pdf for my presentation slides</a> and write them in reStructured text. It's very fast to find and re-use content.</p>
<p>I can sort them by adding <code>| sort</code>, but that doesn't matter in this case.</p>
<p>To remove any future presentations, I can pass the current date to <code>awk</code>, filter based on the date and count the number of lines in the result:</p>
<p>This isn't how I'm calculating this on my website (I'm using a <a href="/daily/2025/05/02/extend">custom Twig extension in Sculpin</a> for that), but this is an example of how multiple command line utilities can work together to perform a task - made possible using the static files from my website.</p>