mirror of
https://github.com/LukeSmithxyz/based.cooking.git
synced 2024-11-30 17:35:43 +00:00
fix
- Set correct title on pages (remove leading '#') - Remove main title on recipe pages - Put metadata at the end of articles
This commit is contained in:
parent
1b4eca2c28
commit
1d7d2b6ab8
12
Makefile
12
Makefile
@ -64,7 +64,9 @@ tags/%: $(BLOG_SRC)/%.md
|
|||||||
blog/index.html: $(ARTICLES) $(TAGFILES) $(addprefix templates/,$(addsuffix .html,header index_header tag_list_header tag_entry tag_separator tag_list_footer article_list_header article_entry article_separator article_list_footer index_footer footer))
|
blog/index.html: $(ARTICLES) $(TAGFILES) $(addprefix templates/,$(addsuffix .html,header index_header tag_list_header tag_entry tag_separator tag_list_footer article_list_header article_entry article_separator article_list_footer index_footer footer))
|
||||||
mkdir -p blog
|
mkdir -p blog
|
||||||
TITLE="$(BLOG_TITLE)"; \
|
TITLE="$(BLOG_TITLE)"; \
|
||||||
|
PAGE_TITLE="$(BLOG_TITLE)"; \
|
||||||
export TITLE; \
|
export TITLE; \
|
||||||
|
export PAGE_TITLE; \
|
||||||
envsubst < templates/header.html > $@; \
|
envsubst < templates/header.html > $@; \
|
||||||
envsubst < templates/index_header.html >> $@; \
|
envsubst < templates/index_header.html >> $@; \
|
||||||
envsubst < templates/tag_list_header.html >> $@; \
|
envsubst < templates/tag_list_header.html >> $@; \
|
||||||
@ -103,10 +105,12 @@ tagpages: $(TAGFILES)
|
|||||||
|
|
||||||
blog/@%.html: $(TAGFILES) $(addprefix templates/,$(addsuffix .html,header tag_index_header tag_list_header tag_entry tag_separator tag_list_footer article_list_header article_entry article_separator article_list_footer tag_index_footer footer))
|
blog/@%.html: $(TAGFILES) $(addprefix templates/,$(addsuffix .html,header tag_index_header tag_list_header tag_entry tag_separator tag_list_footer article_list_header article_entry article_separator article_list_footer tag_index_footer footer))
|
||||||
mkdir -p blog
|
mkdir -p blog
|
||||||
TITLE="Articles tagged $*"; \
|
PAGE_TITLE="Articles tagged $* — $(BLOG_TITLE)"; \
|
||||||
TAGS="$*"; \
|
TAGS="$*"; \
|
||||||
export TITLE; \
|
TITLE="$(BLOG_TITLE)"; \
|
||||||
|
export PAGE_TITLE; \
|
||||||
export TAGS; \
|
export TAGS; \
|
||||||
|
export TITLE; \
|
||||||
envsubst < templates/header.html > $@; \
|
envsubst < templates/header.html > $@; \
|
||||||
envsubst < templates/tag_index_header.html >> $@; \
|
envsubst < templates/tag_index_header.html >> $@; \
|
||||||
envsubst < templates/article_list_header.html >> $@; \
|
envsubst < templates/article_list_header.html >> $@; \
|
||||||
@ -129,8 +133,10 @@ blog/@%.html: $(TAGFILES) $(addprefix templates/,$(addsuffix .html,header tag_in
|
|||||||
|
|
||||||
blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header article_header article_footer footer))
|
blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header article_header article_footer footer))
|
||||||
mkdir -p blog
|
mkdir -p blog
|
||||||
TITLE="$(shell head -n1 $<)"; \
|
TITLE="$(shell head -n1 $< | sed 's/^# \+//')"; \
|
||||||
export TITLE; \
|
export TITLE; \
|
||||||
|
PAGE_TITLE="$${TITLE} — $(BLOG_TITLE)"; \
|
||||||
|
export PAGE_TITLE; \
|
||||||
AUTHOR="$(shell git log --format="%an" -- "$<" | tail -n 1)"; \
|
AUTHOR="$(shell git log --format="%an" -- "$<" | tail -n 1)"; \
|
||||||
export AUTHOR; \
|
export AUTHOR; \
|
||||||
DATE_POSTED="$(shell git log --diff-filter=A --date="format:$(BLOG_DATE_FORMAT)" --pretty=format:'%ad' -- "$<")"; \
|
DATE_POSTED="$(shell git log --diff-filter=A --date="format:$(BLOG_DATE_FORMAT)" --pretty=format:'%ad' -- "$<")"; \
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
<p><i>Recipe posted on: $DATE_POSTED, last edited on: $DATE_EDITED, written by: $AUTHOR</i></p>
|
@ -1,2 +0,0 @@
|
|||||||
<p><a href=".">index</a></p>
|
|
||||||
<p><i>Recipe posted on: $DATE_POSTED, last edited on: $DATE_EDITED, written by: $AUTHOR</i></p>
|
|
@ -1,6 +1,7 @@
|
|||||||
<p>This website is a fork from <a href="https://based.cooking">Luke Smith's Based Cooking</a></p>
|
<p>This website is a fork from <a href="https://based.cooking">Luke Smith's Based Cooking</a></p>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<hr/>
|
<hr/>
|
||||||
|
<a href=".">homepage</a>
|
||||||
<a href="./rss.xml">RSS</a>
|
<a href="./rss.xml">RSS</a>
|
||||||
<a href="./atom.xml">atom</a>
|
<a href="./atom.xml">atom</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,10 +3,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="./style.css">
|
<link rel="stylesheet" href="./style.css">
|
||||||
<title>$TITLE</title>
|
<title>$PAGE_TITLE</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="banner">
|
|
||||||
<h1>🍳 Based Cooking 🍲</h1>
|
|
||||||
<hr/>
|
|
||||||
</div>
|
|
||||||
|
@ -1 +1,5 @@
|
|||||||
|
<div class="banner">
|
||||||
|
<h1>🍳 $TITLE 🍲</h1>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
<p>Only Based cooking. No ads, no tracking, nothing but based cooking.</p>
|
<p>Only Based cooking. No ads, no tracking, nothing but based cooking.</p>
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
<p><a href=".">index</a></p>
|
<div class="banner">
|
||||||
|
<h1>🍳 $TITLE 🍲</h1>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
<p><i>Filtering recipes tagged:</i> <b>$TAGS</b></p>
|
<p><i>Filtering recipes tagged:</i> <b>$TAGS</b></p>
|
||||||
|
Loading…
Reference in New Issue
Block a user