From 13343b593bcc2509534de297c8a1c1f3ee5f115a Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 18 Aug 2021 22:24:05 +0300 Subject: chore: add comments and use xdg-open --- Makefile | 7 +++---- compile_emoji_sedstring.sh | 2 ++ hot-reload.sh | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6c0a1a3..d54820e 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,10 @@ +TITLE=Eugene's Space RSYNC_DESTINATION=root@eug-vs.xyz:/var/www/website -BROWSER=brave MARKDOWN=gfm+emoji STYLESHEET=/style.css HEAD=head.html HEADER=header.html -TITLE=Eugene's Space PANDOC_ARGS=-s --from=$(MARKDOWN) --to=html -c $(STYLESHEET) -B $(HEADER) -H $(HEAD) --shift-heading-level-by=1 --highlight-style=gruvbox.theme LINK_SEDSTRING=s/.md)/.html)/g; @@ -14,7 +13,7 @@ LOCALIZE_SEDSTRING=s|\"/|\"$(PWD)/|; UNLOCALIZE_SEDSTRING=s|$(PWD)||; -SOURCES=$(wildcard *.md blog/*.md) +SOURCES=$(wildcard *.md blog/*.md articles/*.md) HTML=$(patsubst %.md, %.html, $(SOURCES)) @@ -39,7 +38,7 @@ blog/preview.md: blog/index.md @sed -n "s/^-/ -/; s|(|(blog/| ; /^ -/p" $< | head -n 4 > $@ open: $(HTML) - $(BROWSER) index.html + xdg-open index.html deploy: $(HTML) $(MAKE) unlocalize diff --git a/compile_emoji_sedstring.sh b/compile_emoji_sedstring.sh index 3337e59..3856866 100755 --- a/compile_emoji_sedstring.sh +++ b/compile_emoji_sedstring.sh @@ -1,4 +1,6 @@ #!/bin/sh +# Return a large sed command that will substitute all :emoji: listed in /public/emoji with + SIZE=24px STYLE="margin-bottom: -4px;" diff --git a/hot-reload.sh b/hot-reload.sh index d794c28..7d5def5 100755 --- a/hot-reload.sh +++ b/hot-reload.sh @@ -1 +1,4 @@ +#!/bin/sh +# Automatically recompile Markdown sources when they change + find -type f -name '*.md' | entr -s "make localize" -- cgit v1.2.3