feat: auto-generated authors file
This commit is contained in:
parent
95424bd500
commit
49e005e118
14
Makefile
14
Makefile
|
@ -9,13 +9,14 @@
|
||||||
INPUT_DIR=content
|
INPUT_DIR=content
|
||||||
STATIC_DIR=static
|
STATIC_DIR=static
|
||||||
OUTPUT_DIR=output
|
OUTPUT_DIR=output
|
||||||
|
UTILS_DIR=utils
|
||||||
|
|
||||||
# The pandoc template to use
|
# The pandoc template to use
|
||||||
TEMPLATE=utils/template.html
|
TEMPLATE=$(UTILS_DIR)/template.html
|
||||||
|
|
||||||
# The pandoc lua filter to use
|
# The pandoc lua filter to use
|
||||||
# The language code and file extension will be appended later
|
# The language code and file extension will be appended later
|
||||||
FILTER=utils/link-filter.
|
FILTER=$(UTILS_DIR)/link-filter.
|
||||||
|
|
||||||
## You should not need to change anything beyond this line
|
## You should not need to change anything beyond this line
|
||||||
|
|
||||||
|
@ -24,8 +25,15 @@ FILTER=utils/link-filter.
|
||||||
STATIC=$(patsubst $(STATIC_DIR)/%,$(OUTPUT_DIR)/%,$(shell find $(STATIC_DIR) -type f))
|
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))
|
OUTPUT=$(patsubst $(INPUT_DIR)/%.md,$(OUTPUT_DIR)/%/index.html,$(shell find $(INPUT_DIR) -type f))
|
||||||
|
|
||||||
site: $(OUTPUT) $(STATIC)
|
# The last one is for the autogenerated authors thing.
|
||||||
|
site: $(OUTPUT) $(STATIC) $(OUTPUT_DIR)/authors/index.html
|
||||||
|
|
||||||
|
# This generates the authors file.
|
||||||
|
$(OUTPUT_DIR)/authors/index.html: $(UTILS_DIR)/authors.md
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
pandoc --from markdown+smart+yaml_metadata_block+auto_identifiers -V lastmod="$(shell git log --follow --format=%ad --date default $< | tail -1)" --to html --template $(TEMPLATE) $< -o $@
|
||||||
|
|
||||||
|
# Generate normal markdown
|
||||||
$(OUTPUT_DIR)/%/index.html: $(INPUT_DIR)/%.md $(TEMPLATE)
|
$(OUTPUT_DIR)/%/index.html: $(INPUT_DIR)/%.md $(TEMPLATE)
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
pandoc --from markdown+smart+yaml_metadata_block+auto_identifiers -V lastmod="$(shell git log --follow --format=%ad --date default $< | tail -1)" --lua-filter=$(FILTER)$(shell echo $@ | cut -d / -f 2).lua --to html --template $(TEMPLATE) $< -o $@
|
pandoc --from markdown+smart+yaml_metadata_block+auto_identifiers -V lastmod="$(shell git log --follow --format=%ad --date default $< | tail -1)" --lua-filter=$(FILTER)$(shell echo $@ | cut -d / -f 2).lua --to html --template $(TEMPLATE) $< -o $@
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
title: "Wiki authors"
|
||||||
|
---
|
||||||
|
|
||||||
|
This page contains auto-generated usernames of all those who have contributed to the vern wiki. If you want your name to be here, then modify the `utils/authors.md` file with your name added in a new line, you may link to other sites here as well.
|
||||||
|
|
||||||
|
* [~xmoo](https://xmoo.vern.cc)
|
||||||
|
* [~vitorg](https://vitorg.vern.cc)
|
||||||
|
* [~cobra](https://cobra.vern.cc)
|
||||||
|
* [~pjals](https://pjals.vern.cc)
|
||||||
|
* [Arya K.](https://arya.projectsegfau.lt/)
|
||||||
|
* hacker999
|
||||||
|
* ajhalili2006
|
Loading…
Reference in New Issue