summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mds/blog/blog-index.md13
-rwxr-xr-xpublish-blog.sh21
-rw-r--r--tidy.conf1
-rw-r--r--www/blog/index.html30
4 files changed, 51 insertions, 14 deletions
diff --git a/mds/blog/blog-index.md b/mds/blog/blog-index.md
new file mode 100644
index 0000000..9691e42
--- /dev/null
+++ b/mds/blog/blog-index.md
@@ -0,0 +1,13 @@
+<article>
+# Blog Index
+
+<!--NEXT-->
+1. [2022-11-06 - My Markdown -> HTML Setup](/blog/2022-11-06/)
+1. [2021-01-05 - Manjaro Followup - Breaking things!](/blog/2021-01-05/)
+1. [2020-12-17 - Manjaro Experiment](/blog/2020-12-17/)
+1. [2020-02-17 - Bread Blog (First post)](/blog/bread/#2020-02-17/)
+1. [2020-01-13 - remember/recall - what could've been a command line tool](/blog/2020-01-13/)
+1. [2019-12-09 - Lisps, Assembly, C, and Conlangs](/blog/2019-12-09/)
+1. [2019-02-17 - Venturing back into C](/blog/2019-02-17/)
+1. [2019-01-21 - First! A New Years Resolution](/blog/2019-01-21/)
+</article>
diff --git a/publish-blog.sh b/publish-blog.sh
index e36ee63..c5a483f 100755
--- a/publish-blog.sh
+++ b/publish-blog.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
set -ex
if [ $# -gt 2 ]; then
@@ -42,3 +43,23 @@ mkdir -p ${path}
sed -E -i "s/BLOG_DATE/${date}/" $out
+# Update index (if needed)
+
+index=mds/blog/blog-index.md
+
+## check if exists
+exists=0
+grep -q -c "$isodate - $title" $index || exists=$?
+
+# Doesn't exist
+if [ $exists -eq 1 ]; then
+ marker="<!--NEXT-->"
+ line="1. [${isodate} - ${title}](/blog/${isodate}/)"
+ sed -E -i "/$marker/a $line" $index
+ ./compile-md.sh page "Blog Index" $index www/blog/index.html
+else
+ echo "Already exists in index - not updating"
+fi
+
+echo "Done"
+
diff --git a/tidy.conf b/tidy.conf
index f43552a..d6260a4 100644
--- a/tidy.conf
+++ b/tidy.conf
@@ -10,3 +10,4 @@ uppercase-tags: no
uppercase-attributes: no
new-pre-tags: code,
show-warnings: no
+hide-comments: yes
diff --git a/www/blog/index.html b/www/blog/index.html
index f1a98c2..4bd5c1a 100644
--- a/www/blog/index.html
+++ b/www/blog/index.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="generator"
content="HTML Tidy for HTML5 for Linux version 5.6.0">
- <title>senders.io - Homepage</title>
+ <title>senders.io - Blog Index</title>
<link rel='stylesheet'
type='text/css'
href='/index.css'>
@@ -16,43 +16,45 @@
<a class='title'
href='/'>senders.io</a>
<nav>
- <a href="/resume">Resume</a> <a href="/blog">Blog</a> <a href=
- "https://github.com/s3nd3r5">Github</a>
+ <a href="/resume">Resume</a> <a href="/blog">Blog</a> <a rel=
+ "noopener noreferrer external"
+ target="_blank"
+ href="https://github.com/s3nd3r5">Github</a>
</nav>
</div>
- <div id='body'>
+ <div id="body"
+ class="blog index">
<article>
<h1>Blog Index</h1>
<ol>
- <!-- {{ NEW-POST }} -->
<li>
- <a href='/blog/2022-11-06'>2022-11-06 - My Markdown -&gt; HTML
+ <a href="/blog/2022-11-06/">2022-11-06 - My Markdown -&gt; HTML
Setup</a>
</li>
<li>
- <a href='/blog/2021-01-05'>2021-01-05 - Manjaro Followup - Breaking
+ <a href="/blog/2021-01-05/">2021-01-05 - Manjaro Followup - Breaking
things!</a>
</li>
<li>
- <a href='/blog/2020-12-17'>2020-12-17 - Manjaro Experiment</a>
+ <a href="/blog/2020-12-17/">2020-12-17 - Manjaro Experiment</a>
</li>
<li>
- <a href='/blog/bread/#2020-02-17'>2020-02-17 - Bread Blog (First
+ <a href="/blog/bread/#2020-02-17/">2020-02-17 - Bread Blog (First
post)</a>
</li>
<li>
- <a href='/blog/2020-01-13'>2020-01-13 - remember/recall - what
- could&#39;ve been a command line tool</a>
+ <a href="/blog/2020-01-13/">2020-01-13 - remember/recall - what
+ could’ve been a command line tool</a>
</li>
<li>
- <a href='/blog/2019-12-09'>2019-12-09 - Lisps, Assembly, C, and
+ <a href="/blog/2019-12-09/">2019-12-09 - Lisps, Assembly, C, and
Conlangs</a>
</li>
<li>
- <a href='/blog/2019-02-17'>2019-02-17 - Venturing back into C</a>
+ <a href="/blog/2019-02-17/">2019-02-17 - Venturing back into C</a>
</li>
<li>
- <a href='/blog/2019-01-21'>2019-01-21 - First! A New Years
+ <a href="/blog/2019-01-21/">2019-01-21 - First! A New Years
Resolution</a>
</li>
</ol>