File tree Expand file tree Collapse file tree 8 files changed +51
-8
lines changed Expand file tree Collapse file tree 8 files changed +51
-8
lines changed Original file line number Diff line number Diff line change 3131 - Preserve as much of the original as possible
3232 - Keep the same style, tone, and structure
3333 - Change ONLY the specific parts mentioned in the instructions below
34- - If no specific change is mentioned for something, leave it unchanged
3534</primary-editing-task>
3635<?php endif ?>
3736
Original file line number Diff line number Diff line change 11<?php
22
33/** @var \Kirby\Cms\Page $page
4- ** @var \Kirby\Cms\Site $site */
4+ ** @var \Kirby\Cms\Site $site
5+ ** @var string|null $currentField */
56
67$ meta = $ page ->metadata ();
8+ $ currentField = $ currentField ?? null ;
9+
10+ $ metaFields = [
11+ 'metaTitle ' => 'Meta Title ' ,
12+ 'metaDescription ' => 'Meta Description ' ,
13+ 'ogTitle ' => 'Open Graph Title ' ,
14+ 'ogDescription ' => 'Open Graph Description '
15+ ];
16+ ?>
17+
18+ <existing-metadata>
19+ <?php foreach ($ metaFields as $ key => $ label ) : ?>
20+ <?php
21+ $ value = $ meta ->get ($ key );
22+ if ($ currentField === $ key || !$ value || $ value === '' ) {
23+ continue ;
24+ }
25+ ?>
26+ <<?= $ key ?> ><?= $ value ?> </<?= $ key ?> >
27+ <?php endforeach ?>
28+ </existing-metadata>
Original file line number Diff line number Diff line change 11<?php
22
3- /** @var \Kirby\Cms\Site $site */
3+ /** @var \Kirby\Cms\Site $site
4+ ** @var string|null $currentField */
5+
6+ $ currentField = $ currentField ?? null ;
7+
8+ $ metaFields = [
9+ 'metaDescription ' => 'Site Meta Description ' ,
10+ 'ogDescription ' => 'Site Open Graph Description ' ,
11+ 'ogSiteName ' => 'Site Name '
12+ ];
13+ ?>
14+
15+ <existing-site-metadata>
16+ <?php foreach ($ metaFields as $ key => $ label ) : ?>
17+ <?php
18+ $ value = $ site ->$ key ()->value ();
19+ if ($ currentField === $ key || !$ value || $ value === '' ) {
20+ continue ;
21+ }
22+ ?>
23+ <<?= $ key ?> ><?= $ value ?> </<?= $ key ?> >
24+ <?php endforeach ?>
25+ </existing-site-metadata>
Original file line number Diff line number Diff line change 2020 You'll receive the content of the page as well as any meta tags that are already set below.
2121</task>
2222
23- <?php snippet ('seo/prompts/meta ' );
23+ <?php snippet ('seo/prompts/meta ' , [ ' currentField ' => ' metaDescription ' ] );
2424snippet ('seo/prompts/content ' );
Original file line number Diff line number Diff line change 2121 You'll receive the content of the page as well as any meta tags that are already set below.
2222</task>
2323
24- <?php snippet ('seo/prompts/meta ' );
24+ <?php snippet ('seo/prompts/meta ' , [ ' currentField ' => ' ogDescription ' ] );
2525snippet ('seo/prompts/content ' );
Original file line number Diff line number Diff line change 2121 You'll receive the content of the home page as well as any meta tags that are already set below.
2222</task>
2323
24- <?php snippet ('seo/prompts/site-meta ' );
24+ <?php snippet ('seo/prompts/site-meta ' , [ ' currentField ' => ' ogDescription ' ] );
2525snippet ('seo/prompts/content ' ); ?>
Original file line number Diff line number Diff line change 2020 You'll receive the content of the home page as well as any meta tags that are already set below.
2121</task>
2222
23- <?php snippet ('seo/prompts/site-meta ' );
23+ <?php snippet ('seo/prompts/site-meta ' , [ ' currentField ' => ' metaDescription ' ] );
2424snippet ('seo/prompts/content ' ); ?>
Original file line number Diff line number Diff line change 3535 If useful for the customers niche, include a keyword for the location. AVOID for global companies or niche subpages.
3636</task>
3737
38- <?php snippet ('seo/prompts/meta ' );
38+ <?php snippet ('seo/prompts/meta ' , [ ' currentField ' => ' metaTitle ' ] );
3939snippet ('seo/prompts/content ' );
You can’t perform that action at this time.
0 commit comments