diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..20b94a2 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +# This Makefile knows how to build the project +# web site, which mostly consists of converting +# Markdown files to HTML. + +PAGE_INPUTS := $(shell find docs -type f -name '*.md') +PAGE_OUTPUTS := $(PAGE_INPUTS:.md=.html) + +HEADER := docs/media/header.html + +SITE_TITLE := [Mirage] +PANDOC := pandoc -s -H ${HEADER} + +.PHONY: docs +docs: ${PAGE_OUTPUTS} + +.PHONY: serve +serve: + @echo "Serving on http://localhost:8080" + @echo "Use ctrl-c to terminate the server" + @python3 -m http.server -d docs/ 8080 + +%.html: %.md ${HEADER} + @echo "building $<" + @${PANDOC} -M pagetitle:"/$(@D) ${SITE_TITLE}" -o "$@" "$<" + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..98b65fe --- /dev/null +++ b/docs/index.html @@ -0,0 +1,156 @@ + + + + + + + /docs [Mirage] + + + + + +

Mirage

+

Welcome!

+ + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..b638806 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,4 @@ +# Mirage + +Welcome! + diff --git a/docs/media/header.html b/docs/media/header.html new file mode 100644 index 0000000..e69de29