summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile10
-rwxr-xr-xindex.md3
3 files changed, 13 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 2d19fc7..07c47a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
*.html
+blog/preview.md
diff --git a/Makefile b/Makefile
index da817c9..9025e5e 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,14 @@ all: $(HTML)
@echo $@
@sed "$(LINK_SEDSTRING) $(EMOJI_SEDSTRING)" $< | pandoc $(PANDOC_ARGS) > $@
+index.html: index.md blog/preview.md
+ @echo $@
+ @sed "/Recent blog posts/r blog/preview.md" $< | sed "$(LINK_SEDSTRING) $(EMOJI_SEDSTRING)" | pandoc $(PANDOC_ARGS) > $@
+
+blog/preview.md: blog/index.md
+ @echo $@
+ @sed -n "s/^-/ -/; /^ -/p" $< | head -n 4 > $@
+
open: $(HTML)
$(BROWSER) index.html
@@ -28,5 +36,5 @@ deploy: $(HTML)
rsync -zarv --exclude=".git" --exclude="*.md" . $(RSYNC_DESTINATION)
clean:
- rm -f $(HTML)
+ rm -f $(HTML) blog/preview.md
diff --git a/index.md b/index.md
index a1dc5ae..85c3371 100755
--- a/index.md
+++ b/index.md
@@ -9,6 +9,9 @@ This website runs on my local *Raspberry Pi* and features secure **HTTPS** conne
No bullshit, ads, trackers or client-side JavaScript here.
+# Recent blog posts
+ - [See all...](./blog/index.md)
+
# Articles :page_with_curl:
- [TaskWarrior is all you need to be productive! :taskwarrior:](taskwarrior.md)