Skip to content

Commit

Permalink
deploy: d917281
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoff-it committed Sep 18, 2024
1 parent 0f6c5d9 commit db4c127
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/superhtml/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</style>
<h3 class="overtitle centered">Zine</h3>
<h1 class="title">SuperHTML Basics</h1>
<div id="page"><h2>Intro</h2><p><strong>Make sure to read <a href="/docs/scripty/">Scripty Basics</a> first.</strong></p><p>SuperHTML is a templating language for HTML that uses Scripty to express templating logic.</p><p>There is <a href="https://gohugo.io/templates/introduction/" target="_blank">a</a> <a href="https://mustache.github.io/" target="_blank">borderline</a> <a href="https://handlebarsjs.com/" target="_blank">infinite</a> <a href="https://jinja.palletsprojects.com/" target="_blank">number</a> <a href="https://github.com/ruby/erb" target="_blank">of</a> HTML templating languages, but the majority of those used by static site generators are a form of <code>{{ curly braced }}</code> macro system that preprocesses the HTML code as unstructured text.</p><p>This "macro" approach has the upside of making it possible to use the same templating language for other file formats (you <em>can</em> use Jinja to template CSV files, for example), but it also has a variety of downsides.</p><p>The most important downside is that it makes it unnecessarily easy to generate HTML in an unstructured manner:</p><ul><li>making it harder for homans to understand what the templating logic is doing</li><li>making it easier for humans to output malformed html</li><li>making it prohibitively complex for tooling to catch mistakes statically (i.e. in your editor)</li></ul><p>The following is an extremely tame example of what is possible with curly braced templating languages:</p><pre><code class="html"><span class="punctuation bracket">&lt;</span><span class="tag">a</span> <span class="attribute">href</span>=&quot;<span class="string">baz</span>&quot;<span class="punctuation bracket">&gt;</span>
<div id="page"><h2>Intro</h2><p><strong>Make sure to read <a href="/docs/scripty/">Scripty Basics</a> first.</strong></p><p>SuperHTML is a templating language for HTML that uses Scripty to express templating logic.</p><p>There is <a href="https://gohugo.io/templates/introduction/" target="_blank">a</a> <a href="https://mustache.github.io/" target="_blank">borderline</a> <a href="https://handlebarsjs.com/" target="_blank">infinite</a> <a href="https://jinja.palletsprojects.com/" target="_blank">number</a> <a href="https://github.com/ruby/erb" target="_blank">of</a> HTML templating languages, but the majority of those used by static site generators are a form of <code>{{ curly braced }}</code> macro system that preprocesses the HTML code as unstructured text.</p><p>This "macro" approach has the upside of making it possible to use the same templating language for other file formats (you <em>can</em> use Jinja to template CSV files, for example), but it also has a variety of downsides.</p><p>The most important downside is that it makes it unnecessarily easy to generate HTML in an unstructured manner:</p><ul><li>making it harder for humans to understand what the templating logic is doing</li><li>making it easier for humans to output malformed html</li><li>making it prohibitively complex for tooling to catch mistakes statically (i.e. in your editor)</li></ul><p>The following is an extremely tame example of what is possible with curly braced templating languages:</p><pre><code class="html"><span class="punctuation bracket">&lt;</span><span class="tag">a</span> <span class="attribute">href</span>=&quot;<span class="string">baz</span>&quot;<span class="punctuation bracket">&gt;</span>
{{ if .Foo }}
<span class="punctuation bracket">&lt;/</span><span class="tag">a</span><span class="punctuation bracket">&gt;</span><span class="punctuation bracket">&lt;</span><span class="tag">a</span> <span class="attribute">href</span>=&quot;<span class="string">foo</span>&quot;<span class="punctuation bracket">&gt;</span>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion log/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>Curated list of changes to Zine</description>
<generator>Zine -- https://zine-ssg.io</generator>
<language>en-us</language>
<lastBuildDate>Tue, 17 Sep 2024 13:47:31 +0000</lastBuildDate>
<lastBuildDate>Wed, 18 Sep 2024 20:01:39 +0000</lastBuildDate>



Expand Down

0 comments on commit db4c127

Please sign in to comment.