Enhance blog post schema markup with comprehensive Article structured data#3506
Enhance blog post schema markup with comprehensive Article structured data#3506sumitshinde-84 wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the blog post template with comprehensive structured data markup by adding Article schema.org JSON-LD to improve SEO and search engine understanding of blog content.
- Adds complete Article schema markup with metadata fields including headline, description, dates, and language
- Implements dynamic author information with Person schema including social media profiles and organizational affiliation
- Includes conditional FAQ schema markup and blog relationship metadata for enhanced content structure
| {% if people[author].linkedin %} | ||
| "sameAs": ["https://www.linkedin.com/in/{{ people[author].linkedin }}"{% if people[author].github %}, "https://github.com/{{ people[author].github }}"{% endif %}], | ||
| {% endif %} |
There was a problem hiding this comment.
The sameAs array is only created when linkedin exists, but should include all available social profiles. Consider restructuring to build the array more comprehensively and handle cases where only github exists without linkedin.
| {% if people[author].linkedin %} | |
| "sameAs": ["https://www.linkedin.com/in/{{ people[author].linkedin }}"{% if people[author].github %}, "https://github.com/{{ people[author].github }}"{% endif %}], | |
| {% endif %} | |
| {% set sameAs = [] %} | |
| {% if people[author].linkedin %} | |
| {% set sameAs = sameAs.concat(["https://www.linkedin.com/in/{{ people[author].linkedin }}"]) %} | |
| {% endif %} | |
| {% if people[author].github %} | |
| {% set sameAs = sameAs.concat(["https://github.com/{{ people[author].github }}"]) %} | |
| {% endif %} | |
| {% if sameAs.length > 0 %} | |
| "sameAs": {{ sameAs | dump | safe }}, | |
| {% endif %} |
| "width": 396, | ||
| "height": 215 |
There was a problem hiding this comment.
The logo dimensions (396x215) suggest an unusual aspect ratio. Verify these dimensions are correct for the referenced logo file, as incorrect dimensions can affect schema markup validation.
| "width": 396, | |
| "height": 215 | |
| "width": 512, | |
| "height": 512 |
| "url": "{{ page.url | url | toAbsoluteUrl }}", | ||
| "inLanguage": "en-US", | ||
| {% if tags %} | ||
| {% set filtered_tags = tags | reject('equalto', 'posts') | reject('equalto', 'node-red') | list %} |
There was a problem hiding this comment.
Hardcoded tag filtering ('posts', 'node-red') should be configurable or documented. Consider moving these exclusions to a configuration file or adding a comment explaining why these specific tags are filtered.
| {% set filtered_tags = tags | reject('equalto', 'posts') | reject('equalto', 'node-red') | list %} | |
| {% set excludedTags = ['posts', 'node-red'] %} {# Tags to exclude from the keywords list. Update as needed. #} | |
| {% set filtered_tags = tags | reject('in', excludedTags) | list %} |
|
@ZJvandeWeg This PR is not ready for review ! |
Description
Related Issue(s)
Checklist