add some opengraph :D

This commit is contained in:
yosh 2024-04-03 04:18:21 -04:00
parent e98dedb743
commit 84d4b5849d
3 changed files with 15 additions and 10 deletions

View File

@ -161,12 +161,12 @@ __run_in_parallel() {
while IFS= read -r _FILE; do
cd "${_FILE%/*}"
__OUTFILE="$_BUILDDIR/${_FILE#"$_SRCDIR"}"
export _OUTFILE="$_BUILDDIR/${_FILE#"$_SRCDIR/"}"
case "${_FILE##*/}" in
*.[hH][tT][mM][lL]|*.[sS][hH][pP]) ( __run_in_parallel __process_shp "$_FILE" ) > "${__OUTFILE%.*}.html" ;;
*.[mM][dD]) ( __run_in_parallel __process_md "$_FILE" ) > "${__OUTFILE%.*}.html" ;;
*.[hH][tT][mM][lL]|*.[sS][hH][pP]) ( __run_in_parallel __process_shp "$_FILE" ) > "${_OUTFILE%.*}.html" ;;
*.[mM][dD]) ( __run_in_parallel __process_md "$_FILE" ) > "${_OUTFILE%.*}.html" ;;
*.[sS][hH]) ( __run_in_parallel . "$_FILE" ) ;; # don't autocopy. this is for code :)
*) __run_in_parallel cp -p "$_FILE" "$__OUTFILE" ;;
*) __run_in_parallel cp -p "$_FILE" "$_OUTFILE" ;;
esac
done <<-EOF
$(find "$_SRCDIR" -type f)

View File

@ -4,15 +4,20 @@
<head>
<meta charset="utf8">
<?shp
# sets "$TITLE | ~yosh" if TITLE exists, otherwise "~yosh" -->
TITLE="$(escape "${TITLE:+"$TITLE | "}~yosh")"
printf "<title>%s</title>\n" "$TITLE"
TITLE="$(escape "$TITLE")"
# uses "$TITLE | ~yosh" if TITLE exists, otherwise "~yosh"
printf "<title>%s</title>\n" "${TITLE:+"$TITLE | "}~yosh"
?>
<link rel="stylesheet" href="/~yosh/style/style.css">
<link rel="alternate" type="application/atom+xml" title="blog atom feed" href="/~yosh/blog/feed.atom">
<link rel="alternate" type="application/atom+xml" title="articles atom feed" href="/~yosh/articles/feed.atom">
<?shp printf '<meta property="og:title" content="%s" />\n' "$TITLE" ?>
<meta property="og:type" content="website" />
<?shp # printf '<meta property="og:url" content="https://unix.dog/~yosh/%s" />' "${_FILE#"${_SRCDIR}/"}" ?>
<?shp
printf '<meta property="og:title" content="%s" />\n' "$TITLE"
printf '<meta property="og:type" content="%s" />\n' "${OG_TYPE:-website}"
printf '<meta property="og:url" content="https://unix.dog/~yosh/%s" />\n' \
"${_OUTFILE#"$_BUILDDIR/"}"
printf '<meta property="og:image" content="https://unix.dog/~yosh/%s" />\n' \
"${OG_IMG:-img/renard_lftanthology.png}"
?>
</head>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB