Add structured data, sitemap, and SEO hygiene for search indexing#14
Merged
Conversation
# Problem
The site had no machine-readable signals for search engines or AI crawlers: no structured data, no sitemap, no robots.txt, and page titles that buried the post name behind the domain prefix.
# Solution
Added Schema.org JSON-LD structured data across the site. The homepage defines a single `Person` and `WebSite` node (anchored at `/#person` and `/#website`); every post page emits a `BlogPosting` block that references those nodes by `@id`, so the whole site resolves to one author entity in Google's knowledge graph. The `build.js` template pipeline was extended to inject the per-post block automatically via a `{{json_ld}}` placeholder, keeping generated HTML in sync without manual edits.
Generated a `sitemap.xml` covering the homepage, all theme landing pages, and every post. Lastmod dates derive exclusively from frontmatter (never build time), so the file is byte-stable between builds and won't produce spurious diffs in CI. Sitemap generation is integrated into the `build` step and the `clean` step removes the file on reset. Added `sitemap.xml` and `images/` to `.prettierignore` since Prettier has no XML parser.
Added `robots.txt` allowing all crawlers (including AI/LLM bots) with targeted `Disallow` entries for build scaffolding files that `.nojekyll` now exposes. Flipped all page titles from `workman.tech — Post Title` to `Post Title · workman.tech` so the meaningful content leads in browser tabs and SERP snippets.
# Notes
The structured data on existing post HTML files was regenerated by running the build rather than hand-edited, so the JSON-LD in those files is canonical output from `renderPostJsonLd`. If a future post's frontmatter changes, re-running `build.js` will update the block automatically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The site had no machine-readable signals for search engines or AI crawlers: no structured data, no sitemap, no robots.txt, and page titles that buried the post name behind the domain prefix.
Solution
Added Schema.org JSON-LD structured data across the site. The homepage defines a single
PersonandWebSitenode (anchored at/#personand/#website); every post page emits aBlogPostingblock that references those nodes by@id, so the whole site resolves to one author entity in Google's knowledge graph. Thebuild.jstemplate pipeline was extended to inject the per-post block automatically via a{{json_ld}}placeholder, keeping generated HTML in sync without manual edits.Generated a
sitemap.xmlcovering the homepage, all theme landing pages, and every post. Lastmod dates derive exclusively from frontmatter (never build time), so the file is byte-stable between builds and won't produce spurious diffs in CI. Sitemap generation is integrated into thebuildstep and thecleanstep removes the file on reset. Addedsitemap.xmlandimages/to.prettierignoresince Prettier has no XML parser.Added
robots.txtallowing all crawlers (including AI/LLM bots) with targetedDisallowentries for build scaffolding files that.nojekyllnow exposes. Flipped all page titles fromworkman.tech — Post TitletoPost Title · workman.techso the meaningful content leads in browser tabs and SERP snippets.Notes
The structured data on existing post HTML files was regenerated by running the build rather than hand-edited, so the JSON-LD in those files is canonical output from
renderPostJsonLd. If a future post's frontmatter changes, re-runningbuild.jswill update the block automatically.