feat(www): locale specific urls (#12508)
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import "./index.css"
|
||||
import { Title, Meta, Link } from "@solidjs/meta"
|
||||
import { Title, Meta } from "@solidjs/meta"
|
||||
import { createAsync } from "@solidjs/router"
|
||||
import { Header } from "~/component/header"
|
||||
import { Footer } from "~/component/footer"
|
||||
import { Legal } from "~/component/legal"
|
||||
import { config } from "~/config"
|
||||
import { changelog } from "~/lib/changelog"
|
||||
import type { HighlightGroup } from "~/lib/changelog"
|
||||
import { For, Show, createSignal } from "solid-js"
|
||||
import { useI18n } from "~/context/i18n"
|
||||
import { useLanguage } from "~/context/language"
|
||||
import { LocaleLinks } from "~/component/locale-links"
|
||||
|
||||
function formatDate(dateString: string, locale: string) {
|
||||
const date = new Date(dateString)
|
||||
@@ -107,7 +107,7 @@ export default function Changelog() {
|
||||
return (
|
||||
<main data-page="changelog">
|
||||
<Title>{i18n.t("changelog.title")}</Title>
|
||||
<Link rel="canonical" href={`${config.baseUrl}/changelog`} />
|
||||
<LocaleLinks path="/changelog" />
|
||||
<Meta name="description" content={i18n.t("changelog.meta.description")} />
|
||||
|
||||
<div data-component="container">
|
||||
@@ -122,7 +122,8 @@ export default function Changelog() {
|
||||
<section data-component="releases">
|
||||
<Show when={releases().length === 0}>
|
||||
<p>
|
||||
{i18n.t("changelog.empty")} <a href="/changelog.json">{i18n.t("changelog.viewJson")}</a>
|
||||
{i18n.t("changelog.empty")}{" "}
|
||||
<a href={language.route("/changelog.json")}>{i18n.t("changelog.viewJson")}</a>
|
||||
</p>
|
||||
</Show>
|
||||
<For each={releases()}>
|
||||
|
||||
Reference in New Issue
Block a user