Repository navigation
docs(site): add share cards, structured data and a sitemap line in robots.txt - #118
Merged
Merged
Conversation
…bots.txt A link to tetrak.dev arrived as a bare URL wherever it was shared: the head carried no Open Graph tags, no share image and no structured data, and robots.txt was Hugo's one-line default, which names no sitemap. - Open Graph tags and a Twitter card on every page, sharing one description with the meta description (partials/description.html). - A share image drawn from the design tokens and the home page's standfirst by scripts/render-share-card.mjs, and committed. - JSON-LD: Organization and WebSite on the home page, TechArticle on articles with the author from the byline register, SoftwareSourceCode on the four product pages from a new `software` front-matter map. - robots.txt names the sitemap. - Six browser tests, and a section in the design skill. Co-authored-by: Yvette Mankerian <yvettekm@gmail.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Why
A link to tetrak.dev arrived as a bare URL wherever it was shared. The head carried no Open Graph tags, no share image and no structured data, and
robots.txtwas Hugo's one-line default, which names no sitemap.What changes
partials/social.html). The card, the meta description and the structured data read one description frompartials/description.html, so they cannot disagree.assets/images/design/share-card.png, drawn from the design tokens and the home page's standfirst byscripts/render-share-card.mjsand committed. The two existing illustrations are both about the OCR tool, so neither could stand for the whole site. It is a PNG at an unfingerprinted address on purpose: scrapers cache the URL, and not all of them read WebP.partials/structured-data.html):OrganizationandWebSiteTechArticle, with the author fromdata/authors.tomlSoftwareSourceCode, from a newsoftwaremap in its front matter (name,repository,licence,language); a missing key fails the buildparams.profileslists the Hugging Face and PyPItetrakprofiles assameAs. The scattercode GitHub organisation is left out because it holds other projects too.Worth a look
The share image is a design choice: the name in Playfair Display over the home page's standfirst, on the paper ground. Re-run the script after changing that standfirst.
Testing
Six new browser tests: every page has a share card and the image is in the build; a tag page is shared as "Tagged x"; an article's structured data matches its heading, date and byline; each product page names its package, repository and licence; the home page names the publisher;
robots.txtnames a sitemap that exists.npm run lint,npm run buildandnpx playwright test(43 tests) pass locally.docs(site):so that no package release is cut.🤖 Generated with Claude Code