Does not (yet) account for all aliases, but at least provides a good
reference to the requested page.
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);
}
<?php if ($Article->image) { ?>
<meta property="og:image" content="https://<?= $_SERVER['HTTP_HOST'] . '/' . htmlspecialchars($Article->thumb('640x')) ?>" />
<?php } ?>
+ <meta property="og:url" content="https://<?= $_SERVER['HTTP_HOST'] . '/' . htmlspecialchars($Article->link) ?>" />
</head>
<body>