Add Schema.org structured data enhancements to 12 high-traffic news articles#349
Add Schema.org structured data enhancements to 12 high-traffic news articles#349
Conversation
…rticles - Enhance NewsArticle schema with complete metadata (author with jobTitle/affiliation, publisher with logo, image, keywords, about, isAccessibleForFree, speakable content) - Add speakable WebPage schema with CSS selectors for TTS readability - Add FAQPage schema to 10 articles extracted from 'What to Watch' policy sections - Add Person entities for key politicians (PM Kristersson, Finance Minister Svantesson, Foreign Minister Billström) with Wikidata sameAs references - Add Organization entities for Riksdag committees and 'Sveriges Riksdag' with committee URLs and Wikidata references - Target articles: 2026-02-19, 2026-02-18, 2026-02-17, 2026-02-16 (government propositions, opposition motions, committee reports - highest traffic)" Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…tion
The paragraph-based FAQPage answers now:
- Prepend the bold key phrase to make answers self-contained
- Use sentence-boundary truncation at 600 chars (rfind('. ') > 200)
- Produce grammatically complete, informative answers
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Correct capitalization of acronyms (EU, SME, SD), month names (March, April, May-June), committee names (Finance Committee, Justice Committee), and institutional names (Sweden Democrats, National Audit Office) in FAQPage schema question names across 9 updated articles." Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
This PR enhances Schema.org structured data across 12 high-traffic English news articles (2026-02-16 → 2026-02-19) to improve eligibility for rich results (Speakable/FAQ/Knowledge Graph entities) and overall SEO clarity.
Changes:
- Enriches
NewsArticleJSON-LD (author metadata, publisher logo/image objects, speakable selectors, topical metadata). - Adds additional JSON-LD blocks for
WebPage+SpeakableSpecificationand (where applicable)FAQPage. - Adds standalone
Person/Organizationentities (ministers, Riksdag, committees) to support entity recognition.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| news/2026-02-19-opposition-motions-en.html | Expands NewsArticle schema and adds WebPage/FAQPage/Organization entities. |
| news/2026-02-19-government-propositions-en.html | Expands NewsArticle schema and adds WebPage/FAQPage/Person/Organization entities. |
| news/2026-02-19-committee-reports-en.html | Adds WebPage speakable, FAQPage, and committee Organization entities. |
| news/2026-02-18-opposition-motions-en.html | Adds WebPage speakable, FAQPage, and committee Organization entities. |
| news/2026-02-18-government-propositions-en.html | Adds WebPage speakable, FAQPage, Person, and committee Organization entities. |
| news/2026-02-18-committee-reports-en.html | Adds WebPage speakable, FAQPage, Person, and committee Organization entities. |
| news/2026-02-17-opposition-motions-en.html | Adds WebPage speakable and committee Organization entities. |
| news/2026-02-17-government-propositions-en.html | Adds WebPage speakable, FAQPage, and committee Organization entities. |
| news/2026-02-17-committee-reports-en.html | Adds WebPage speakable, FAQPage, Person, and committee Organization entities. |
| news/2026-02-16-opposition-motions-en.html | Adds WebPage speakable, Person, and committee Organization entities. |
| news/2026-02-16-government-propositions-en.html | Adds WebPage speakable, FAQPage, Person, and committee Organization entities. |
| news/2026-02-16-committee-reports-en.html | Adds WebPage speakable, FAQPage, Person, and committee Organization entities. |
| "url": "https://hack23.com/cia-icon-140.webp", | ||
| "width": 1200, | ||
| "height": 630 | ||
| }, |
There was a problem hiding this comment.
The NewsArticle structured data no longer includes wordCount, even though many other news pages in the repo provide it (and this file previously did). Consider restoring wordCount for consistency and richer metadata.
| }, | |
| }, | |
| "wordCount": 1500, |
There was a problem hiding this comment.
Restored wordCount to the NewsArticle schema for all 6 articles that were missing it (the 2026-02-19 articles and the 2026-02-16/17/18 committee reports). Fixed in commit d6bca81.
| "name": "What should analysts watch regarding May-June 2026 plenary debates and votes?", | ||
| "acceptedAnswer": { | ||
| "@type": "Answer", | ||
| "text": "May-June 2026 plenary debates and votes , scheduled three months before election, will be analyzed obsessively for coalition fracture evidence. If Center Party votes against government on preventive detention, every news outlet runs \"Tidö Coalition Splits\" headlines. If Center abstains, impact is muted. If Liberals (16 seats, typically loyal) show hesitation on any motion, coalition discipline questions intensify." |
There was a problem hiding this comment.
There’s an extra space before the comma in the FAQ answer text ("votes , scheduled"). This looks like a copy/paste artifact; removing it will improve the structured data text quality.
| "text": "May-June 2026 plenary debates and votes , scheduled three months before election, will be analyzed obsessively for coalition fracture evidence. If Center Party votes against government on preventive detention, every news outlet runs \"Tidö Coalition Splits\" headlines. If Center abstains, impact is muted. If Liberals (16 seats, typically loyal) show hesitation on any motion, coalition discipline questions intensify." | |
| "text": "May-June 2026 plenary debates and votes, scheduled three months before election, will be analyzed obsessively for coalition fracture evidence. If Center Party votes against government on preventive detention, every news outlet runs \"Tidö Coalition Splits\" headlines. If Center abstains, impact is muted. If Liberals (16 seats, typically loyal) show hesitation on any motion, coalition discipline questions intensify." |
There was a problem hiding this comment.
Fixed — changed "votes , scheduled" to "votes, scheduled". Commit d6bca81.
| "keywords": "opposition, motions, parliament, legislation, Swedish Parliament, Riksdag, politics, Sweden", | ||
| "about": { | ||
| "@type": "Thing", | ||
| "name": "Swedish Parliamentary Motions", |
There was a problem hiding this comment.
In the NewsArticle schema, the about entity name (Swedish Parliamentary Motions) doesn’t match the sameAs target (Q1968818 is used elsewhere in this file for Sveriges Riksdag/Swedish Parliament). Update sameAs to the correct Wikidata item for parliamentary motions, or change the about.name to match the linked entity.
| "name": "Swedish Parliamentary Motions", | |
| "name": "Swedish Parliament", |
There was a problem hiding this comment.
Fixed — about.name updated to "Swedish Parliament" to match the Wikidata Q1968818 entity. Commit d6bca81.
| "@type": "Answer", | ||
| "text": "The Civil Law Committee (CU) and Environment and Agriculture Committee (MJU) \n will hold hearings on these motions, likely inviting expert testimony from industry, civil society, and authorities." | ||
| } |
There was a problem hiding this comment.
The FAQPage answer text includes escaped newlines/indentation (\n ), which will be emitted as extra whitespace in structured data. Consider normalizing these strings to plain sentences with single spaces to avoid odd rendering in Rich Results / TTS.
There was a problem hiding this comment.
Fixed — normalized all FAQ answer strings to single-space separated sentences by collapsing \n whitespace patterns. Applies to both 2026-02-19-government-propositions and 2026-02-19-opposition-motions. Commit d6bca81.
| "articleSection": "Opposition Motions", | ||
| "inLanguage": "en", | ||
| "keywords": "opposition, motions, parliament, legislation, Swedish Parliament, Riksdag, politics, Sweden", |
There was a problem hiding this comment.
The NewsArticle structured data no longer includes wordCount, even though many other news pages in the repo provide it (and this file previously did). Consider restoring wordCount for consistency and richer metadata.
There was a problem hiding this comment.
Restored wordCount in the NewsArticle schema. Commit d6bca81.
| "@type": "Answer", | ||
| "text": "The Speaker will assign these propositions to relevant committees \n (Justice, Finance, Environment, Defence). Committee composition and chair priorities will shape legislative outcomes." | ||
| } |
There was a problem hiding this comment.
The FAQPage answer text includes escaped newlines/indentation (\n ), which will be emitted as extra whitespace in structured data. Consider normalizing these strings to plain sentences with single spaces to avoid odd rendering in Rich Results / TTS.
There was a problem hiding this comment.
Fixed whitespace normalization in FAQPage answers — \n patterns are now collapsed to single spaces. Commit d6bca81.
|
@copilot apply changes based on the comments in this thread |
…ace typo - Restore missing wordCount in NewsArticle schema for 6 articles where it was absent (2026-02-19 govt-propositions, opposition-motions, committee-reports; 2026-02-16/17/18 committee-reports) - Fix escaped newlines/indentation (\n ) in FAQPage answer text in 2026-02-19-government-propositions and 2026-02-19-opposition-motions - Fix about.name='Swedish Parliamentary Motions' → 'Swedish Parliament' to match sameAs Wikidata Q1968818 in 2026-02-19-opposition-motions - Fix 'votes , scheduled' → 'votes, scheduled' space typo in 2026-02-18-opposition-motions FAQ answer Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
The NewsArticle JSON-LD blocks in the 2026-02-16, 2026-02-17, 2026-02-18, and 2026-02-19 committee-reports articles were missing the speakable SpeakableSpecification property (it was only present in the separate WebPage block, not in the NewsArticle itself). All 12 articles now have consistent speakable metadata in both their NewsArticle and WebPage schemas. Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
news/index_fr.html
Outdated
| "title": "La Suède submerge le Parlement de législation sur la criminalité juvénile et l'énergie alors que vingt rapports de commission arrivent en une seule journée", | ||
| "date": "2026-02-19", | ||
| "type": "prospective", | ||
| "type": "analysis", |
There was a problem hiding this comment.
This changes the evening analysis entry to type: "analysis", but other language indexes (and news/index.html) still classify the same 2026-02-19 evening analysis article as prospective. Because the type is used for filtering and labels, this will create inconsistent categorization across languages. Pick one canonical type for this article and apply it consistently across all news/index_*.html (ideally via the generator) so users see the same category in every language.
| "type": "analysis", | |
| "type": "prospective", |
There was a problem hiding this comment.
Fixed in commit 073517e — reverted the evening-analysis type back to "prospective" in index_fr.html, index_fi.html, and index_es.html. All 14 language indexes now consistently use "prospective" for this article.
news/index_fi.html
Outdated
| "title": "Ruotsi tulvii eduskunnan nuorisorikollisuus- ja energialainsäädännöllä, kun kaksikymmentä valiokunnan mietintöä saapuu yhtenä päivänä", | ||
| "date": "2026-02-19", | ||
| "type": "prospective", | ||
| "type": "analysis", |
There was a problem hiding this comment.
This changes the evening analysis entry to type: "analysis", but other language indexes (and news/index.html) still classify the same 2026-02-19 evening analysis article as prospective. Since the type drives filtering/labels, this will cause inconsistent categorization depending on language. Align the type across all news/index_*.html (preferably by fixing the generator’s classification) so the article appears under the same category everywhere.
| "type": "analysis", | |
| "type": "prospective", |
There was a problem hiding this comment.
Fixed in commit 073517e — index_fi.html reverted to "prospective", consistent with all other 13 language indexes.
| "title": "Suecia inunda el Parlamento con legislación sobre criminalidad juvenil y energía al aterrizar veinte informes de comisión en un solo día", | ||
| "date": "2026-02-19", | ||
| "type": "prospective", | ||
| "type": "analysis", | ||
| "slug": "2026-02-19-evening-analysis-es.html", |
There was a problem hiding this comment.
This changes the evening analysis entry to type: "analysis", but other language indexes (and news/index.html) still classify the same 2026-02-19 evening analysis article as prospective. Because the type is used for filtering and labels, this introduces cross-language inconsistency. Please ensure the article type is updated consistently across all news/index_*.html (ideally through the index generation script) rather than only in a subset of languages.
There was a problem hiding this comment.
Fixed in commit 073517e — index_es.html reverted to "prospective", consistent with all other 13 language indexes.
| "headline": "Continued Civil Law Focus with Travel Guarantee Vote Approaching", | ||
| "alternativeHeadline": "Continued Civil Law Focus with Travel Guarantee Vote Approaching", | ||
| "description": "Committee reports maintain emphasis on consumer protection as travel guarantee reform heads toward chamber vote, with cross-party support expected", | ||
| "datePublished": "2026-02-16T00:00:00.000Z", |
There was a problem hiding this comment.
The structured-data headline/description here describe a “travel guarantee” story, but the visible article content (lede and sections) is about Ukraine aid, vaccine preparedness, and other committee reports. This mismatch can cause Rich Results/Knowledge Graph to show incorrect information for the page. Update the page metadata (and the JSON-LD headline/description) to accurately reflect the actual article content, or adjust the article content to match the intended headline.
There was a problem hiding this comment.
Fixed in commit 4d0934b — updated the JSON-LD headline, alternativeHeadline, description, and BreadcrumbList name to accurately reflect the actual article content (Ukraine support, data protection, social policy reform) instead of the mismatched "travel guarantee" text.
|
@copilot apply changes based on the comments in this thread and Test News / News & Sitemap Tests (cypress/e2e/news-articles.cy.js) (pull_request) |
…ismatch - Revert evening-analysis type from 'analysis' back to 'prospective' in index_fr.html, index_fi.html, and index_es.html to match all other 11 language indexes (consistent 'prospective' across all 14 languages) - Fix 2026-02-16-committee-reports-en.html JSON-LD headline/description mismatch: old text described 'travel guarantee' story but article body covers Ukraine support, data protection, and social policy reforms; updated NewsArticle headline/description and BreadcrumbList name to accurately reflect actual article content per Schema.org best practices Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Commit 26e614e accidentally changed the 2026-02-19 evening analysis article type from 'prospective' to 'analysis' in index_fr.html, index_fi.html, and index_es.html while 11 other language indexes retained 'prospective'. All 14 language indexes now consistently classify this article as 'prospective'. Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.