add page size calculation

I want to add https://www.websitecarbon.com/badge/ but I don't want js.
This commit is contained in:
dongdigua 2024-11-24 20:12:52 +08:00
parent d60172ad23
commit 4b70db6185
3 changed files with 7 additions and 3 deletions

View File

@ -4,7 +4,7 @@ TARGET=ls ../*.html* | grep -v "index\|xmr\|404.html"
EMACS_OPTS=--script $(ORG_CONFIG_FILE) -f myweb-publish
all: html
all: html size
html:
@echo "Generating HTML..."
@ -15,3 +15,6 @@ clean:
- rm ~/.org-timestamps/org-pages.cache
- $(TARGET) | xargs -I {} rm {}
- rm ../feed.xml*
size:
$(TARGET) | xargs -I {} sh -c 'sed -i "s/PAGE_SIZE/$$(du -h {} | cut -f1)/g" {}'

View File

@ -23,9 +23,9 @@
'(("en"
"
<p>dongdigua CC BY-NC-SA 禁止转载到私域(公众号非自己托管的博客等)</p>
<p class=\"date\">Date: %d Build: %T</p>
<p>Proudly made with Emacs Org mode</p>
<p>Email me to add comment</p>
<p>Proudly made with Emacs Org mode</p>
<p class=\"date\">Date: %d Build: %T Size: PAGE_SIZE</p>
")))
(setq org-html-home/up-format "

View File

@ -57,3 +57,4 @@ Someone tell Vedal there's a problem with my AI
man!(Volt can I set?)
豌豆的花语是 9331
l(a\nle\naf\nfa\nll\ns)\none\nl\niness
<a id=quote href=https://sustainablewebdesign.org>If the Internet was a country, it would be the 4th largest polluter</a>