From 5eaa7b481abeeb939255be975022284a4268535e Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 30 Aug 2022 13:20:27 +0200 Subject: remove file ext --- code/makefile | 14 ++++++++++---- code/src/html.rs | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'code') diff --git a/code/makefile b/code/makefile index df39830..45f1de5 100644 --- a/code/makefile +++ b/code/makefile @@ -3,18 +3,24 @@ TOOL := ../code/target/debug/blog-tool TOOLC := $(TOOL) --root=articles SRC_ARTICLES := $(shell find articles -type f) -OUT_ARTICLES := $(SRC_ARTICLES:articles/%.md=out/%.html) +OUT_ARTICLES := $(SRC_ARTICLES:articles/%.md=out/%) -all: $(OUT_ARTICLES) out/index.html out/feed.atom +ALL = $(OUT_ARTICLES) out/index out/feed.atom out/.index +all: $(ALL) +out/.index: + ln -sf index out/.index out/style.css: style.css cp $< $@ -out/index.html: $(TOOL) $(SRC_ARTICLES) +out/index: $(TOOL) $(SRC_ARTICLES) $(TOOLC) render-index > $@ out/feed.atom: $(TOOL) $(SRC_ARTICLES) $(TOOLC) generate-atom > $@ -out/%.html: articles/%.md $(TOOL) out/style.css +out/%: articles/%.md $(TOOL) out/style.css $(TOOLC) render-article $< > $@ $(TOOL): $(shell find ../code/src -type f) sh -c 'cd ../code; cargo build' + +clean: + rm $(ALL) \ No newline at end of file diff --git a/code/src/html.rs b/code/src/html.rs index e53502f..a6098e3 100644 --- a/code/src/html.rs +++ b/code/src/html.rs @@ -11,7 +11,7 @@ pub fn scaffold(title: String, body: impl Render) -> impl Render { body!( nav!( h2!("metamuffin's blog"), - a!(href = "./index.html", "index"), + a!(href = "./index", "index"), " ", a!(href = "./feed.atom", "atom") ), @@ -49,7 +49,7 @@ pub fn index(root: &str) -> impl Render { li!( date.to_string(), ": ", - a!(href = format!("./{canonical_name}.html",), title) + a!(href = format!("./{canonical_name}",), title) ) }, ) -- cgit v1.2.3-70-g09d2