diff options
author | metamuffin <metamuffin@disroot.org> | 2022-08-30 13:20:27 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-08-30 13:20:27 +0200 |
commit | 5eaa7b481abeeb939255be975022284a4268535e (patch) | |
tree | b7b19a5dd7fac92961e2907788f4271bb34d9714 | |
parent | 03b8b395abb2a25a4a1d71b7c1abbf9d12d9ccb8 (diff) | |
download | metamuffin-blog-5eaa7b481abeeb939255be975022284a4268535e.tar metamuffin-blog-5eaa7b481abeeb939255be975022284a4268535e.tar.bz2 metamuffin-blog-5eaa7b481abeeb939255be975022284a4268535e.tar.zst |
remove file ext
-rw-r--r-- | code/makefile | 14 | ||||
-rw-r--r-- | code/src/html.rs | 4 |
2 files changed, 12 insertions, 6 deletions
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) ) }, ) |