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 --- LICENSE | 21 +++ Makefile | 13 ++ README.md | 151 +++++++++++++++++ barf | 105 ++++++++++++ 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 ++++ footer.html | 14 ++ header.html | 16 ++ index.md | 15 ++ pages/about.md | 9 + pages/websites.md | 7 + posts/cleanup.md | 27 +++ posts/dark-mode.md | 19 +++ posts/macos.md | 31 ++++ posts/markdown-examples.md | 254 ++++++++++++++++++++++++++++ posts/openbsd.md | 17 ++ public/images/barf.svg | 17 ++ 27 files changed, 1632 insertions(+) create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md create mode 100755 barf 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 create mode 100644 footer.html create mode 100644 header.html create mode 100644 index.md create mode 100644 pages/about.md create mode 100644 pages/websites.md create mode 100644 posts/cleanup.md create mode 100644 posts/dark-mode.md create mode 100644 posts/macos.md create mode 100644 posts/markdown-examples.md create mode 100644 posts/openbsd.md create mode 100644 public/images/barf.svg diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9366256 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Bradley Taunt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b16a580 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +build: + sh ./barf + rsync -r public/ build/public + +clean: + rm -rf build/* + +watch: + while true; do \ + ls -d .git/* * posts/* pages/* header.html | entr -cd make ;\ + done + +.PHONY: build clean watch diff --git a/README.md b/README.md new file mode 100644 index 0000000..bcd498b --- /dev/null +++ b/README.md @@ -0,0 +1,151 @@ +# 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. + +(barf is a modified/forked version of Karl Bartel's fantastic [blog.sh](https://github.com/karlb/karl.berlin). Be sure to check it out since my version does things slightly different.) + +You can see a [live demo here](https://barf.btxx.org) + +# Why 'barf'? + +> **barf** +> +> Blogs Are Really Fun + +--- + +# Core Features + +- Extremely portable +- Automatic, **valid** RSS generation +- Handles both blog posts and normal pages +- No front matter or templating, just create markdown files + +--- + +# Requirements + +`barf` was originally built on and for Linux, but has since been updated to +include support for both OpenBSD and MacOS out-of-the-box. + +## Linux + +- rsync +- smu (see below) +- entr (optonal) +- standard UNIX tools + +## OpenBSD + +Please refer to the [main tutorial on setting up barf on +OpenBSD](https://barf.btxx.org/openbsd) + +- coreutils +- gcc +- cmake +- rsync +- gsed +- smu (see below) +- entr (optional) + +## MacOS + +Please refer to the [main tutorial on setting up barf on +MacOS](https://barf.btxx.org/macos) + +- coreutils +- gnu-sed +- rsync +- smu (see below) +- entr (optional) + +--- + +# Basic Setup + +Clone this repo and navigate inside it. Edit the "header.html" and "footer.html" files with your own information, navigation, etc. + +Be sure to edit the **RSS meta url** or else your feed won't validate! + +Then, clone and build my patched version of smu: + +```sh +git clone https://git.btxx.org/smu +cd smu +# OpenBSD users: change sudo to doas +sudo make install +``` + +Then clone this directory and build: + +```sh +make build +``` + +Your blog content will be in the `build` directory. + +Now you can delete the dummy posts/pages and start making your own! + +Media (such as images, videos) are placed in the "public" folder and carried over to the "build" folder via rsync. You can easily remove this altogether inside the main `barf` script if you plan to store media elsewhere (or not use any at all). + +--- + +# Post Structure + +The first line of any markdown file inside your `posts` directory should start +with a h1 heading, then a line break, then the date in `YYYY-MM-DD` format. +Like so: + + + # This is the Post Title + + 2023-01-05 + + +Changing this structure or date format will break things or require you to edit +the `barf` script accordingly. + +# Projects Goals + +- The core focus should be to **reduce** the code of this project, not increase it. Overall scope needs to remain small. +- Major tweaks/add-ons should be run by individuals via forks/patches - not put into the barf base + +--- + +# Submitting Patches + +Please [send me patches via git email](mailto:bt@btxx.org) to submit +your patches or bug fixes. Thanks! + +--- + +# FAQs + +## How do I test locally? + +Inside your project directory run: + +```sh +make watch +cd build && python3 -m http.server 3003 +``` + +## Do you plan to add "X"? Can *I* add "X"? + +Most likely not. I'm happy with how things are currently. If you want to add something - great! The point of this project is to give others the ability to fork it, tweak it, patch it, and share it as much as they'd like. The core of barf will remain minimal for this reason. + +Of course, any patches that can help *reduce* the project's footprint or even speed things up are more than welcome! + +## Can I use other Markdown parsers? + +Of course! Simply edit the main `barf` script and swap out `smu` with something else. I wouldn't advise doing this if you already have pre-existing content based-off `smu`, since this could break some of your pages. + +But give [smu](https://git.btxx.org/smu) a try - it is very lightweight and fast! + +``` +MORE FAQs TO COME... +``` diff --git a/barf b/barf new file mode 100755 index 0000000..81bbcd2 --- /dev/null +++ b/barf @@ -0,0 +1,105 @@ +#!/bin/sh +set -eu +MARKDOWN=smu +IFS=' ' + +# Create tab separated file with filename, title, creation date, last update +index_tsv() { + for f in "$1"/*.md + do + title=$(sed -n '/^# /{s/# //p; q}' "$f") + printf '%s\t%s\t%s\t%s\n' "$f" "${title:="No Title"}" + done +} + +index_html() { + # Print header + title=$(sed -n '/^# /{s/# //p; q}' index.md) + sed "s/{{TITLE}}/$title/" header.html + + # Intro text + $MARKDOWN index.md + + echo "" + + # Print footer after post list + cat footer.html +} + +atom_xml() { + uri=$(sed -rn '/atom.xml/ s/.*href="([^"]*)".*/\1/ p' header.html) + domain=$(echo "$uri" | sed 's/atom.xml//g' | sed 's|/[^/]*$||') + first_commit_date=$(git log --pretty='format:%ai' . | cut -d ' ' -f1 | tail -1) + + cat < + + $(sed -n '/^# /{s/# //p; q}' index.md) + + $(date +%FT%TZ) + + $(git config user.name) + + $domain,$first_commit_date:default-atom-feed/ +EOF + + while read -r f title created; do + + content=$($MARKDOWN "$f" | sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/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 +%Y-%m-%dT10:%M:%SZ) + + cat < + $title + $content + + $domain/$post_link + $published_date + $published_date + +EOF + done < "$1" + + echo '' +} + +write_page() { + filename=$1 + directory=$(echo $(basename "$filename" .md)) + $(mkdir -p build/$directory) + target=$(echo "$filename" | sed -r 's|\w+/(.*).md|build/\1/index.html|') + created=$(echo $(head -3 "$filename" | tail -1)) + title=$2 + + $MARKDOWN "$filename" | \ + cat header.html - |\ + sed "s|{{TITLE}}|$title|" \ + > "$target" && cat footer.html >> "$target" +} + +rm -rf build && mkdir build + +# Blog posts +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 +while read -r f title created; do + write_page "$f" "$title" "$created" +done < build/posts.tsv + +# Pages +index_tsv pages > build/pages.tsv +while read -r f title created; do + write_page "$f" "$title" "$created" +done < build/pages.tsv 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 diff --git a/footer.html b/footer.html new file mode 100644 index 0000000..cec016d --- /dev/null +++ b/footer.html @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/header.html b/header.html new file mode 100644 index 0000000..03eac64 --- /dev/null +++ b/header.html @@ -0,0 +1,16 @@ + + + + + + + {{TITLE}} + + + + + + +
diff --git a/index.md b/index.md new file mode 100644 index 0000000..238aeba --- /dev/null +++ b/index.md @@ -0,0 +1,15 @@ +# 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](https://git.sr.ht/~bt/barf) and view the generated [Atom feed here](/atom.xml) + +**barf** = blogs are really fun + +--- + +### Articles diff --git a/pages/about.md b/pages/about.md new file mode 100644 index 0000000..78eb6ef --- /dev/null +++ b/pages/about.md @@ -0,0 +1,9 @@ +# 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](https://github.com/karlb/karl.berlin). + +## Why? + +This project was created by me, [Bradley Taunt](https://bt.ht), 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. diff --git a/pages/websites.md b/pages/websites.md new file mode 100644 index 0000000..582ab78 --- /dev/null +++ b/pages/websites.md @@ -0,0 +1,7 @@ +# 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. + +- [barf.bt.ht](https://barf.bt.ht) +- [adast.dk](https://adast.dk) +- [arena.adast.dk](https://arena.adast.dk) diff --git a/posts/cleanup.md b/posts/cleanup.md new file mode 100644 index 0000000..6cf7377 --- /dev/null +++ b/posts/cleanup.md @@ -0,0 +1,27 @@ +# 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: + +- [Running `barf` on MacOS](/macos) +- [Running `barf` on OpenBSD](/openbsd) + +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: + +``` + +``` + +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/posts/dark-mode.md b/posts/dark-mode.md new file mode 100644 index 0000000..e31c24c --- /dev/null +++ b/posts/dark-mode.md @@ -0,0 +1,19 @@ +# 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: + +``` + +``` + +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](https://bt.ht/safari-default-dark-mode/). + +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/posts/macos.md b/posts/macos.md new file mode 100644 index 0000000..85f2630 --- /dev/null +++ b/posts/macos.md @@ -0,0 +1,31 @@ +# 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](https://brew.sh/) 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! diff --git a/posts/markdown-examples.md b/posts/markdown-examples.md new file mode 100644 index 0000000..dc3d2dc --- /dev/null +++ b/posts/markdown-examples.md @@ -0,0 +1,254 @@ +# Markdown Examples in barf + +2023-01-05 + +This following was lifted from [https://github.com/karlb/smu](https://github.com/karlb/smu) + +`smu` Syntax +============ + +smu was started as a rewrite of +[markdown](http://daringfireball.net/projects/markdown/) but became something +more lightweight and consistent. It differs from [CommonMark](https://commonmark.org/) 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 (`
`) 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](https://github.com/gottox/smu) by +[Enno Boland (gottox)](https://eboland.de). The main differences to the +original smu are: + +* Support for code fences +* Improved [CommonMark](https://commonmark.org/) 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: + +

Heading

+

Topic

+ +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 `<>`. + + + +You can do the same for E-Mail addresses: + + + +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 + + smu - simple mark up

+ +Lists +----- + +Defining lists is very straightforward: + + * Item 1 + * Item 2 + * Item 3 + +Result: + +
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
+ +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: + +
    +
  1. Item 1
  2. +
  3. Item 2
  4. +
  5. Item 3
  6. +
+ +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: +

+ Hello + This is a quote with a link

+
+ + +You can define a code block with a leading Tab or with __4__ leading spaces + + this.is(code) + + this.is(code, too) + +Result: +
this.is(code)
+
this.is(code, too)
+	
+ +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: +

+ Hello +


+ + Hello2

+ +* 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. diff --git a/posts/openbsd.md b/posts/openbsd.md new file mode 100644 index 0000000..82200e0 --- /dev/null +++ b/posts/openbsd.md @@ -0,0 +1,17 @@ +# 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](https://git.sr.ht/~bt/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! diff --git a/public/images/barf.svg b/public/images/barf.svg new file mode 100644 index 0000000..ee024c8 --- /dev/null +++ b/public/images/barf.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + -- cgit v1.2.3-54-g00ecf