aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh30
-rw-r--r--feed-top.xml10
-rw-r--r--src/blog/blog.md4
-rw-r--r--src/blog/feed.xml13
-rw-r--r--top.html3
5 files changed, 59 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 1308a99..4e117b3 100755
--- a/build.sh
+++ b/build.sh
@@ -29,4 +29,34 @@ recursivebuild() {
29 done 29 done
30} 30}
31 31
32makeblog() {
33 bf=src/blog/blog.md
34 ff=src/blog/feed.xml
35
36 printf "# Blog\n\n[RSS Feed](feed.xml)\n\n" > $bf
37 cp feed-top.xml $ff
38
39 for i in $(ls src/blog | sort -r); do
40 if [ -d src/blog/$i ]; then
41 f="src/blog/$i/*.md"
42 d=$(grep -E '^[0-9]{4}-[0-9]{2}-[0-9]{2}$' $f)
43 t=$(head -n 1 $f | sed 's/# //')
44 echo "* $d [$t]($i)" >> $bf
45
46 echo "<item>" >> $ff
47 echo "<title>$t</title>" >> $ff
48 echo "<link>https://sebastiano.tronto.net/blog/$i</link>" >> $ff
49 echo "<description>$t</description>" >> $ff
50 echo "<pubDate>$d</pubDate>" >> $ff
51 echo "</item>" >> $ff
52 echo "" >> $ff
53 fi
54 done
55
56 echo "" >> $ff
57 echo "</channel>" >> $ff
58 echo "</rss>" >> $ff
59}
60
61makeblog
32recursivebuild src 62recursivebuild src
diff --git a/feed-top.xml b/feed-top.xml
new file mode 100644
index 0000000..b4e2251
--- /dev/null
+++ b/feed-top.xml
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="UTF-8" ?>
2<rss version="2.0">
3
4<channel>
5<title>Sebastiano Tronto's blog</title>
6<link>https://sebastiano.tronto.net/blog</link>
7<description>
8Thoughts about software, computers and whatever I feel like sharing
9</description>
10
diff --git a/src/blog/blog.md b/src/blog/blog.md
new file mode 100644
index 0000000..aa51ab7
--- /dev/null
+++ b/src/blog/blog.md
@@ -0,0 +1,4 @@
1# Blog
2
3[RSS Feed](feed.xml)
4
diff --git a/src/blog/feed.xml b/src/blog/feed.xml
new file mode 100644
index 0000000..7154cf8
--- /dev/null
+++ b/src/blog/feed.xml
@@ -0,0 +1,13 @@
1<?xml version="1.0" encoding="UTF-8" ?>
2<rss version="2.0">
3
4<channel>
5<title>Sebastiano Tronto's blog</title>
6<link>https://sebastiano.tronto.net/blog</link>
7<description>
8Thoughts about software, computers and whatever I feel like sharing
9</description>
10
11
12</channel>
13</rss>
diff --git a/top.html b/top.html
index 0a193d6..6dd90ac 100644
--- a/top.html
+++ b/top.html
@@ -41,7 +41,8 @@
41 <td class="links"> 41 <td class="links">
42 <a href="/research/">Research</a> | 42 <a href="/research/">Research</a> |
43 <a href="/git/">Git</a> | 43 <a href="/git/">Git</a> |
44 <a href="/speedcubing/">Cubing</a> 44 <a href="/speedcubing/">Cubing</a> |
45 <a href="/blog/">Blog</a>
45 </td> 46 </td>
46 </tr> 47 </tr>
47 </table> 48 </table>

Generated with cgit - Back to sebastiano.tronto.net