From 886271bb3b9a07295ecf7c6c8878fb52bdeff9b4 Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Fri, 19 Jan 2024 09:02:37 -0500 Subject: Initial commit for cgit platform --- build/about/index.html | 35 ++++ build/atom.xml | 335 +++++++++++++++++++++++++++++++++++++ build/cleanup/index.html | 48 ++++++ build/dark-mode/index.html | 41 +++++ build/index.html | 45 +++++ build/macos/index.html | 49 ++++++ build/markdown-examples/index.html | 263 +++++++++++++++++++++++++++++ build/openbsd/index.html | 39 +++++ build/pages.tsv | 2 + build/posts.tsv | 5 + build/public/images/barf.svg | 17 ++ build/websites/index.html | 37 ++++ 12 files changed, 916 insertions(+) create mode 100644 build/about/index.html create mode 100644 build/atom.xml create mode 100644 build/cleanup/index.html create mode 100644 build/dark-mode/index.html create mode 100644 build/index.html create mode 100644 build/macos/index.html create mode 100644 build/markdown-examples/index.html create mode 100644 build/openbsd/index.html create mode 100644 build/pages.tsv create mode 100644 build/posts.tsv create mode 100644 build/public/images/barf.svg create mode 100644 build/websites/index.html (limited to 'build') diff --git a/build/about/index.html b/build/about/index.html new file mode 100644 index 0000000..627cc2f --- /dev/null +++ b/build/about/index.html @@ -0,0 +1,35 @@ + + + + + + + About `barf` + + + + + + +
+

About barf

+

barf is a minimal and suckless-inspired blog generator. It is a tweaked and slightly patched version of Karl Bartel's fantastic blog.sh.

+

Why?

+

This project was created by me, Bradley Taunt, out of frustration with overly complex and bloated blogging options. I tried so many "minimal" generators but each one ended up having some glaring issue or heavy reliance on dependencies.

+

I wanted to have a system that I could easily replicate on any Linux machine. Something that didn't require me to download half the internet just to get up and running. I'm a sucker for keeping things simple.

+ \ No newline at end of file diff --git a/build/atom.xml b/build/atom.xml new file mode 100644 index 0000000..fcb42f0 --- /dev/null +++ b/build/atom.xml @@ -0,0 +1,335 @@ + + + barf + + 2023-12-19T10:20:13Z + + Bradley Taunt + + https://barf.bt.ht,2023-01-04:default-atom-feed/ + + Running `barf` on OpenBSD + <h1>Running <code>barf</code> on OpenBSD</h1> +<p>2023-08-12</p> +<p>The <code>barf</code> 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.</p> +<h2>Download Packages</h2> +<p>Along with your Markdown parser of choice (<code>barf</code> assumes you will be using my version of <a href="https://git.sr.ht/~bt/smu">smu</a>) you will also need to install the required packages on your OpenBSD system:</p> +<pre><code>doas pkg_add rsync coreutils gsed cmake gcc +</code></pre> +<p>Then ensure that you alter all instances of <code>sed</code> with <code>gsed</code> in the core <code>barf</code> file. (Or make an alias if you'd prefer not to alter the main file)</p> +<p>After that, everything should work perfectly fine when building!</p> + + https://barf.bt.ht/openbsd + 2023-08-12T10:00:00Z + 2023-08-12T10:00:00Z + + + Markdown Examples in barf + <h1>Markdown Examples in barf</h1> +<p>2023-01-05</p> +<p>This following was lifted from <a href="https://github.com/karlb/smu">https://github.com/karlb/smu</a></p> +<h1><code>smu</code> Syntax</h1> +<p>smu was started as a rewrite of +<a href="http://daringfireball.net/projects/markdown/">markdown</a> but became something +more lightweight and consistent. It differs from <a href="https://commonmark.org/">CommonMark</a> in the following ways:</p> +<ul> +<li>No support for <em>reference style links</em></li> +<li>Stricter indentation rules for lists</li> +<li>Lists don't end paragraphs by themselves (blank line needed)</li> +<li>Horizontal rules (<code>&lt;hr&gt;</code>) must use <code>- - -</code> as syntax</li> +<li>Code fences have stricter syntax</li> +</ul> +<p>Patches that increase the CommonMark compatibility are welcome as long as they don't increase the code complexity significantly.</p> +<p>This project is a fork of the <a href="https://github.com/gottox/smu">original smu</a> by +<a href="https://eboland.de">Enno Boland (gottox)</a>. The main differences to the +original smu are:</p> +<ul> +<li>Support for code fences</li> +<li>Improved <a href="https://commonmark.org/">CommonMark</a> compatibility. E.g. +<ul> +<li>Code blocks need four spaces indentation instead of three</li> +<li>Skip empty lines at end of code blocks</li> +<li>Ignore single spaces around code spans</li> +<li>Keep HTML comments in output</li> +<li>Improved spec compliance for lists</li> +<li>Nesting code block in blockquotes works</li> +<li>"Empty" lines in lists behave identically, no matter how much whitespace they contain</li> +<li>No backslash escapes in code blocks</li> +<li>Use first number as start number for ordered lists</li> +</ul> +</li> +<li>Added a simple test suite to check for compliance and avoid regressions</li> +</ul> +<h2>Inline patterns</h2> +<p>There are several patterns you can use to highlight your text:</p> +<ul> +<li><p>Emphasis</p> + +<ul> +<li>Surround your text with <code>*</code> or <code>_</code> to get <em>emphasised</em> text: +<pre><code>This *is* cool. +This _is_ cool, too. +</code></pre> +</li> +<li>Surround your text with <code>**</code> or <code>__</code> to get <strong>strong</strong> text: +<pre><code>This **is** cool. +This __is__ cool, too. +</code></pre> +</li> +<li>Surround your text with <code>***</code> or <code>___</code> to get <strong><em>strong and emphasised</em></strong> text: +<pre><code>This ***is*** cool. +This ___is___ cool, too. +</code></pre> +</li> +<li>But this example won't work as expected: +<pre><code>***Hello** you* +</code></pre> +<p>This is a wontfix bug because it would make the source too complex. +Use this instead: +</p> +<pre><code>***Hello*** *you* +</code></pre> +</li> +</ul> +</li> +<li><p>inline Code</p> +<p>You can produce inline code by surrounding it with backticks.</p> +<pre><code>Use `rm -rf /` if you're a N00b. +Use ``rm -rf /`` if you're a N00b. +Use ```rm -rf /``` if you're a N00b. +</code></pre> +<p>Double and triple backticks can be used if the code itself contains backticks.</p> +</li> +</ul> +<h2>Titles</h2> +<p>Creating titles in smu is very easy. There are two different syntax styles. The +first is underlining with at least three characters:</p> +<pre><code>Heading +======= + +Topic +----- +</code></pre> +<p>This is very intuitive and self explaining. The resulting sourcecode looks like +this:</p> +<pre><code>&lt;h1&gt;Heading&lt;/h1&gt; +&lt;h2&gt;Topic&lt;/h2&gt; +</code></pre> +<p>Use the following prefixes if you don't like underlining:</p> +<pre><code># h1 +## h2 +### h3 +#### h4 +##### h5 +###### h6 +</code></pre> +<h2>Links</h2> +<p>The simplest way to define a link is with simple <code>&lt;&gt;</code>.</p> +<pre><code>&lt;http://s01.de&gt; +</code></pre> +<p>You can do the same for E-Mail addresses:</p> +<pre><code>&lt;yourname@s01.de&gt; +</code></pre> +<p>If you want to define a label for the url, you have to use a different syntax</p> +<pre><code>[smu - simple mark up](http://s01.de/~gottox/index.cgi/proj_smu) +</code></pre> +<p>The resulting HTML-Code</p> +<pre><code>&lt;a href=&quot;http://s01.de/~gottox/index.cgi/proj_smu&quot;&gt;smu - simple mark up&lt;/a&gt;&lt;/p&gt; +</code></pre> +<h2>Lists</h2> +<p>Defining lists is very straightforward:</p> +<pre><code>* Item 1 +* Item 2 +* Item 3 +</code></pre> +<p>Result:</p> +<pre><code>&lt;ul&gt; +&lt;li&gt;Item 1&lt;/li&gt; +&lt;li&gt;Item 2&lt;/li&gt; +&lt;li&gt;Item 3&lt;/li&gt; +&lt;/ul&gt; +</code></pre> +<p>Defining ordered lists is also very easy:</p> +<pre><code>1. Item 1 +2. Item 2 +3. Item 3 +</code></pre> +<p>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:</p> +<pre><code>2. Item 1 +2. Item 2 +2. Item 3 +</code></pre> +<p>and get the following HTML which will render with the numbers 2, 3, 4:</p> +<pre><code>&lt;ol start=&quot;2&quot;&gt; +&lt;li&gt;Item 1&lt;/li&gt; +&lt;li&gt;Item 2&lt;/li&gt; +&lt;li&gt;Item 3&lt;/li&gt; +&lt;/ol&gt; +</code></pre> +<h2>Code &amp; Blockquote</h2> +<p>Use the <code>&gt; </code> 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:</p> +<pre><code>&gt; Hello +&gt; This is a quote with a [link](http://s01.de/~gottox) +</code></pre> +<p>Result: +</p> +<pre><code>&lt;blockquote&gt;&lt;p&gt; +Hello +This is a quote with a &lt;a href=&quot;http://s01.de/~gottox&quot;&gt;link&lt;/a&gt;&lt;/p&gt; +&lt;/blockquote&gt; +</code></pre> +<p>You can define a code block with a leading Tab or with <strong>4</strong> leading spaces</p> +<pre><code> this.is(code) + + this.is(code, too) +</code></pre> +<p>Result: +</p> +<pre><code>&lt;pre&gt;&lt;code&gt;this.is(code)&lt;/code&gt;&lt;/pre&gt; +&lt;pre&gt;&lt;code&gt;this.is(code, too) +&lt;/code&gt;&lt;/pre&gt; +</code></pre> +<p>Please note that you can't use HTML or smu syntax in a code block.</p> +<p>Another way to write code blocks is to use code fences:</p> +<pre><code>```json +{&quot;some&quot;: &quot;code&quot;} +``` +</code></pre> +<p>This has two advantages:</p> + +<ul> +<li>The optional language identifier will be turned into a <code>language-</code> class name</li> +<li>You can keep the original indentation which helps when doing copy &amp; paste</li> +</ul> +<h2>Tables</h2> +<p>Tables can be generated with the following syntax:</p> +<pre><code>| Heading1 | Heading2 | +| -------- | -------- | +| Cell 1 | Cell2 | +</code></pre> +<p>Aligning the columns make the input nicer to read, but is not necessary to get +correct table output. You could just write</p> +<pre><code>| Heading1 | Heading2 | +| --- | --- | +| Cell 1 | Cell2 | +</code></pre> +<p>To align the content of table cells, use <code>|:--|</code> for left, <code>|--:|</code> for right +and <code>|:--:|</code> for centered alignment in the row which separates the header from +the table body.</p> +<pre><code>| Heading1 | Heading2 | Heading3 | +| :------- | :------: | -------: | +| Left | Center | Right | +</code></pre> +<h2>Other interesting stuff</h2> +<ul> +<li><p>to insert a horizontal rule simple add <code>- - -</code> into an empty line:</p> +<pre><code>Hello +- - - +Hello2 +</code></pre> +<p>Result: +</p> +<pre><code>&lt;p&gt; +Hello +&lt;hr /&gt; +</code></pre> +<pre><code>Hello2&lt;/p&gt; +</code></pre> +</li> +<li><p>Any ASCII punctuation character may escaped by precedeing them with a +backslash to avoid them being interpreted:</p> +<pre><code>!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[]^_`{|}~\ +</code></pre> +</li> +<li><p>To force a linebreak simple add two spaces to the end of the line:</p> +<pre><code>No linebreak +here. +But here is +one. +</code></pre> +</li> +</ul> +<h2>embed HTML</h2> +<p>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't want this +behaviour, use the <code>-n</code> flag when executing smu to stricly escape the HTML +tags.</p> + + https://barf.bt.ht/markdown-examples + 2023-01-05T10:00:00Z + 2023-01-05T10:00:00Z + + + Running `barf` on MacOS + <h1>Running <code>barf</code> on MacOS</h1> +<p>2023-01-18</p> +<p>The <code>barf</code> 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't mean MacOS needs to be left out in the cold.</p> +<p>There are some very minor changes you'll need to make to your default <code>sed</code> and <code>date</code> paths if you plan to run barf on MacOS.</p> +<h2>Download Packages</h2> +<p>This walkthrough assumes that you already have <a href="https://brew.sh/">homebrew</a> installed on your machine.</p> +<p>You will need to install the GNU versions of both <code>date</code> and <code>sed</code> in order to avoid breaking things when <code>barf</code> tries to build.</p> +<pre><code>brew install coreutils +brew install gnu-sed +</code></pre> +<h2>Setting <code>gsed</code> and <code>gdate</code> as Default</h2> +<p>Now run the following in a terminal shell:</p> +<pre><code>sudo ln -fs /opt/homebrew/bin/gsed /usr/local/bin/sed +sudo ln -fs /opt/homebrew/bin/gdate /usr/local/bin/date +</code></pre> +<p>and add the following to your <code>.bash_profile</code> file:</p> +<pre><code>export PATH=&quot;/usr/local/bin:$PATH&quot; +</code></pre> +<p>Reload your <code>bash</code> instance and everything should work as intended!</p> + + https://barf.bt.ht/macos + 2023-01-18T10:00:00Z + 2023-01-18T10:00:00Z + + + Supporting Basic Dark Mode + <h1>Supporting Basic Dark Mode</h1> +<p>2023-03-07</p> +<p>The default <code>barf</code> site generator now supports basic dark mode functionality. This has been achieved by including the standard <code>color-scheme</code> meta tag in the core <code>header.html</code> file:</p> +<pre><code>&lt;meta name=&quot;color-scheme&quot; content=&quot;dark light&quot;&gt; +</code></pre> +<p>This change also ships with some minor updates to the default <code>blockquote</code> design. You can see an example below:</p> +<blockquote><p>This is a really <em>cool</em> blockquote</p> +</blockquote> +<h2>Minor Caveat</h2> +<p>Unfortunately, Safari still has minor <code>ahref</code> / link color issue when defaulting to browser dark mode. If this is a problem for your own build of <code>barf</code>, take a look at a <a href="https://bt.ht/safari-default-dark-mode/">solution I wrote about here</a>.</p> +<p>Personally, I can'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't be using Safari anyway - it's proprietary garbage.</p> + + https://barf.bt.ht/dark-mode + 2023-03-07T10:00:00Z + 2023-03-07T10:00:00Z + + + Cleaning Up barf's Structure + <h1>Cleaning Up barf's Structure</h1> +<p>2023-10-09</p> +<p>Things probably look a little different around here. Both in terms of this demo site <em>and</em> the core <code>barf</code> files itself.</p> +<p>This project was always intended to be focused on Linux platforms. So, I've removed the included <code>barf_macos</code> and <code>barf_openbsd</code> 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:</p> +<ul> +<li><a href="/macos">Running <code>barf</code> on MacOS</a></li> +<li><a href="/openbsd">Running <code>barf</code> on OpenBSD</a></li> +</ul> +<p>As for the "default" look of <code>barf</code>, I've simplified things further. The total CSS styling now consists of only:</p> +<pre><code>*{box-sizing:border-box;} +body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;} +img{max-width:100%;} +pre{overflow:auto;} +</code></pre> +<p>Users still have the ability to tweak things as much as they'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 <code>head</code> tags:</p> +<pre><code>&lt;meta name=&quot;color-scheme&quot; content=&quot;dark light&quot;&gt; +</code></pre> +<p>Hopefully these changes reduce the overall scope of the project, which was a main point made on the README originally!</p> + + https://barf.bt.ht/cleanup + 2023-10-09T10:00:00Z + 2023-10-09T10:00:00Z + + diff --git a/build/cleanup/index.html b/build/cleanup/index.html new file mode 100644 index 0000000..1b8e399 --- /dev/null +++ b/build/cleanup/index.html @@ -0,0 +1,48 @@ + + + + + + + Cleaning Up barf's Structure + + + + + + +
+

Cleaning Up barf's Structure

+

2023-10-09

+

Things probably look a little different around here. Both in terms of this demo site and the core barf files itself.

+

This project was always intended to be focused on Linux platforms. So, I've removed the included barf_macos and barf_openbsd 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:

+ +

As for the "default" look of barf, I've simplified things further. The total CSS styling now consists of only:

+
*{box-sizing:border-box;}
+body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}
+img{max-width:100%;}
+pre{overflow:auto;}
+
+

Users still have the ability to tweak things as much as they'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 head tags:

+
<meta name="color-scheme" content="dark light">
+
+

Hopefully these changes reduce the overall scope of the project, which was a main point made on the README originally!

+ \ No newline at end of file diff --git a/build/dark-mode/index.html b/build/dark-mode/index.html new file mode 100644 index 0000000..5a4c58a --- /dev/null +++ b/build/dark-mode/index.html @@ -0,0 +1,41 @@ + + + + + + + Supporting Basic Dark Mode + + + + + + +
+

Supporting Basic Dark Mode

+

2023-03-07

+

The default barf site generator now supports basic dark mode functionality. This has been achieved by including the standard color-scheme meta tag in the core header.html file:

+
<meta name="color-scheme" content="dark light">
+
+

This change also ships with some minor updates to the default blockquote design. You can see an example below:

+

This is a really cool blockquote

+
+

Minor Caveat

+

Unfortunately, Safari still has minor ahref / link color issue when defaulting to browser dark mode. If this is a problem for your own build of barf, take a look at a solution I wrote about here.

+

Personally, I can'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't be using Safari anyway - it's proprietary garbage.

+ \ No newline at end of file diff --git a/build/index.html b/build/index.html new file mode 100644 index 0000000..5a2de3f --- /dev/null +++ b/build/index.html @@ -0,0 +1,45 @@ + + + + + + + barf + + + + + + +
+

barf

+

barf is an extremely minimal blog generator.

+

The entire build script is less than 100 lines of shell.

+

It could almost be called "suckless", but probably isn't. It was created for those focused on writing, not tinkering.

+

You can learn more by reading the official README and view the generated Atom feed here

+

barf = blogs are really fun

+
+

Articles

+ + \ No newline at end of file diff --git a/build/macos/index.html b/build/macos/index.html new file mode 100644 index 0000000..09b4b60 --- /dev/null +++ b/build/macos/index.html @@ -0,0 +1,49 @@ + + + + + + + Running `barf` on MacOS + + + + + + +
+

Running barf on MacOS

+

2023-01-18

+

The barf 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't mean MacOS needs to be left out in the cold.

+

There are some very minor changes you'll need to make to your default sed and date paths if you plan to run barf on MacOS.

+

Download Packages

+

This walkthrough assumes that you already have homebrew installed on your machine.

+

You will need to install the GNU versions of both date and sed in order to avoid breaking things when barf tries to build.

+
brew install coreutils
+brew install gnu-sed
+
+

Setting gsed and gdate as Default

+

Now run the following in a terminal shell:

+
sudo ln -fs /opt/homebrew/bin/gsed /usr/local/bin/sed
+sudo ln -fs /opt/homebrew/bin/gdate /usr/local/bin/date
+
+

and add the following to your .bash_profile file:

+
export PATH="/usr/local/bin:$PATH"
+
+

Reload your bash instance and everything should work as intended!

+ \ No newline at end of file diff --git a/build/markdown-examples/index.html b/build/markdown-examples/index.html new file mode 100644 index 0000000..7f3e178 --- /dev/null +++ b/build/markdown-examples/index.html @@ -0,0 +1,263 @@ + + + + + + + Markdown Examples in barf + + + + + + +
+

Markdown Examples in barf

+

2023-01-05

+

This following was lifted from https://github.com/karlb/smu

+

smu Syntax

+

smu was started as a rewrite of +markdown but became something +more lightweight and consistent. It differs from CommonMark in the following ways:

+
    +
  • No support for reference style links
  • +
  • Stricter indentation rules for lists
  • +
  • Lists don't end paragraphs by themselves (blank line needed)
  • +
  • Horizontal rules (<hr>) must use - - - as syntax
  • +
  • Code fences have stricter syntax
  • +
+

Patches that increase the CommonMark compatibility are welcome as long as they don't increase the code complexity significantly.

+

This project is a fork of the original smu by +Enno Boland (gottox). The main differences to the +original smu are:

+
    +
  • Support for code fences
  • +
  • Improved CommonMark compatibility. E.g. +
      +
    • Code blocks need four spaces indentation instead of three
    • +
    • Skip empty lines at end of code blocks
    • +
    • Ignore single spaces around code spans
    • +
    • Keep HTML comments in output
    • +
    • Improved spec compliance for lists
    • +
    • Nesting code block in blockquotes works
    • +
    • "Empty" lines in lists behave identically, no matter how much whitespace they contain
    • +
    • No backslash escapes in code blocks
    • +
    • Use first number as start number for ordered lists
    • +
    +
  • +
  • Added a simple test suite to check for compliance and avoid regressions
  • +
+

Inline patterns

+

There are several patterns you can use to highlight your text:

+
    +
  • Emphasis

    + +
      +
    • Surround your text with * or _ to get emphasised text: +
      This *is* cool.
      +This _is_ cool, too.
      +
      +
    • +
    • Surround your text with ** or __ to get strong text: +
      This **is** cool.
      +This __is__ cool, too.
      +
      +
    • +
    • Surround your text with *** or ___ to get strong and emphasised text: +
      This ***is*** cool.
      +This ___is___ cool, too.
      +
      +
    • +
    • But this example won't work as expected: +
      ***Hello** you*
      +
      +

      This is a wontfix bug because it would make the source too complex. +Use this instead: +

      +
      ***Hello*** *you*
      +
      +
    • +
    +
  • +
  • inline Code

    +

    You can produce inline code by surrounding it with backticks.

    +
    Use `rm -rf /` if you're a N00b.
    +Use ``rm -rf /`` if you're a N00b.
    +Use ```rm -rf /``` if you're a N00b.
    +
    +

    Double and triple backticks can be used if the code itself contains backticks.

    +
  • +
+

Titles

+

Creating titles in smu is very easy. There are two different syntax styles. The +first is underlining with at least three characters:

+
Heading
+=======
+
+Topic
+-----
+
+

This is very intuitive and self explaining. The resulting sourcecode looks like +this:

+
<h1>Heading</h1>
+<h2>Topic</h2>
+
+

Use the following prefixes if you don't like underlining:

+
# h1
+## h2
+### h3
+#### h4
+##### h5
+###### h6
+
+

Links

+

The simplest way to define a link is with simple <>.

+
<http://s01.de>
+
+

You can do the same for E-Mail addresses:

+
<yourname@s01.de>
+
+

If you want to define a label for the url, you have to use a different syntax

+
[smu - simple mark up](http://s01.de/~gottox/index.cgi/proj_smu)
+
+

The resulting HTML-Code

+
<a href="http://s01.de/~gottox/index.cgi/proj_smu">smu - simple mark up</a></p>
+
+

Lists

+

Defining lists is very straightforward:

+
* Item 1
+* Item 2
+* Item 3
+
+

Result:

+
<ul>
+<li>Item 1</li>
+<li>Item 2</li>
+<li>Item 3</li>
+</ul>
+
+

Defining ordered lists is also very easy:

+
1. Item 1
+2. Item 2
+3. Item 3
+
+

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:

+
2. Item 1
+2. Item 2
+2. Item 3
+
+

and get the following HTML which will render with the numbers 2, 3, 4:

+
<ol start="2">
+<li>Item 1</li>
+<li>Item 2</li>
+<li>Item 3</li>
+</ol>
+
+

Code & Blockquote

+

Use the > 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:

+
> Hello
+> This is a quote with a [link](http://s01.de/~gottox)
+
+

Result: +

+
<blockquote><p>
+Hello
+This is a quote with a <a href="http://s01.de/~gottox">link</a></p>
+</blockquote>
+
+

You can define a code block with a leading Tab or with 4 leading spaces

+
	this.is(code)
+
+    this.is(code, too)
+
+

Result: +

+
<pre><code>this.is(code)</code></pre>
+<pre><code>this.is(code, too)
+</code></pre>
+
+

Please note that you can't use HTML or smu syntax in a code block.

+

Another way to write code blocks is to use code fences:

+
```json
+{"some": "code"}
+```
+
+

This has two advantages:

+ +
    +
  • The optional language identifier will be turned into a language- class name
  • +
  • You can keep the original indentation which helps when doing copy & paste
  • +
+

Tables

+

Tables can be generated with the following syntax:

+
| Heading1 | Heading2 |
+| -------- | -------- |
+| Cell 1   | Cell2    |
+
+

Aligning the columns make the input nicer to read, but is not necessary to get +correct table output. You could just write

+
| Heading1 | Heading2 |
+| --- | --- |
+| Cell 1 | Cell2 |
+
+

To align the content of table cells, use |:--| for left, |--:| for right +and |:--:| for centered alignment in the row which separates the header from +the table body.

+
| Heading1 | Heading2 | Heading3 |
+| :------- | :------: | -------: |
+| Left     | Center   | Right    |
+
+

Other interesting stuff

+
    +
  • to insert a horizontal rule simple add - - - into an empty line:

    +
    Hello
    +- - -
    +Hello2
    +
    +

    Result: +

    +
    <p>
    +Hello
    +<hr />
    +
    +
    Hello2</p>
    +
    +
  • +
  • Any ASCII punctuation character may escaped by precedeing them with a +backslash to avoid them being interpreted:

    +
    !"#$%&'()*+,-./:;<=>?@[]^_`{|}~\
    +
    +
  • +
  • To force a linebreak simple add two spaces to the end of the line:

    +
    No linebreak
    +here.
    +But here is  
    +one.
    +
    +
  • +
+

embed HTML

+

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't want this +behaviour, use the -n flag when executing smu to stricly escape the HTML +tags.

+ \ No newline at end of file diff --git a/build/openbsd/index.html b/build/openbsd/index.html new file mode 100644 index 0000000..f7d57c4 --- /dev/null +++ b/build/openbsd/index.html @@ -0,0 +1,39 @@ + + + + + + + Running `barf` on OpenBSD + + + + + + +
+

Running barf on OpenBSD

+

2023-08-12

+

The barf 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.

+

Download Packages

+

Along with your Markdown parser of choice (barf assumes you will be using my version of smu) you will also need to install the required packages on your OpenBSD system:

+
doas pkg_add rsync coreutils gsed cmake gcc
+
+

Then ensure that you alter all instances of sed with gsed in the core barf file. (Or make an alias if you'd prefer not to alter the main file)

+

After that, everything should work perfectly fine when building!

+ \ No newline at end of file diff --git a/build/pages.tsv b/build/pages.tsv new file mode 100644 index 0000000..a69e2d0 --- /dev/null +++ b/build/pages.tsv @@ -0,0 +1,2 @@ +pages/about.md About `barf` +pages/websites.md Websites Built with `barf` diff --git a/build/posts.tsv b/build/posts.tsv new file mode 100644 index 0000000..374d954 --- /dev/null +++ b/build/posts.tsv @@ -0,0 +1,5 @@ +posts/openbsd.md Running `barf` on OpenBSD +posts/markdown-examples.md Markdown Examples in barf +posts/macos.md Running `barf` on MacOS +posts/dark-mode.md Supporting Basic Dark Mode +posts/cleanup.md Cleaning Up barf's Structure diff --git a/build/public/images/barf.svg b/build/public/images/barf.svg new file mode 100644 index 0000000..ee024c8 --- /dev/null +++ b/build/public/images/barf.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/build/websites/index.html b/build/websites/index.html new file mode 100644 index 0000000..f1e498f --- /dev/null +++ b/build/websites/index.html @@ -0,0 +1,37 @@ + + + + + + + Websites Built with `barf` + + + + + + +
+

Websites Built with barf

+

Send an email to brad [at] bt [dot] ht if you would like me to add your barf-generated website to this list.

+ + \ No newline at end of file -- cgit v1.2.3-54-g00ecf