From aa4a9fd115357f8d8781220e1f1345df774d6893 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 17 May 2020 02:03:52 +0200 Subject: [PATCH] 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. --- article.inc.php | 2 +- head.inc.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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) { ?> + -- 2.30.0