diff options
author | Bradley Taunt <bt@btxx.org> | 2024-06-06 09:35:41 -0400 |
---|---|---|
committer | Bradley Taunt <bt@btxx.org> | 2024-06-06 09:35:41 -0400 |
commit | 1d280856feae01dc135cdbb28bfa681ad7d6a63e (patch) | |
tree | 858612afbd93aa1e7cc921f6a865d720acc68a8c | |
parent | 7b2dc83a3a3b2da494e1b1370e3ecac94a9c9342 (diff) |
Update RSS structure, testing check for operating system
-rwxr-xr-x | barf | 6 | ||||
-rw-r--r-- | build/about/index.html | 3 | ||||
-rw-r--r-- | build/atom.xml | 2 | ||||
-rw-r--r-- | build/cleanup/index.html | 3 | ||||
-rw-r--r-- | build/dark-mode/index.html | 3 | ||||
-rw-r--r-- | build/index.html | 3 | ||||
-rw-r--r-- | build/macos/index.html | 3 | ||||
-rw-r--r-- | build/markdown-examples/index.html | 3 | ||||
-rw-r--r-- | build/openbsd/index.html | 3 | ||||
-rw-r--r-- | build/rss.xml | 46 | ||||
-rw-r--r-- | build/websites/index.html | 3 | ||||
-rw-r--r-- | header.html | 3 |
12 files changed, 45 insertions, 36 deletions
@@ -1,5 +1,7 @@ #!/bin/sh +domain="https://barf.btxx.org" + # Check the operating system os_name=$(uname -s) @@ -48,7 +50,6 @@ index_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 <<EOF @@ -87,7 +88,6 @@ EOF 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 @@ -112,7 +112,7 @@ EOF cat <<EOF <item> <title>$title</title> - <description><![CDATA[$content]]></description> + <description>$content</description> <link>$domain/$post_link</link> <guid isPermaLink="false">$domain/$post_link</guid> <pubDate>$published_date</pubDate> diff --git a/build/about/index.html b/build/about/index.html index be0489e..fac6c41 100644 --- a/build/about/index.html +++ b/build/about/index.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>About `barf`</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> diff --git a/build/atom.xml b/build/atom.xml index dfe09d2..dfdebe1 100644 --- a/build/atom.xml +++ b/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-06T08:34:47Z</updated> + <updated>2024-06-06T08:48:45Z</updated> <author> <name>Bradley Taunt</name> </author> diff --git a/build/cleanup/index.html b/build/cleanup/index.html index 16b7672..4c24c20 100644 --- a/build/cleanup/index.html +++ b/build/cleanup/index.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>Cleaning Up barf's Structure</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> diff --git a/build/dark-mode/index.html b/build/dark-mode/index.html index a5aaf19..1c2ecd5 100644 --- a/build/dark-mode/index.html +++ b/build/dark-mode/index.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>Supporting Basic Dark Mode</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> diff --git a/build/index.html b/build/index.html index b47b9af..6786dc8 100644 --- a/build/index.html +++ b/build/index.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>barf</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> diff --git a/build/macos/index.html b/build/macos/index.html index f3d1d74..02464e5 100644 --- a/build/macos/index.html +++ b/build/macos/index.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>Running `barf` on MacOS</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> diff --git a/build/markdown-examples/index.html b/build/markdown-examples/index.html index 043a664..1e28801 100644 --- a/build/markdown-examples/index.html +++ b/build/markdown-examples/index.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>Markdown Examples in barf</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> diff --git a/build/openbsd/index.html b/build/openbsd/index.html index 7d75ce1..1b80e58 100644 --- a/build/openbsd/index.html +++ b/build/openbsd/index.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>Running `barf` on OpenBSD</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> diff --git a/build/rss.xml b/build/rss.xml index 065e51d..52220d3 100644 --- a/build/rss.xml +++ b/build/rss.xml @@ -2,15 +2,15 @@ <rss version="2.0"> <channel> <title>barf</title> - <link>/rss.xml</link> + <link>https://barf.btxx.org/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> + <lastBuildDate>Thu, 06 Jun 2024 12:48:45 +0000</lastBuildDate> + <pubDate>Thu, 06 Jun 2024 12:48:45 +0000</pubDate> <generator>Custom RSS Generator</generator> <ttl>1800</ttl> <item> <title>Running `barf` on OpenBSD</title> - <description><![CDATA[<h1>Running <code>barf</code> on OpenBSD</h1> + <description><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> @@ -18,14 +18,14 @@ <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>]]></description> - <link>/openbsd</link> - <guid isPermaLink="false">/openbsd</guid> +<p>After that, everything should work perfectly fine when building!</p></description> + <link>https://barf.btxx.org/openbsd</link> + <guid isPermaLink="false">https://barf.btxx.org/openbsd</guid> <pubDate>Sat, 12 Aug 2023 00:00:00 +0000</pubDate> </item> <item> <title>Markdown Examples in barf</title> - <description><![CDATA[<h1>Markdown Examples in barf</h1> + <description><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> @@ -257,14 +257,14 @@ one. 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>]]></description> - <link>/markdown-examples</link> - <guid isPermaLink="false">/markdown-examples</guid> +tags.</p></description> + <link>https://barf.btxx.org/markdown-examples</link> + <guid isPermaLink="false">https://barf.btxx.org/markdown-examples</guid> <pubDate>Thu, 05 Jan 2023 00:00:00 +0000</pubDate> </item> <item> <title>Running `barf` on MacOS</title> - <description><![CDATA[<h1>Running <code>barf</code> on MacOS</h1> + <description><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> @@ -282,14 +282,14 @@ sudo ln -fs /opt/homebrew/bin/gdate /usr/local/bin/date <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>]]></description> - <link>/macos</link> - <guid isPermaLink="false">/macos</guid> +<p>Reload your <code>bash</code> instance and everything should work as intended!</p></description> + <link>https://barf.btxx.org/macos</link> + <guid isPermaLink="false">https://barf.btxx.org/macos</guid> <pubDate>Wed, 18 Jan 2023 00:00:00 +0000</pubDate> </item> <item> <title>Supporting Basic Dark Mode</title> - <description><![CDATA[<h1>Supporting Basic Dark Mode</h1> + <description><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; @@ -299,14 +299,14 @@ sudo ln -fs /opt/homebrew/bin/gdate /usr/local/bin/date </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>]]></description> - <link>/dark-mode</link> - <guid isPermaLink="false">/dark-mode</guid> +<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></description> + <link>https://barf.btxx.org/dark-mode</link> + <guid isPermaLink="false">https://barf.btxx.org/dark-mode</guid> <pubDate>Tue, 07 Mar 2023 00:00:00 +0000</pubDate> </item> <item> <title>Cleaning Up barf's Structure</title> - <description><![CDATA[<h1>Cleaning Up barf's Structure</h1> + <description><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> @@ -323,9 +323,9 @@ pre{overflow:auto;} <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>]]></description> - <link>/cleanup</link> - <guid isPermaLink="false">/cleanup</guid> +<p>Hopefully these changes reduce the overall scope of the project, which was a main point made on the README originally!</p></description> + <link>https://barf.btxx.org/cleanup</link> + <guid isPermaLink="false">https://barf.btxx.org/cleanup</guid> <pubDate>Mon, 09 Oct 2023 00:00:00 +0000</pubDate> </item> </channel> diff --git a/build/websites/index.html b/build/websites/index.html index 417afa5..29715cd 100644 --- a/build/websites/index.html +++ b/build/websites/index.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>Websites Built with `barf`</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> diff --git a/header.html b/header.html index b621f2e..7b95bf6 100644 --- a/header.html +++ b/header.html @@ -5,7 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>{{TITLE}}</title> - <link href="https://barf.btxx.org/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}</style> </head> |