Commit Diff


commit - 6b829cb0bb86bd75b872f32f3121722b000ec419
commit + 7b2dc83a3a3b2da494e1b1370e3ecac94a9c9342
blob - 81bbcd2bc21da39eab9f8673b3b79405892919f9
blob + 528dece9f4230bf4c58306281343e2df56f58ee6
--- barf
+++ barf
@@ -1,4 +1,15 @@
 #!/bin/sh
+
+# Check the operating system
+os_name=$(uname -s)
+
+if [ "$os_name" = "OpenBSD" ]; then
+    alias sed=gsed
+elif [ "$os_name" = "Darwin" ]; then
+    alias sed=gsed
+    alias date=gdate
+fi
+
 set -eu
 MARKDOWN=smu
 IFS='	'
@@ -74,6 +85,45 @@ EOF
 	echo '</feed>'
 }
 
+rss_xml() {
+	uri=$(sed -rn '/rss.xml/ s/.*href="([^"]*)".*/\1/ p' header.html)
+	domain=$(echo "$uri" | sed 's/rss.xml//g' | sed 's|/[^/]*$||')
+	first_commit_date=$(git log --pretty='format:%ai' . | cut -d ' ' -f1 | tail -1)
+
+	cat <<EOF
+<?xml version="1.0" encoding="utf-8"?>
+<rss version="2.0">
+	<channel>
+		<title>$(sed -n '/^# /{s/# //p; q}' index.md)</title>
+		<link>$domain/rss.xml</link>
+		<description>Feed description here</description>
+		<lastBuildDate>$(date -u +"%a, %d %b %Y %H:%M:%S %z")</lastBuildDate>
+		<pubDate>$(date -u +"%a, %d %b %Y %H:%M:%S %z")</pubDate>
+		<generator>Custom RSS Generator</generator>
+		<ttl>1800</ttl>
+EOF
+
+	while read -r f title created; do
+		content=$($MARKDOWN "$f" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/'"'"'/\&#39;/g')
+		post_link=$(echo "$f" | sed -E 's|posts/(.*).md|\1|')
+		basic_date=$(echo $(head -3 "$f" | tail -1))
+		published_date=$(date -d "$basic_date" -u +"%a, %d %b %Y %H:%M:%S %z")
+
+		cat <<EOF
+		<item>
+			<title>$title</title>
+			<description><![CDATA[$content]]></description>
+			<link>$domain/$post_link</link>
+			<guid isPermaLink="false">$domain/$post_link</guid>
+			<pubDate>$published_date</pubDate>
+		</item>
+EOF
+	done < "$1"
+
+	echo '</channel>'
+	echo '</rss>'
+}
+
 write_page() {
 	filename=$1
 	directory=$(echo $(basename "$filename" .md))
@@ -94,6 +144,7 @@ rm -rf build && mkdir build
 index_tsv posts | sort -rt "	" -k 3 > build/posts.tsv
 index_html build/posts.tsv > build/index.html
 atom_xml build/posts.tsv > build/atom.xml
+rss_xml build/posts.tsv > build/rss.xml
 while read -r f title created; do
 	write_page "$f" "$title" "$created"
 done < build/posts.tsv
blob - f172116735bd636eecd5f4034ed4ba3c5b0361a7
blob + be0489e4b68419b4d9eb61df5280493532884581
--- build/about/index.html
+++ build/about/index.html
@@ -29,6 +29,7 @@
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>
blob - dc8835da42c0a112c4414ec0dd427c934c654038
blob + dfe09d269a362e9885408892bee186318c28343f
--- build/atom.xml
+++ build/atom.xml
@@ -2,7 +2,7 @@
 <feed xmlns="http://www.w3.org/2005/Atom">
 	<title>barf</title>
 	<link href="https://barf.btxx.org/atom.xml" rel="self" />
-	<updated>2024-06-04T11:19:14Z</updated>
+	<updated>2024-06-06T08:34:47Z</updated>
 	<author>
 		<name>Bradley Taunt</name>
 	</author>
blob - 62b6f54cb97040f78e9f1ed3f54b004b3e78bb90
blob + 16b767272319e0ab21783598225fbbb0ec71bc4f
--- build/cleanup/index.html
+++ build/cleanup/index.html
@@ -42,6 +42,7 @@ pre{overflow:auto;}
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>
blob - dca88743d2463c10e6771cf9db4cbba9410a847f
blob + a5aaf194bb430df65038274c03e5e88fdf287003
--- build/dark-mode/index.html
+++ build/dark-mode/index.html
@@ -35,6 +35,7 @@
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>
blob - 10a7f8379e7d77cff160800f68352c94c4441305
blob + b47b9afed0e87ea5b53ed50ad20600b27aee078c
--- build/index.html
+++ build/index.html
@@ -39,6 +39,7 @@
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>
blob - 466f6bbb60f7956de22988e3ea85e037cc8545e0
blob + f3d1d742aa041f550caef4aa345b3300a20d72c6
--- build/macos/index.html
+++ build/macos/index.html
@@ -43,6 +43,7 @@ sudo ln -fs /opt/homebrew/bin/gdate /usr/local/bin/dat
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>
blob - 94fe221ea9237329ca9aba14fe34a44c4f38f3b7
blob + 043a664898b0bc7197a1ca0a0efb1b553f75f62c
--- build/markdown-examples/index.html
+++ build/markdown-examples/index.html
@@ -257,6 +257,7 @@ tags.</p>
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>
blob - 109950293dad2e0e6583032911e9e6ef8c931edd
blob + 7d75ce1055cee36304ce9d58807793d9e9a7e228
--- build/openbsd/index.html
+++ build/openbsd/index.html
@@ -33,6 +33,7 @@
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>
blob - f2ba617d66d920c5816d3aef77095e264ae768c6
blob + 417afa57f23ea7e76a16ddf66df1d205c1faf364
--- build/websites/index.html
+++ build/websites/index.html
@@ -32,6 +32,7 @@
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>
blob - /dev/null
blob + 065e51d13e78a45a4f9807746cd426ed1789826a (mode 644)
--- /dev/null
+++ build/rss.xml
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rss version="2.0">
+	<channel>
+		<title>barf</title>
+		<link>/rss.xml</link>
+		<description>Feed description here</description>
+		<lastBuildDate>Thu, 06 Jun 2024 12:34:47 +0000</lastBuildDate>
+		<pubDate>Thu, 06 Jun 2024 12:34:47 +0000</pubDate>
+		<generator>Custom RSS Generator</generator>
+		<ttl>1800</ttl>
+		<item>
+			<title>Running `barf` on OpenBSD</title>
+			<description><![CDATA[&lt;h1&gt;Running &lt;code&gt;barf&lt;/code&gt; on OpenBSD&lt;/h1&gt;
+&lt;p&gt;2023-08-12&lt;/p&gt;
+&lt;p&gt;The &lt;code&gt;barf&lt;/code&gt; project was built on Linux and was catered towards Linux users. The core of the project will remain focused on Linux/GNU tools, but I also need to support OpenBSD since that is my personal operating system of choice.&lt;/p&gt;
+&lt;h2&gt;Download Packages&lt;/h2&gt;
+&lt;p&gt;Along with your Markdown parser of choice (&lt;code&gt;barf&lt;/code&gt; assumes you will be using my version of &lt;a href=&quot;https://git.sr.ht/~bt/smu&quot;&gt;smu&lt;/a&gt;) you will also need to install the required packages on your OpenBSD system:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;doas pkg_add rsync coreutils gsed cmake gcc
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Then ensure that you alter all instances of &lt;code&gt;sed&lt;/code&gt; with &lt;code&gt;gsed&lt;/code&gt; in the core &lt;code&gt;barf&lt;/code&gt; file. (Or make an alias if you&#39;d prefer not to alter the main file)&lt;/p&gt;
+&lt;p&gt;After that, everything should work perfectly fine when building!&lt;/p&gt;]]></description>
+			<link>/openbsd</link>
+			<guid isPermaLink="false">/openbsd</guid>
+			<pubDate>Sat, 12 Aug 2023 00:00:00 +0000</pubDate>
+		</item>
+		<item>
+			<title>Markdown Examples in barf</title>
+			<description><![CDATA[&lt;h1&gt;Markdown Examples in barf&lt;/h1&gt;
+&lt;p&gt;2023-01-05&lt;/p&gt;
+&lt;p&gt;This following was lifted from &lt;a href=&quot;https://github.com/karlb/smu&quot;&gt;https://github.com/karlb/smu&lt;/a&gt;&lt;/p&gt;
+&lt;h1&gt;&lt;code&gt;smu&lt;/code&gt; Syntax&lt;/h1&gt;
+&lt;p&gt;smu was started as a rewrite of
+&lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;markdown&lt;/a&gt; but became something
+more lightweight and consistent. It differs from &lt;a href=&quot;https://commonmark.org/&quot;&gt;CommonMark&lt;/a&gt; in the following ways:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;No support for &lt;em&gt;reference style links&lt;/em&gt;&lt;/li&gt;
+&lt;li&gt;Stricter indentation rules for lists&lt;/li&gt;
+&lt;li&gt;Lists don&#39;t end paragraphs by themselves (blank line needed)&lt;/li&gt;
+&lt;li&gt;Horizontal rules (&lt;code&gt;&amp;lt;hr&amp;gt;&lt;/code&gt;) must use &lt;code&gt;- - -&lt;/code&gt; as syntax&lt;/li&gt;
+&lt;li&gt;Code fences have stricter syntax&lt;/li&gt;
+&lt;/ul&gt;
+&lt;p&gt;Patches that increase the CommonMark compatibility are welcome as long as they don&#39;t increase the code complexity significantly.&lt;/p&gt;
+&lt;p&gt;This project is a fork of the &lt;a href=&quot;https://github.com/gottox/smu&quot;&gt;original smu&lt;/a&gt; by
+&lt;a href=&quot;https://eboland.de&quot;&gt;Enno Boland (gottox)&lt;/a&gt;. The main differences to the
+original smu are:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;Support for code fences&lt;/li&gt;
+&lt;li&gt;Improved &lt;a href=&quot;https://commonmark.org/&quot;&gt;CommonMark&lt;/a&gt; compatibility. E.g.
+&lt;ul&gt;
+&lt;li&gt;Code blocks need four spaces indentation instead of three&lt;/li&gt;
+&lt;li&gt;Skip empty lines at end of code blocks&lt;/li&gt;
+&lt;li&gt;Ignore single spaces around code spans&lt;/li&gt;
+&lt;li&gt;Keep HTML comments in output&lt;/li&gt;
+&lt;li&gt;Improved spec compliance for lists&lt;/li&gt;
+&lt;li&gt;Nesting code block in blockquotes works&lt;/li&gt;
+&lt;li&gt;&quot;Empty&quot; lines in lists behave identically, no matter how much whitespace they contain&lt;/li&gt;
+&lt;li&gt;No backslash escapes in code blocks&lt;/li&gt;
+&lt;li&gt;Use first number as start number for ordered lists&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/li&gt;
+&lt;li&gt;Added a simple test suite to check for compliance and avoid regressions&lt;/li&gt;
+&lt;/ul&gt;
+&lt;h2&gt;Inline patterns&lt;/h2&gt;
+&lt;p&gt;There are several patterns you can use to highlight your text:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;&lt;p&gt;Emphasis&lt;/p&gt;
+
+&lt;ul&gt;
+&lt;li&gt;Surround your text with &lt;code&gt;*&lt;/code&gt; or &lt;code&gt;_&lt;/code&gt; to get &lt;em&gt;emphasised&lt;/em&gt; text:
+&lt;pre&gt;&lt;code&gt;This *is* cool.
+This _is_ cool, too.
+&lt;/code&gt;&lt;/pre&gt;
+&lt;/li&gt;
+&lt;li&gt;Surround your text with &lt;code&gt;**&lt;/code&gt; or &lt;code&gt;__&lt;/code&gt; to get &lt;strong&gt;strong&lt;/strong&gt; text:
+&lt;pre&gt;&lt;code&gt;This **is** cool.
+This __is__ cool, too.
+&lt;/code&gt;&lt;/pre&gt;
+&lt;/li&gt;
+&lt;li&gt;Surround your text with &lt;code&gt;***&lt;/code&gt; or &lt;code&gt;___&lt;/code&gt; to get &lt;strong&gt;&lt;em&gt;strong and emphasised&lt;/em&gt;&lt;/strong&gt; text:
+&lt;pre&gt;&lt;code&gt;This ***is*** cool.
+This ___is___ cool, too.
+&lt;/code&gt;&lt;/pre&gt;
+&lt;/li&gt;
+&lt;li&gt;But this example won&#39;t work as expected:
+&lt;pre&gt;&lt;code&gt;***Hello** you*
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;This is a wontfix bug because it would make the source too complex.
+Use this instead:
+&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;***Hello*** *you*
+&lt;/code&gt;&lt;/pre&gt;
+&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/li&gt;
+&lt;li&gt;&lt;p&gt;inline Code&lt;/p&gt;
+&lt;p&gt;You can produce inline code by surrounding it with backticks.&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;Use `rm -rf /` if you&#39;re a N00b.
+Use ``rm -rf /`` if you&#39;re a N00b.
+Use ```rm -rf /``` if you&#39;re a N00b.
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Double and triple backticks can be used if the code itself contains backticks.&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;
+&lt;h2&gt;Titles&lt;/h2&gt;
+&lt;p&gt;Creating titles in smu is very easy. There are two different syntax styles. The
+first is underlining with at least three characters:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;Heading
+=======
+
+Topic
+-----
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;This is very intuitive and self explaining. The resulting sourcecode looks like
+this:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Heading&amp;lt;/h1&amp;gt;
+&amp;lt;h2&amp;gt;Topic&amp;lt;/h2&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Use the following prefixes if you don&#39;t like underlining:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;# h1
+## h2
+### h3
+#### h4
+##### h5
+###### h6
+&lt;/code&gt;&lt;/pre&gt;
+&lt;h2&gt;Links&lt;/h2&gt;
+&lt;p&gt;The simplest way to define a link is with simple &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt;.&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;http://s01.de&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;You can do the same for E-Mail addresses:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;yourname@s01.de&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;If you want to define a label for the url, you have to use a different syntax&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;[smu - simple mark up](http://s01.de/~gottox/index.cgi/proj_smu)
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;The resulting HTML-Code&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&amp;quot;http://s01.de/~gottox/index.cgi/proj_smu&amp;quot;&amp;gt;smu - simple mark up&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;h2&gt;Lists&lt;/h2&gt;
+&lt;p&gt;Defining lists is very straightforward:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;* Item 1
+* Item 2
+* Item 3
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Result:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;
+&amp;lt;li&amp;gt;Item 1&amp;lt;/li&amp;gt;
+&amp;lt;li&amp;gt;Item 2&amp;lt;/li&amp;gt;
+&amp;lt;li&amp;gt;Item 3&amp;lt;/li&amp;gt;
+&amp;lt;/ul&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Defining ordered lists is also very easy:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;1. Item 1
+2. Item 2
+3. Item 3
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Only the first number in a list is meaningful. All following list items are
+continously counted. If you want a list starting at 2, you could write:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;2. Item 1
+2. Item 2
+2. Item 3
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;and get the following HTML which will render with the numbers 2, 3, 4:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;ol start=&amp;quot;2&amp;quot;&amp;gt;
+&amp;lt;li&amp;gt;Item 1&amp;lt;/li&amp;gt;
+&amp;lt;li&amp;gt;Item 2&amp;lt;/li&amp;gt;
+&amp;lt;li&amp;gt;Item 3&amp;lt;/li&amp;gt;
+&amp;lt;/ol&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;h2&gt;Code &amp;amp; Blockquote&lt;/h2&gt;
+&lt;p&gt;Use the &lt;code&gt;&amp;gt; &lt;/code&gt; as a line prefix for defining blockquotes. Blockquotes are
+interpreted as well. This makes it possible to embed links, headings and even
+other quotes into a quote:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;gt; Hello
+&amp;gt; This is a quote with a [link](http://s01.de/~gottox)
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Result:
+&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;
+Hello
+This is a quote with a &amp;lt;a href=&amp;quot;http://s01.de/~gottox&amp;quot;&amp;gt;link&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
+&amp;lt;/blockquote&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;You can define a code block with a leading Tab or with &lt;strong&gt;4&lt;/strong&gt; leading spaces&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;	this.is(code)
+
+    this.is(code, too)
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Result:
+&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;this.is(code)&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
+&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;this.is(code, too)
+&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Please note that you can&#39;t use HTML or smu syntax in a code block.&lt;/p&gt;
+&lt;p&gt;Another way to write code blocks is to use code fences:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;```json
+{&amp;quot;some&amp;quot;: &amp;quot;code&amp;quot;}
+```
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;This has two advantages:&lt;/p&gt;
+
+&lt;ul&gt;
+&lt;li&gt;The optional language identifier will be turned into a &lt;code&gt;language-&lt;/code&gt; class name&lt;/li&gt;
+&lt;li&gt;You can keep the original indentation which helps when doing copy &amp;amp; paste&lt;/li&gt;
+&lt;/ul&gt;
+&lt;h2&gt;Tables&lt;/h2&gt;
+&lt;p&gt;Tables can be generated with the following syntax:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;| Heading1 | Heading2 |
+| -------- | -------- |
+| Cell 1   | Cell2    |
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Aligning the columns make the input nicer to read, but is not necessary to get
+correct table output. You could just write&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;| Heading1 | Heading2 |
+| --- | --- |
+| Cell 1 | Cell2 |
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;To align the content of table cells, use &lt;code&gt;|:--|&lt;/code&gt; for left, &lt;code&gt;|--:|&lt;/code&gt; for right
+and &lt;code&gt;|:--:|&lt;/code&gt; for centered alignment in the row which separates the header from
+the table body.&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;| Heading1 | Heading2 | Heading3 |
+| :------- | :------: | -------: |
+| Left     | Center   | Right    |
+&lt;/code&gt;&lt;/pre&gt;
+&lt;h2&gt;Other interesting stuff&lt;/h2&gt;
+&lt;ul&gt;
+&lt;li&gt;&lt;p&gt;to insert a horizontal rule simple add &lt;code&gt;- - -&lt;/code&gt; into an empty line:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;Hello
+- - -
+Hello2
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Result:
+&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;
+Hello
+&amp;lt;hr /&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;pre&gt;&lt;code&gt;Hello2&amp;lt;/p&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;/li&gt;
+&lt;li&gt;&lt;p&gt;Any ASCII punctuation character may escaped by precedeing them with a
+backslash to avoid them being interpreted:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;!&amp;quot;#$%&amp;amp;&#39;()*+,-./:;&amp;lt;=&amp;gt;?@[]^_`{|}~\
+&lt;/code&gt;&lt;/pre&gt;
+&lt;/li&gt;
+&lt;li&gt;&lt;p&gt;To force a linebreak simple add two spaces to the end of the line:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;No linebreak
+here.
+But here is  
+one.
+&lt;/code&gt;&lt;/pre&gt;
+&lt;/li&gt;
+&lt;/ul&gt;
+&lt;h2&gt;embed HTML&lt;/h2&gt;
+&lt;p&gt;You can include arbitrary HTML code in your documents. The HTML will be
+passed through to the resulting document without modification. This is a good
+way to work around features that are missing in smu. If you don&#39;t want this
+behaviour, use the &lt;code&gt;-n&lt;/code&gt; flag when executing smu to stricly escape the HTML
+tags.&lt;/p&gt;]]></description>
+			<link>/markdown-examples</link>
+			<guid isPermaLink="false">/markdown-examples</guid>
+			<pubDate>Thu, 05 Jan 2023 00:00:00 +0000</pubDate>
+		</item>
+		<item>
+			<title>Running `barf` on MacOS</title>
+			<description><![CDATA[&lt;h1&gt;Running &lt;code&gt;barf&lt;/code&gt; on MacOS&lt;/h1&gt;
+&lt;p&gt;2023-01-18&lt;/p&gt;
+&lt;p&gt;The &lt;code&gt;barf&lt;/code&gt; project was built on Linux and was catered towards Linux users. The core of the project will remain focused on Linux/GNU tools, but that doesn&#39;t mean MacOS needs to be left out in the cold.&lt;/p&gt;
+&lt;p&gt;There are some very minor changes you&#39;ll need to make to your default &lt;code&gt;sed&lt;/code&gt; and &lt;code&gt;date&lt;/code&gt; paths if you plan to run barf on MacOS.&lt;/p&gt;
+&lt;h2&gt;Download Packages&lt;/h2&gt;
+&lt;p&gt;This walkthrough assumes that you already have &lt;a href=&quot;https://brew.sh/&quot;&gt;homebrew&lt;/a&gt; installed on your machine.&lt;/p&gt;
+&lt;p&gt;You will need to install the GNU versions of both &lt;code&gt;date&lt;/code&gt; and &lt;code&gt;sed&lt;/code&gt; in order to avoid breaking things when &lt;code&gt;barf&lt;/code&gt; tries to build.&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;brew install coreutils
+brew install gnu-sed
+&lt;/code&gt;&lt;/pre&gt;
+&lt;h2&gt;Setting &lt;code&gt;gsed&lt;/code&gt; and &lt;code&gt;gdate&lt;/code&gt; as Default&lt;/h2&gt;
+&lt;p&gt;Now run the following in a terminal shell:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;sudo ln -fs /opt/homebrew/bin/gsed /usr/local/bin/sed
+sudo ln -fs /opt/homebrew/bin/gdate /usr/local/bin/date
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;and add the following to your &lt;code&gt;.bash_profile&lt;/code&gt; file:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;export PATH=&amp;quot;/usr/local/bin:$PATH&amp;quot;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Reload your &lt;code&gt;bash&lt;/code&gt; instance and everything should work as intended!&lt;/p&gt;]]></description>
+			<link>/macos</link>
+			<guid isPermaLink="false">/macos</guid>
+			<pubDate>Wed, 18 Jan 2023 00:00:00 +0000</pubDate>
+		</item>
+		<item>
+			<title>Supporting Basic Dark Mode</title>
+			<description><![CDATA[&lt;h1&gt;Supporting Basic Dark Mode&lt;/h1&gt;
+&lt;p&gt;2023-03-07&lt;/p&gt;
+&lt;p&gt;The default &lt;code&gt;barf&lt;/code&gt; site generator now supports basic dark mode functionality. This has been achieved by including the standard &lt;code&gt;color-scheme&lt;/code&gt; meta tag in the core &lt;code&gt;header.html&lt;/code&gt; file:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;meta name=&amp;quot;color-scheme&amp;quot; content=&amp;quot;dark light&amp;quot;&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;This change also ships with some minor updates to the default &lt;code&gt;blockquote&lt;/code&gt; design. You can see an example below:&lt;/p&gt;
+&lt;blockquote&gt;&lt;p&gt;This is a really &lt;em&gt;cool&lt;/em&gt; blockquote&lt;/p&gt;
+&lt;/blockquote&gt;
+&lt;h2&gt;Minor Caveat&lt;/h2&gt;
+&lt;p&gt;Unfortunately, Safari still has minor &lt;code&gt;ahref&lt;/code&gt; / link color issue when defaulting to browser dark mode. If this is a problem for your own build of &lt;code&gt;barf&lt;/code&gt;, take a look at a &lt;a href=&quot;https://bt.ht/safari-default-dark-mode/&quot;&gt;solution I wrote about here&lt;/a&gt;.&lt;/p&gt;
+&lt;p&gt;Personally, I can&#39;t be bothered to add that extra code to this project. The Safari team needs to get their shit together and fix such a simple bug. Plus, you shouldn&#39;t be using Safari anyway - it&#39;s proprietary garbage.&lt;/p&gt;]]></description>
+			<link>/dark-mode</link>
+			<guid isPermaLink="false">/dark-mode</guid>
+			<pubDate>Tue, 07 Mar 2023 00:00:00 +0000</pubDate>
+		</item>
+		<item>
+			<title>Cleaning Up barf's Structure</title>
+			<description><![CDATA[&lt;h1&gt;Cleaning Up barf&#39;s Structure&lt;/h1&gt;
+&lt;p&gt;2023-10-09&lt;/p&gt;
+&lt;p&gt;Things probably look a little different around here. Both in terms of this demo site &lt;em&gt;and&lt;/em&gt; the core &lt;code&gt;barf&lt;/code&gt; files itself.&lt;/p&gt;
+&lt;p&gt;This project was always intended to be focused on Linux platforms. So, I&#39;ve removed the included &lt;code&gt;barf_macos&lt;/code&gt; and &lt;code&gt;barf_openbsd&lt;/code&gt; files to keep the generator more streamlined. But have no fear! Instructions for both Mac and OpenBSD can still be found on the main blog:&lt;/p&gt;
+&lt;ul&gt;
+&lt;li&gt;&lt;a href=&quot;/macos&quot;&gt;Running &lt;code&gt;barf&lt;/code&gt; on MacOS&lt;/a&gt;&lt;/li&gt;
+&lt;li&gt;&lt;a href=&quot;/openbsd&quot;&gt;Running &lt;code&gt;barf&lt;/code&gt; on OpenBSD&lt;/a&gt;&lt;/li&gt;
+&lt;/ul&gt;
+&lt;p&gt;As for the &quot;default&quot; look of &lt;code&gt;barf&lt;/code&gt;, I&#39;ve simplified things further. The total CSS styling now consists of only:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;*{box-sizing:border-box;}
+body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}
+img{max-width:100%;}
+pre{overflow:auto;}
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Users still have the ability to tweak things as much as they&#39;d like, but the standard look should be more than enough for anyone just focusing on writing. Dark mode has also been dropped but is easily added by adding the following inside the &lt;code&gt;head&lt;/code&gt; tags:&lt;/p&gt;
+&lt;pre&gt;&lt;code&gt;&amp;lt;meta name=&amp;quot;color-scheme&amp;quot; content=&amp;quot;dark light&amp;quot;&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+&lt;p&gt;Hopefully these changes reduce the overall scope of the project, which was a main point made on the README originally!&lt;/p&gt;]]></description>
+			<link>/cleanup</link>
+			<guid isPermaLink="false">/cleanup</guid>
+			<pubDate>Mon, 09 Oct 2023 00:00:00 +0000</pubDate>
+		</item>
+</channel>
+</rss>
blob - 861f246ee314433b13c353ba80bf9de7f3b3aad8
blob + caef8797345b88994d413bd080c66a617b22c66c
--- footer.html
+++ footer.html
@@ -8,6 +8,7 @@
         <li><a href="https://git.btxx.org/barf">Source Code</a></li>
     </ul>
     <small>
+        Feeds: <a href="/atom.xml">Atom</a> | <a href="/rss.xml">RSS</a> <br>
         Built with <a href="https://git.btxx.org/barf">barf</a>. <br>
         The <a href="https://git.btxx.org/barf">code for this site</a> is MIT.
     </small>