feat: i18n template infrastructure — render.sh reads _en vars, emits data-de/data-en
Phase 1 of i18n rollout: - render.sh: i18n_attrs helper, reads *_en fields from site.yaml, emits data-de/data-en attributes on title, description, role, tagline, cta, tags, section titles, card titles/descriptions, bio, content - base.html: i18n.js auto-included, title/description get i18n attrs - All 6 templates: translatable elements get i18n attr placeholders, footer toggle button with machine-translation disclaimer - ichbinotto.de pilot: added machine-translation disclaimer per m's request Templated sites can now be translated by adding _en fields to site.yaml.
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{title}}</title>
|
||||
<meta name="description" content="{{description}}">
|
||||
<title{{title_i18n}}>{{title}}</title>
|
||||
<meta name="description" content="{{description}}"{{description_i18n}}>
|
||||
<meta name="robots" content="index, follow">
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>{{favicon}}</text></svg>">
|
||||
{{fonts}}
|
||||
@@ -18,5 +18,6 @@
|
||||
</head>
|
||||
<body class="noise-overlay">
|
||||
{{body}}
|
||||
<script src="/shared/i18n.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user