little opengraph test

This commit is contained in:
yosh 2024-01-02 17:30:37 -06:00
parent cedddd1ef5
commit acb0cf43b5
2 changed files with 11 additions and 7 deletions

View File

@ -99,14 +99,14 @@ __FILE_TMP="$(mktemp -u)"
find "$_SRCDIR" -type d -exec sh -c 'for d; do mkdir -p "$_BUILDDIR"/"${d#"$_SRCDIR"}"; done' sh {} +
while read -r __FILE; do
cd "${__FILE%/*}"
__OUTFILE="$_BUILDDIR/${__FILE#"$_SRCDIR"}"
case "${__FILE##*/}" in
*.[hH][tT][mM][lL]) ( __process_shp "$__FILE" ) > "$__FILE_TMP" ;;
*.[mM][dD]) ( __process_md "$__FILE" ) > "$__FILE_TMP"; __OUTFILE="${__OUTFILE%.*}.html" ;;
while read -r _FILE; do
cd "${_FILE%/*}"
__OUTFILE="$_BUILDDIR/${_FILE#"$_SRCDIR"}"
case "${_FILE##*/}" in
*.[hH][tT][mM][lL]) ( __process_shp "$_FILE" ) > "$__FILE_TMP" ;;
*.[mM][dD]) ( __process_md "$_FILE" ) > "$__FILE_TMP"; __OUTFILE="${__OUTFILE%.*}.html" ;;
mdmeta) continue ;;
*) cp -p "$__FILE" "$__FILE_TMP" ;;
*) cp -p "$_FILE" "$__FILE_TMP" ;;
esac
if ! cmp -s "$__FILE_TMP" "$__OUTFILE"; then
mv "$__FILE_TMP" "$__OUTFILE"

View File

@ -6,4 +6,8 @@
<title><?shp printf '%s' "${TITLE:-~yosh}" ?></title>
<link rel="stylesheet" href="/~yosh/style/style.css">
<link rel="alternate" type="application/atom+xml" title="blog atom feed" href="/~yosh/blog/feed.atom">
<?shp printf '<meta property="og:title" content="%s" />\n' "$(escape "${TITLE:-~yosh}")" ?>
<meta property="og:type" content="website" />
<?shp # printf '<meta property="og:url" content="https://unix.dog/~yosh/%s" />' "${_FILE#"${_SRCDIR}/"}" ?>
</head>