summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-05-22 10:00:37 +0200
committerYorhel <git@yorhel.nl>2019-05-22 10:00:39 +0200
commite4e3943b43484d9394aa4b6895bd1b54a8a424a3 (patch)
tree2f1d75b853874a8068a87043100a568bbcaf2ba0
parentd05f3a8345caceb61ee96fb12e1ec2ce40bc182f (diff)
Use single 'pub/' output directory
Simplifies the makefile a bit and allows throwing extra static files into pub/ that don't have to be copied in the Makefile, which would be useful for large software releases.
-rw-r--r--.gitignore3
-rw-r--r--Makefile19
-rw-r--r--README.md10
-rw-r--r--pub/Overview.svg (renamed from static/Overview.svg)0
-rw-r--r--pub/style.css (renamed from static/style.css)0
5 files changed, 9 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore
index d965777..e2e8b3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
-output/
+*.html
md/share/man.md
+pub/.chifs-share/
diff --git a/Makefile b/Makefile
index 2e95457..caf1317 100644
--- a/Makefile
+++ b/Makefile
@@ -13,24 +13,19 @@ PAGES=\
md/proto/ideas/EfficientDirSync.md\
md/proto/ideas/PrivateCommunities.md
-STATIC=\
- static/style.css\
- static/Overview.svg
-
-HTML := $(shell for i in ${PAGES}; do echo $$i | sed -E 's/^md\/(.+)\.md/output\/\1\/index.html/'; done)
-FILES := $(shell for i in ${STATIC}; do echo $$i | sed 's/^static/output/'; done)
+HTML := $(shell for i in ${PAGES}; do echo $$i | sed -E 's/^md\/(.+)\.md/pub\/\1\/index.html/'; done)
.PHONY: all clean
-all: output/index.html ${HTML} ${FILES}
+all: pub/index.html ${HTML}
-output/index.html: output/about/index.html
+pub/index.html: pub/about/index.html
cp -p "$<" "$@"
md/share/man.md:
curl -s https://code.blicky.net/chifs/chifs-share/raw/branch/master/man/chifs-share.md -o "$@"
-output/%/index.html: md/%.md template.html
+pub/%/index.html: md/%.md template.html
mkdir -p `dirname "$@"`
sed -E 's/(ffprobe|file|mediainfo|mimetype|tor)\(([1-8])\)/[\1(\2)](https:\/\/manned.org\/\1.\2)/g' "$<" \
| pandoc -f markdown -t html5 --template template.html \
@@ -39,8 +34,6 @@ output/%/index.html: md/%.md template.html
- -o "$@"
touch -r "$<" "$@"
-output/%: static/%
- cp -p "$<" "$@"
-
clean:
- rm -rf output md/share/man.md
+ rm -rf pub/index.html ${HTML} md/share/man.md
+ find pub -type d -empty -print -delete
diff --git a/README.md b/README.md
index b409f88..17ce895 100644
--- a/README.md
+++ b/README.md
@@ -16,13 +16,5 @@ gateway at #chifs @ Freenode.
## Building the website
You'll need to have [Pandoc](http://pandoc.org/), make and curl installed.
-Then simply run `make` and the complete site should end up in the `output/`
+Then simply run `make` and the complete site should end up in the `pub/`
directory.
-
-## Structure of this repository
-
-- **md/** holds the website content in Pandoc-flavored markdown. The directory
- structure resembles the menu structure. All files should be mentioned in the
- Makefile, otherwise they will not be built into the output.
-- **static/** hold static files that are copied as-is to the output directory,
- provided that they are mentioned in the Makefile.
diff --git a/static/Overview.svg b/pub/Overview.svg
index f917133..f917133 100644
--- a/static/Overview.svg
+++ b/pub/Overview.svg
diff --git a/static/style.css b/pub/style.css
index 5d22aaa..5d22aaa 100644
--- a/static/style.css
+++ b/pub/style.css