diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-08-25 23:12:57 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-08-25 23:12:57 +0200 |
| commit | 79f3257437636c153bd9e66131495680ddf39afd (patch) | |
| tree | 1cad94f6d156f6d05bd3843fd819ca30238b8d28 /repo/www/Makefile | |
| parent | ef1cb64a6cfda2b971649ee5cf051e50235f081e (diff) | |
| download | memory-leaks-79f3257437636c153bd9e66131495680ddf39afd.tar.xz | |
Include stylesheets
With relative links, so that I can just view HTML files on my disk
without spawning a webserver.
Diffstat (limited to 'repo/www/Makefile')
| -rw-r--r-- | repo/www/Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile index aa48971..86d1d98 100644 --- a/repo/www/Makefile +++ b/repo/www/Makefile @@ -14,6 +14,7 @@ page_patterns = $(foreach ext,$(EXTENSIONS),'$(TOP_DIR)/**.$(ext)') page_folders = $(call dirnames,$(shell git ls-files $(page_patterns))) top_readme = $(shell git ls-files $(addprefix $(TOP_DIR)/README.,$(EXTENSIONS))) html_template = template.html +stylesheets_src = lua_filters = convert-internal-links.lua all: site @@ -42,14 +43,17 @@ $(dependencies): $(site_tree) | $(cache) include $(dependencies) -site: $(pages) $(indices) +stylesheets_dir = $(OUT_DIR)/style +stylesheets = $(foreach s,$(stylesheets_src),$(stylesheets_dir)/$(s)) + +site: $(pages) $(indices) $(stylesheets) $(stylesheets) # List of output folders. Compute this from the full list of HTML # pages, since $(page_folders) may be missing some intermediate # directories (e.g. folders that only contain subfolders). html_folders = $(call dirnames,$(pages) $(indices)) -$(html_folders) $(cache): +$(html_folders) $(stylesheets_dir) $(cache): mkdir -p $@ $(pages) $(subindices): $(title) @@ -60,6 +64,7 @@ $(pages): $(OUT_DIR)/%.html: $(call v,PAGE,$*) \ ./generate-page.py --site-title="$$(cat $(title))" --title="$*" \ $(foreach f,$(lua_filters),--lua-filter $(f)) \ + $(foreach s,$(stylesheets_src),--stylesheet style/$(s)) \ --template=$(html_template) $< $@ top_index = $(OUT_DIR)/index.html @@ -74,8 +79,12 @@ $(indices): $(OUT_DIR)/%index.html: $(call v,INDEX,$*) \ ./generate-index.py $(index_options) --template=$(html_template) \ $(foreach f,$(lua_filters),--lua-filter $(f)) \ + $(foreach s,$(stylesheets_src),--stylesheet style/$(s)) \ $(site_tree) "$(patsubst %/,%,$*)" $@ +$(stylesheets): $(stylesheets_dir)/%.css: %.css | $(stylesheets_dir) + cp $< $@ + clean: -rm -r $(cache) -rm -r $(OUT_DIR) |
