diff --git a/Makefile b/Makefile
index 9749fec..163ae5a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,52 @@
SHELL = /bin/sh
-INSTALLDIR_HTML := ./public_html/eh/eh/eh/eh-eh/
-INSTALLDIR_ANSI := ./public_ansi/
+
+SRCDIR := src
+BUILDDIR := build
+
+INSTALLDIR_HTML := public_html/eh/eh/eh/eh-eh/
+INSTALLDIR_ANSI := public_ansi/
+
+ARTICLEDIR := articles
+PANDOCDIR := pandoc
+STYLEDIR := styles
+IMAGEDIR := images
# The name of the stylesheet. This needs to be copied to any directory containing html files that use it.
-style := style.css
-images := images
+style := $(STYLEDIR)/style.css
# Main html template that pandoc uses to generate .html from .md files
-template_html := pandoc/template.html
-template_ansi := pandoc/template
+template_html := $(PANDOCDIR)/template.html
+template_ansi := $(PANDOCDIR)/template
# Template for extracting metadata of .md files in json format
-list_template := pandoc/meta-json-template.txt
+list_template := $(PANDOCDIR)/meta-json-template.txt
+
+# Location of the shark.js
+shark_js := $(PANDOCDIR)/shark.js
# List of articles with their metadata to be used in the creation of the article list in index.html
-article_list := articles.json
+article_list := $(SRCDIR)/articles.json
# article targets
-articles_html := $(patsubst %.md,%.html,$(wildcard articles/*.md))
-articles_ansi := $(patsubst %.md,%,$(wildcard articles/*.md))
+articles_md := $(wildcard $(SRCDIR)/$(ARTICLEDIR)/*.md)
-all: index.html index about.html about
+articles_html := $(patsubst $(SRCDIR)/%.md, $(BUILDDIR)/%.html, $(articles_md))
+articles_ansi := $(patsubst $(SRCDIR)/%.md, $(BUILDDIR)/%, $(articles_md))
+
+all: $(BUILDDIR)/index.html $(BUILDDIR)/index
install:
- cp -r index.html about.html shark.js shark.png $(articles_html) $(style) $(images) $(INSTALLDIR_HTML); \
- cp -r index about $(articles_ansi) $(INSTALLDIR_ANSI);
+ cp -r $(BUILDDIR)/index.html $(articles_html) $(STYLEDIR) $(IMAGEDIR) $(INSTALLDIR_HTML); \
+ cp -r $(BUILDDIR)/index $(articles_ansi) $(INSTALLDIR_ANSI);
clean:
echo '{"articles": []}' > $(article_list); \
- rm index.html about.html $(articles_html) $(articles_ansi);
+ rm -r $(BUILDDIR)
-$(articles_html): %.html: %.md
+$(BUILDDIR):
+ mkdir $(BUILDDIR) $(BUILDDIR)/$(ARTICLEDIR)
+
+$(BUILDDIR)/$(ARTICLEDIR)/%.html: $(SRCDIR)/$(ARTICLEDIR)/%.md | $(BUILDDIR)
jq 'del(.articles[] | select(.filename == "$(notdir $@)"))' $(article_list) > articles.json.tmp; \
mv ./articles.json.tmp $(article_list); \
@@ -42,18 +58,12 @@ $(articles_html): %.html: %.md
jq '.articles += [$(shell pandoc $< --template $(list_template) | jq '. += {"filename": "$(patsubst %.html, %, $(notdir $@))"}')]' $(article_list) > articles.json.tmp; \
mv ./articles.json.tmp $(article_list); \
-$(articles_ansi): %: %.md
+$(BUILDDIR)/$(ARTICLEDIR)/%: $(SRCDIR)/$(ARTICLEDIR)/%.md | $(BUILDDIR)
pandoc $< --template $(template_ansi) --to ansi --output $@
-index.html: index.md $(articles_html)
+$(BUILDDIR)/index.html: $(SRCDIR)/index.md $(articles_html) | $(BUILDDIR)
# Build index.html with metadata injected from articles_list
- pandoc $< --template $(template_html) --include-after-body shark.js --css $(style) --metadata-file $(article_list) --highlight-style zenburn --mathml --toc --output $@; \
+ pandoc $< --template $(template_html) --include-after-body $(shark_js) --css $(style) --metadata-file $(article_list) --highlight-style zenburn --mathml --toc --output $@; \
-index: index.md $(articles_html) $(articles_ansi)
+$(BUILDDIR)/index: $(SRCDIR)/index.md $(articles_ansi) | $(BUILDDIR)
pandoc $< --template $(template_ansi) --metadata-file $(article_list) --to ansi --output $@
-
-about.html: about.md
- pandoc $< --template $(template_html) --css $(style) --highlight-style zenburn --mathml --toc --output $@
-
-about: about.md
- pandoc $< --template $(template_ansi) --to ansi --output $@
diff --git a/about b/about
deleted file mode 100644
index 25d7268..0000000
--- a/about
+++ /dev/null
@@ -1,10 +0,0 @@
- [1m[23m[39m[49m[24m[29mAbout[0m
-
- ────────────────────
-
-[22m[23m[36m[49m[4m[29m]8;;https://nevereverever.de/eh/eh/eh/eh-eh/rsync-android.html\Rsync Android[0m]8;;\
-
-[1m[23m[39m[49m[24m[29mStuff[0m
-
-$$ \sum_{i=1}^k i = \frac{k(k+1)}{2} $$
-[0m]8;;\
\ No newline at end of file
diff --git a/about.md b/about.md
deleted file mode 100644
index 73adbf2..0000000
--- a/about.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-title: About
----
-
-[Rsync Android](https://nevereverever.de/eh/eh/eh/eh-eh/rsync-android.html)
-
-## Stuff
-
-$$ \sum_{i=1}^k i = \frac{k(k+1)}{2} $$
-
diff --git a/articles/latex-endeavors b/build/articles/latex-endeavors
similarity index 100%
rename from articles/latex-endeavors
rename to build/articles/latex-endeavors
diff --git a/build/articles/latex-endeavors.html b/build/articles/latex-endeavors.html
new file mode 100644
index 0000000..6e860b1
--- /dev/null
+++ b/build/articles/latex-endeavors.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+ Latex Endeavors
+
+
+
+
+
+
+
+
+
+
+
+BibLaTeX and Biber
+Biber doesn’t run
+Biber doens’t run if the (fedora) package
+libxcrypt-compat is missing. It will fail with the error
+message
+biber: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
+
+
+
+
+
diff --git a/articles/random-linux-utils b/build/articles/random-linux-utils
similarity index 100%
rename from articles/random-linux-utils
rename to build/articles/random-linux-utils
diff --git a/articles/random-linux-utils.html b/build/articles/random-linux-utils.html
similarity index 86%
rename from articles/random-linux-utils.html
rename to build/articles/random-linux-utils.html
index f2193c8..a04f711 100644
--- a/articles/random-linux-utils.html
+++ b/build/articles/random-linux-utils.html
@@ -87,23 +87,12 @@
code span.vs { color: #cc9393; } /* VerbatimString */
code span.wa { color: #7f9f7f; font-weight: bold; } /* Warning */
-
+