From: Mischa POSLAWSKY Date: Sun, 17 May 2020 00:03:52 +0000 (+0200) Subject: head: include canonical location in og:url X-Git-Tag: v4.4~6 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/aa4a9fd115357f8d8781220e1f1345df774d6893 head: include canonical location in og:url Does not (yet) account for all aliases, but at least provides a good reference to the requested page. --- diff --git a/article.inc.php b/article.inc.php index 53102ba..dd3d5b2 100644 --- a/article.inc.php +++ b/article.inc.php @@ -22,7 +22,7 @@ class ArchiveArticle function __construct($path) { $this->page = preg_replace('{^\.(?:/|$)}', '', $path); - $this->link = preg_replace('{(?:/index)?\.html$}', '', $this->page); + $this->link = preg_replace('{(?:(?:/|^)index)?\.html$}', '', $this->page); $this->raw($this->page); } diff --git a/head.inc.php b/head.inc.php index 72cbf36..797f611 100644 --- a/head.inc.php +++ b/head.inc.php @@ -13,5 +13,6 @@ image) { ?> +