diff --git a/app.config.ts b/app.config.ts index 21d17722..7c5d3d9a 100644 --- a/app.config.ts +++ b/app.config.ts @@ -1,8 +1,9 @@ export default defineAppConfig({ notice: { title: { - ja: "v2023.11.0 をリリースしました!", + ja: "Misskeyの2023年を振り返りましょう!", + en: "Recap Misskey in 2023", }, - to: "/docs/releases/" + to: "/blog/2023-12-01-2023recap/" }, }); \ No newline at end of file diff --git a/assets/js/misc/index.ts b/assets/js/misc/index.ts index d124b011..091c85ef 100644 --- a/assets/js/misc/index.ts +++ b/assets/js/misc/index.ts @@ -1,4 +1,5 @@ import type { NavItem } from '@nuxt/content/dist/runtime/types'; +import type { LocaleObject } from '@nuxtjs/i18n/dist/runtime/composables'; import { parseURL } from 'ufo'; /** @@ -45,7 +46,9 @@ export function isLocalPath(link: string, base?: string): boolean { export function sanitizeInternalPath(path: string): string { const runtimeConfig = useRuntimeConfig(); - return path.replace(new RegExp(`^(\/(${runtimeConfig.public.locales.map((l) => l.code).join('|')})\/?){2,}(.*)$`, 'g'), '$1$2'); + return path + .replace(/^(\/((?!ja)[a-z]{2}))?\/blog\/(.+)/g, '/ja/blog/$3') + .replace(new RegExp(`^(\/(${(runtimeConfig.public.locales as LocaleObject[]).map((l) => l.code).join('|')})\/?){2,}(.*)$`, 'g'), '$1$2'); } /** diff --git a/components/index/hero/Left.vue b/components/index/hero/Left.vue index cf2358fe..d50a670f 100644 --- a/components/index/hero/Left.vue +++ b/components/index/hero/Left.vue @@ -13,7 +13,7 @@
-
{{ notice.title[locale] ?? notice.title.ja }}
+
{{ notice.title[locale] ?? notice.title?.en ?? notice.title.ja }}
@@ -44,6 +44,10 @@ const showTagline = ref(false); const colorMode = useColorMode(); const mobileScreenShot = computed(() => (colorMode.preference === 'dark') ? '/img/hero/screenshot-mobile-en.png' : '/img/hero/screenshot-mobile.png'); +// お知らせ欄にブログが来る可能性もあるので +const localeState = useState('miHub_blog_originalLocale', () => locale.value); +localeState.value = locale.value; + onMounted(() => { setTimeout(() => { showTagline.value = true; diff --git a/pages/blog/[slug].vue b/pages/blog/[slug].vue index fffd2eea..f720c4b2 100644 --- a/pages/blog/[slug].vue +++ b/pages/blog/[slug].vue @@ -24,18 +24,35 @@