fix canonical link meta

This commit is contained in:
joyqi 2023-12-29 14:34:24 +08:00
parent 005951ee4d
commit fd013a7508

View File

@ -966,7 +966,7 @@ class Archive extends Contents
$allows = self::pluginHandle()->call('headerOptions', $allows, $this);
$title = (empty($this->archiveTitle) ? '' : $this->archiveTitle . ' » ') . $this->options->title;
$header = '<link rel="canonical" href="' . $this->archiveUrl . '" />' . "\n";
$header = $this->is('single') ? '<link rel="canonical" href="' . $this->archiveUrl . '" />' . "\n" : '';
if (!empty($allows['pingback']) && 2 == $this->options->allowXmlRpc) {
$header .= '<link rel="pingback" href="' . $allows['pingback'] . '" />' . "\n";