diff --git a/Makefile b/Makefile index 1f3faf4..418eae1 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ article_list := articles.json # article targets articles := $(patsubst %.md,%.html,$(wildcard articles/*.md)) -all: index.html about.html +all: clean index.html about.html install: cp -r index.html about.html $(articles) $(style) $(images) $(INSTALLDIR); \ @@ -30,17 +30,12 @@ $(articles): %.html: %.md # Build articles using pandoc pandoc $< --template $(template) --css $(style) --highlight-style zenburn --mathml --toc --output $@; \ - # Extract metadata from .md file - # pandoc $< --template $(list_template) > article.json.tmp.0; \ - - # Append filename field to article object. This is used to link to the article from index.html. - # pandoc $< --template $(list_template) | jq '. += {"filename": "$(notdir $@)"}' > article.json.tmp; \ - - # Append article object to the article list + # Extract metadata from .md file, append filename field to the article object. + # This is used to link to the article from index.html. Append article object to the article list. jq '.articles += [$(shell pandoc $< --template $(list_template) | jq '. += {"filename": "$(notdir $@)"}' )]' $(article_list) > articles.json.tmp; \ mv ./articles.json.tmp $(article_list); \ -index.html: index.md $(articles) +index.html: index.md $(articles) # Build index.html with metadata injected from articles_list pandoc $< --template $(template) --css $(style) --metadata-file $(article_list) --highlight-style zenburn --mathml --toc --output $@; \ diff --git a/articles.json b/articles.json index 1d75dc1..6981602 100644 --- a/articles.json +++ b/articles.json @@ -1,13 +1,5 @@ { "articles": [ - { - "author": "Never Gude", - "date": "4.1.2026", - "subtitle": "Neat things I picked up along the way", - "summary": "Tricks and tools I learned about, while tweaking my Linux sytem or trying to do productive things.", - "title": "Random linux utilities 2", - "filename": "random-linux-utils-2.html" - }, { "author": "Never Gude", "date": "25.7.2025", diff --git a/articles/random-linux-utils-2.html b/articles/random-linux-utils-2.html deleted file mode 100644 index 9a137d4..0000000 --- a/articles/random-linux-utils-2.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - Random linux utilities 2 - - - - - - -
-

Random linux utilities 2

-

Neat things I picked up along the way

-

Never Gude

-

4.1.2026

-
-
- -
-

Merge pdfs

-

Using Ghostscript

-

Ghostscript has a feature to merge multiple pdf files into one. -Although ImageMagick also has this feature, I prefer this one, as it -doesn’t rasterize and scales down the pdf files.

-
gs -dNOPAUSE -sDEVICE=pdfwrite \
-    -sOUTPUTFILE=output.pdf \
-    -dBATCH 1.pdf 2.pdf
-
- -
- - - diff --git a/articles/random-linux-utils-2.md b/articles/random-linux-utils-2.md deleted file mode 100644 index 36e276b..0000000 --- a/articles/random-linux-utils-2.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Random linux utilities 2 -subtitle: Neat things I picked up along the way -author: Never Gude -date: 4.1.2026 -summary: Tricks and tools I learned about, while tweaking my Linux sytem or trying to do productive things. ---- - -## Merge pdfs -### Using Ghostscript -Ghostscript has a feature to merge multiple pdf files into one. -Although ImageMagick also has this feature, I prefer this one, as it doesn't rasterize and scales down -the pdf files. - -```bash -gs -dNOPAUSE -sDEVICE=pdfwrite \ - -sOUTPUTFILE=output.pdf \ - -dBATCH 1.pdf 2.pdf -``` - diff --git a/index.html b/index.html index 8e2bfe0..d51ffc6 100644 --- a/index.html +++ b/index.html @@ -53,16 +53,6 @@

Articles