Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions functions/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Cloudflare Pages Function for the bare "/" route only.
// Negotiates the visitor's language from Accept-Language and 302-redirects to
// the matching /<lang> home. Explicit /<lang> URLs never hit this function, so
// Falls back to the default language; the static `/ -> /en` rule in _redirects
// Handles only the bare "/" route: negotiates the visitor's language from
// Accept-Language and 302-redirects to the matching /<lang> home. Explicit
// /<lang> URLs never hit this function; the static "/ -> /en" rule in
// _redirects is the fallback if this function doesn't run.

const LANGS = ['en', 'de', 'fr', 'it', 'rm'];
const DEFAULT_LANG = 'en';
Expand Down
7 changes: 4 additions & 3 deletions scripts/postbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const PAGES: { path: string; changefreq: string; priority: string; images?: stri
{ path: '/terms', changefreq: 'monthly', priority: '0.4' },
];

// 1. Render the /404 route output to 404.html so Cloudflare Pages serves it for
// Cloudflare Pages serves a top-level 404.html for unmatched routes; copy the
// prerendered /404 route output there.
function writeNotFound() {
const src = join(browser, '404', 'index.html');
const dest = join(browser, '404.html');
Expand All @@ -38,7 +39,8 @@ function writeNotFound() {
console.log(`[postbuild] wrote ${dest}`);
}

// 2. The root '' route only redirects to /<default-lang>. Drop any prerendered
// The root '' route only redirects to /<default-lang>; drop the prerendered
// index.html so the "/" -> "/<lang>" rule in _redirects handles it instead.
function dropRootIndex() {
const root = join(browser, 'index.html');
if (existsSync(root)) {
Expand All @@ -47,7 +49,6 @@ function dropRootIndex() {
}
}

// 3. Generate a multilingual sitemap with hreflang alternates for every page.
function writeSitemap() {
const lastmod = new Date().toISOString().slice(0, 10);

Expand Down
1 change: 0 additions & 1 deletion src/app/components/legal/privacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ import { LegalPageBase } from './legal-page-base';
Stand-Datum veröffentlicht.
</p>
} @else {
<!-- English version -->
<p>
This Privacy Policy explains how we handle your personal data when you visit
<a href="https://schuly.dev">schuly.dev</a> or use the Schuly app and its backend. It is
Expand Down
6 changes: 0 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<link rel="preload" as="font" type="font/woff2" href="/fonts/inter-latin-wght-normal.woff2" crossorigin>
<link rel="preload" as="image" href="/assets/app_icon.png">

<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:site_name" content="Schuly">
<meta property="og:title" content="Schuly · Open student portal for Schulnetz &amp; more">
Expand All @@ -39,14 +38,12 @@
<meta property="og:image:height" content="512">
<meta property="og:image:alt" content="Schuly app icon">

<!-- Twitter / X -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Schuly · Open student portal for Schulnetz &amp; more">
<meta name="twitter:description" content="Open-source student portal for iOS, Android, and Web. Schulnetz works out of the box.">
<meta name="twitter:image" content="https://schuly.dev/assets/app_icon.png">
<meta name="twitter:image:alt" content="Schuly app icon">

<!-- Structured data: Organization -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
Expand All @@ -65,7 +62,6 @@
}
</script>

<!-- Structured data: WebSite -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
Expand All @@ -83,7 +79,6 @@
}
</script>

<!-- Structured data: SoftwareApplication -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
Expand Down Expand Up @@ -137,7 +132,6 @@
}
</script>

<!-- Structured data: FAQ -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
Expand Down