Skip to content

⚡️ Self-host Inter font and move JSON-LD to body end - #211

Merged
ker0x merged 1 commit into
mainfrom
tech/issue-000-various
Aug 11, 2026
Merged

⚡️ Self-host Inter font and move JSON-LD to body end#211
ker0x merged 1 commit into
mainfrom
tech/issue-000-various

Conversation

@ker0x

@ker0x ker0x commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Drop the @fontsource-variable/inter JS import and declare the two @font-face rules (latin + latin-ext) directly in app.css, pointing at the already-preloaded self-hosted woff2 files. This removes a render-blocking CSS import that duplicated the fonts the fonts block preloads.
  • Move the meta_jsonld block out of <head> and render it at the end of <body>, wrapped in a single <script type="application/ld+json"> guarded by {% if block('meta_jsonld') %} so pages without structured data emit nothing.
  • Templates now provide only the JSON payload for meta_jsonld — the <script> tag lives in base.html.twig.
  • Give meta_canonical a real fallback (absolute_url('/')) instead of an empty href when there is no current route.

Test plan

  • make asset-build then check Inter still renders and the woff2 files are requested once
  • View source on / and /fr: single <script type="application/ld+json"> at the end of <body>, valid JSON
  • View source on a page without structured data (e.g. /contact): no empty ld+json script
  • <link rel="canonical"> never has an empty href
  • make test

@ker0x
ker0x merged commit 7ac0b24 into main Aug 11, 2026
1 check passed
@ker0x
ker0x deleted the tech/issue-000-various branch August 11, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant