aboutsummaryrefslogtreecommitdiff
path: root/blogthis
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2026-05-07 16:24:00 +0200
committerPhilip Wittamore <philip@wittamore.com>2026-05-07 16:24:00 +0200
commite6269894e2b7542903bd1084c74e62e7d9cc1ff0 (patch)
tree3f81b0da9e517b2d25d7e04a36b216aa37bde461 /blogthis
parent08db0cf6d7fe4d346540368edd741ca7026b1058 (diff)
update
Diffstat (limited to 'blogthis')
-rwxr-xr-xblogthis30
1 files changed, 17 insertions, 13 deletions
diff --git a/blogthis b/blogthis
index 6cf6162..6ec102b 100755
--- a/blogthis
+++ b/blogthis
@@ -2,8 +2,8 @@
# create text, assemble html file, add to articles
-#web is a symlink to /home/philip/src/web/wittamore.fr
-ROOT=/home/philip/web
+#web is a symlink to $HOME/src/web/example.com
+ROOT="$HOME/web"
mkdir -p $ROOT/.tmp
cd $ROOT/.tmp || exit
@@ -28,26 +28,30 @@ FIXEDTITLE=${TITLE// /-}
ARTICLE="$FIXEDTITLE.html"
echo "<!doctype html>
-<html lang=\"EN\">
+<html lang=\"en\">
<head>
- <meta charset=\"utf-8\">
- <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
+ <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" >
+ <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<link rel=\"stylesheet\" href=\"/style.css\">
+ <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\">
<title>$TITLE</title>
</head>
<body>
<header>
<h1>Bloggings</h1>
- <a href=\"/index.php\">Back</a>
- <hr>
+ <a href=\"/index.php\">&nbsp;&lt;&nbsp;Blog&nbsp;</a>
</header>
- <!-- article start -->" > "$ARTICLE"
+ <main>
+ <article>" > "$ARTICLE"
+
cat "$EDITFILE" >> "$ARTICLE"
-echo '<!-- article end -->
-<p>&nbsp;</p>
-<hr>
-<p>§</p>
+
+echo " </article>
+ </main>
+ <footer>
+ <p>§</p>
+ </footer>
</body>
-</html>' >> "$ARTICLE"
+</html>" >> "$ARTICLE"
mv "$ARTICLE" "$DEST"
echo "saved as $DEST/$ARTICLE"