diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b1960e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +output/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cfe7a56 --- /dev/null +++ b/Makefile @@ -0,0 +1,59 @@ +# if someone can come up with something better then i'd appreciate that. +# For now this is a bit complex but it gets the job done. +# It's still a ticking time bomb and I hope we can fix it before it explodes. +# Even if it explodes, it won't be that big of a deal. + +# Input dir describes the directory that has the markdown we want to convert +# Static dir describes the directory that has files we should simply copy as-is +# Output dir describes the directory that we want our final result to be in. +INPUT_DIR=content +STATIC_DIR=static +OUTPUT_DIR=output + +# The pandoc template to use +TEMPLATE=template.html + +## You should not need to change anything beyond this line + +# The pandoc lua filter to use +# The language code and file extension will be appended later +FILTER=filters/link-filter. + +STATIC=$(patsubst $(STATIC_DIR)/%,$(OUTPUT_DIR)/%,$(shell find $(STATIC_DIR) -type f)) +OUTPUT=$(patsubst $(INPUT_DIR)/%.md,$(OUTPUT_DIR)/%/index.html,$(shell find $(INPUT_DIR) -type f)) + +site: $(OUTPUT) $(STATIC) + +$(OUTPUT_DIR)/%/index.html: $(INPUT_DIR)/%.md $(TEMPLATE) + mkdir -p $(dir $@) + pandoc --from markdown+smart+yaml_metadata_block+auto_identifiers --lua-filter=$(FILTER)$(shell echo $@ | cut -d / -f 2).lua --to html --template $(TEMPLATE) $< -o $@ + @# Pandoc indenting causes too many issues. From https://stackoverflow.com/a/68633114 + sed -i 's/^\s* + + + + + + + A redirect to the english homepage + + + +
+ +
+
+

If this redirect does not work then please click on this link

+
+ + + \ No newline at end of file diff --git a/template.html b/template.html new file mode 100644 index 0000000..a2a2525 --- /dev/null +++ b/template.html @@ -0,0 +1,32 @@ + + + + + + + + $if(title)$ + $title$ + $endif$ + $if(redirect)$ + + $endif$ + + +
+ +
+
+ $body$ +
+ + + \ No newline at end of file