bavbavhaus.net/README.md

35 lines
1.2 KiB
Markdown
Raw Normal View History

2024-05-17 08:52:18 +02:00
Zapiski in skripte za pretvarjanje zapiskov v različne formate in generiranje
<https://bavbavhaus.net>. Glavni repozitorij se nahaja na
<https://git.kompot.si/urosm/bavbavhaus.net>.
2024-03-19 01:29:25 +01:00
2024-05-17 08:52:18 +02:00
Recepti za generiranje <https://bavbavhaus.net> so opisani v `Makefile`:
```make
2024-05-17 15:36:03 +02:00
# All notes referenced with internal links, starting from `index.md`.
NOTES = $(shell pandoc lua pandoc/collect_notes.lua index.md)
# All pages referenced with internal links, starting from `index.md`.
2024-05-17 08:52:18 +02:00
PAGES := $(patsubst %.md,public_html/%.html,$(NOTES))
2024-05-17 15:36:03 +02:00
# All parts referenced with internal links in `$(1)`, plus the sitemap.
PARTS = $(patsubst %.md,public_html/%.html.part,$(shell pandoc lua pandoc/collect_links.lua $(1))) public_html/sitemap.html.part
2024-05-17 08:52:18 +02:00
.PHONY: all
all: $(PAGES)
.SECONDEXPANSION:
2024-05-17 15:36:03 +02:00
public_html/%.html: flags = $(patsubst %,-M parts=%,$(filter-out $<,$^))
public_html/%.html: %.md $$(call PARTS,%.md)
2024-05-17 08:52:18 +02:00
pandoc --data-dir pandoc -d bavbavhaus.net.yaml -M slug=$* $(flags) -o $@ $<
2024-05-17 15:36:03 +02:00
.SECONDARY:
public_html/%.html.part: %.md
pandoc --data-dir pandoc -d bavbavhaus.net.part.yaml --id-prefix $* -M url=$*.html -M slug=$* -o $@ $<
```
2024-03-19 01:29:25 +01:00
2024-04-12 22:33:48 +02:00
Navodila za uporabo:
2024-03-19 01:29:25 +01:00
2024-04-12 22:33:48 +02:00
```sh
2024-05-17 15:36:03 +02:00
# install dependencies (debian)
sudo apt install pandoc
2024-04-12 22:33:48 +02:00
make
2024-03-19 01:29:25 +01:00
```