File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1111 'quality ' => 80 ,
1212 'crop ' => true
1313 ];
14-
14+
1515 if (option ('diesdasdigital.meta-knight.siteTitleAsHomePageTitle ' , false ) && $ page ->isHomePage ()) {
1616 $ full_title = $ site ->meta_title ()->or ($ site ->title ());
1717 } elseif (option ('diesdasdigital.meta-knight.pageTitleAsHomePageTitle ' , false ) && $ page ->isHomePage ()) {
2525?>
2626
2727<?php // Basic Meta Information ?>
28-
28+
2929<?php // Schema ?>
30-
30+
3131<style itemscope itemtype="https://schema.org/WebSite" itemref="schema_name schema_description schema_image"></style>
3232
3333<?php // Page Title ?>
4646<meta id="schema_description" itemprop="description" content="<?= $ page ->meta_description ()->or ($ site ->meta_description ()) ?> ">
4747
4848<?php // Canonical URL ?>
49-
49+
5050<?php if ($ page ->meta_canonical_url ()->isNotEmpty ()): ?>
5151 <link rel="canonical" href="<?= $ page ->meta_canonical_url () ?> " />
5252<?php else : ?>
5353 <link rel="canonical" href="<?= $ page ->canonicalUrl () ?> " />
5454<?php endif ; ?>
5555
56+ <?php // Alternate languages ?>
57+
58+ <?php foreach ($ kirby ->languages () as $ language ): ?>
59+ <link rel="alternate" hreflang="<?= strtolower (html ($ language ->code ())) ?> " href="<?= $ page ->url ($ language ->code ()) ?> ">
60+ <?php endforeach ; ?>
61+ <link rel="alternate" hreflang="x-default" href="<?= $ page ->url ($ kirby ->defaultLanguage ()->code ()) ?> ">
62+
5663<?php // Image ?>
5764
5865<?php if ($ meta_image = $ page ->meta_image ()->toFile () ?? $ site ->meta_image ()->toFile ()): ?>
You can’t perform that action at this time.
0 commit comments