diff --git a/assets/data/locales.ts b/assets/data/locales.ts new file mode 100644 index 00000000..ee6d4a07 --- /dev/null +++ b/assets/data/locales.ts @@ -0,0 +1,17 @@ +import type { LocaleObject } from '@nuxtjs/i18n/dist/runtime/composables'; + +export const localesConst = [ + { files: [ 'ja-JP.json' ], code: 'ja', iso: 'ja-JP', name: '日本語' }, + { files: [ 'en-US.json' ], code: 'en', iso: 'en-US', name: 'English' }, + { files: [ 'id-ID.json' ], code: 'id', iso: 'id-ID', name: 'Bahasa Indonesia' }, + { files: [ 'ko-KR.json' ], code: 'ko', iso: 'ko-KR', name: '한국어' }, + { files: [ 'it-IT.json' ], code: 'it', iso: 'it-IT', name: 'Italiano' }, + { files: [ 'pl-PL.json' ], code: 'pl', iso: 'pl-PL', name: 'Polski' }, + { files: [ 'fr-FR.json' ], code: 'fr', iso: 'fr-FR', name: 'Français' }, + { files: [ 'zh-CN.json' ], code: 'cn', iso: 'zh-CN', name: '简体中文' }, + { files: [ 'zh-TW.json' ], code: 'tw', iso: 'zh-TW', name: '繁体中文' }, +] as const; + +export type LocaleCodes = typeof localesConst[number]['code']; + +export const locales = localesConst as unknown as LocaleObject[]; diff --git a/assets/data/old-hub-redirects.ts b/assets/data/old-hub-redirects.ts new file mode 100644 index 00000000..9437bbc2 --- /dev/null +++ b/assets/data/old-hub-redirects.ts @@ -0,0 +1,1330 @@ +export const redirects = [ + [ + "/docs/api/", + "/docs/for-developers/api/" + ], + [ + "/docs/features/", + "/docs/for-users/features/" + ], + [ + "/docs/api/streaming/", + "/docs/for-developers/api/streaming/" + ], + [ + "/docs/api/streaming/channel/", + "/docs/for-developers/api/streaming/channel/" + ], + [ + "/docs/api/streaming/channel/global-timeline.html", + "/docs/for-developers/api/streaming/channel/global-timeline/" + ], + [ + "/docs/api/streaming/channel/global-timeline", + "/docs/api/streaming/channel/global-timeline.html" + ], + [ + "/docs/api/streaming/channel/global-timeline.md", + "/docs/api/streaming/channel/global-timeline.html" + ], + [ + "/docs/api/streaming/channel/home-timeline.html", + "/docs/for-developers/api/streaming/channel/home-timeline/" + ], + [ + "/docs/api/streaming/channel/home-timeline", + "/docs/api/streaming/channel/home-timeline.html" + ], + [ + "/docs/api/streaming/channel/home-timeline.md", + "/docs/api/streaming/channel/home-timeline.html" + ], + [ + "/docs/api/streaming/channel/hybrid-timeline.html", + "/docs/for-developers/api/streaming/channel/hybrid-timeline/" + ], + [ + "/docs/api/streaming/channel/hybrid-timeline", + "/docs/api/streaming/channel/hybrid-timeline.html" + ], + [ + "/docs/api/streaming/channel/hybrid-timeline.md", + "/docs/api/streaming/channel/hybrid-timeline.html" + ], + [ + "/docs/api/streaming/channel/index.html", + "/docs/api/streaming/channel/" + ], + [ + "/docs/api/streaming/channel/index.md", + "/docs/api/streaming/channel/" + ], + [ + "/docs/api/streaming/channel/local-timeline.html", + "/docs/for-developers/api/streaming/channel/local-timeline/" + ], + [ + "/docs/api/streaming/channel/local-timeline", + "/docs/api/streaming/channel/local-timeline.html" + ], + [ + "/docs/api/streaming/channel/local-timeline.md", + "/docs/api/streaming/channel/local-timeline.html" + ], + [ + "/docs/api/streaming/channel/main.html", + "/docs/for-developers/api/streaming/channel/main/" + ], + [ + "/docs/api/streaming/channel/main", + "/docs/api/streaming/channel/main.html" + ], + [ + "/docs/api/streaming/channel/main.md", + "/docs/api/streaming/channel/main.html" + ], + [ + "/docs/api/streaming/index.html", + "/docs/for-developers/api/streaming/" + ], + [ + "/docs/api/streaming/index.md", + "/docs/api/streaming/" + ], + [ + "/docs/api/streaming/note-capture-events.html", + "/docs/for-developers/api/streaming/note-capture-events/" + ], + [ + "/docs/api/streaming/note-capture-events", + "/docs/api/streaming/note-capture-events.html" + ], + [ + "/docs/api/streaming/note-capture-events.md", + "/docs/api/streaming/note-capture-events.html" + ], + [ + "/docs/admin/cdn.html", + "/docs/for-admin/install/resources/cdn/" + ], + [ + "/docs/admin/cdn", + "/docs/admin/cdn.html" + ], + [ + "/docs/admin/cdn.md", + "/docs/admin/cdn.html" + ], + [ + "/docs/admin/nginx.html", + "/docs/for-admin/install/resources/nginx/" + ], + [ + "/docs/admin/nginx", + "/docs/admin/nginx.html" + ], + [ + "/docs/admin/nginx.md", + "/docs/admin/nginx.html" + ], + [ + "/docs/admin/push-docker-hub.html", + "/docs/for-admin/install/resources/push-docker-hub/" + ], + [ + "/docs/admin/push-docker-hub", + "/docs/admin/push-docker-hub.html" + ], + [ + "/docs/admin/push-docker-hub.md", + "/docs/admin/push-docker-hub.html" + ], + [ + "/docs/admin/troubleshooting.html", + "/docs/for-admin/install/resources/troubleshooting/" + ], + [ + "/docs/admin/troubleshooting", + "/docs/admin/troubleshooting.html" + ], + [ + "/docs/admin/troubleshooting.md", + "/docs/admin/troubleshooting.html" + ], + [ + "/docs/advanced/aiscript.html", + "/docs/for-developers/aiscript/" + ], + [ + "/docs/advanced/aiscript", + "/docs/advanced/aiscript.html" + ], + [ + "/docs/advanced/aiscript.md", + "/docs/advanced/aiscript.html" + ], + [ + "/docs/advanced/create-plugin.html", + "/docs/for-developers/plugin/create-plugin/" + ], + [ + "/docs/advanced/create-plugin", + "/docs/advanced/create-plugin.html" + ], + [ + "/docs/advanced/create-plugin.md", + "/docs/advanced/create-plugin.html" + ], + [ + "/docs/advanced/develop-bot.html", + "/docs/for-developers/bot/" + ], + [ + "/docs/advanced/develop-bot", + "/docs/advanced/develop-bot.html" + ], + [ + "/docs/advanced/develop-bot.md", + "/docs/advanced/develop-bot.html" + ], + [ + "/docs/advanced/plugin-api-reference.html", + "/docs/for-developers/plugin/plugin-api-reference/" + ], + [ + "/docs/advanced/plugin-api-reference", + "/docs/advanced/plugin-api-reference.html" + ], + [ + "/docs/advanced/plugin-api-reference.md", + "/docs/advanced/plugin-api-reference.html" + ], + [ + "/docs/advanced/publish-on-your-website.html", + "/docs/for-developers/publish-on-your-website/" + ], + [ + "/docs/advanced/publish-on-your-website", + "/docs/advanced/publish-on-your-website.html" + ], + [ + "/docs/advanced/publish-on-your-website.md", + "/docs/advanced/publish-on-your-website.html" + ], + [ + "/docs/api/app.html", + "/docs/for-developers/api/app/" + ], + [ + "/docs/api/app", + "/docs/api/app.html" + ], + [ + "/docs/api/app.md", + "/docs/api/app.html" + ], + [ + "/docs/api/index.html", + "/docs/api/" + ], + [ + "/docs/api/index.md", + "/docs/api/" + ], + [ + "/docs/api/libraries.html", + "/docs/for-developers/api/libraries/" + ], + [ + "/docs/api/libraries", + "/docs/api/libraries.html" + ], + [ + "/docs/api/libraries.md", + "/docs/api/libraries.html" + ], + [ + "/docs/api/permission.html", + "/docs/for-developers/api/permission/" + ], + [ + "/docs/api/permission", + "/docs/api/permission.html" + ], + [ + "/docs/api/permission.md", + "/docs/api/permission.html" + ], + [ + "/docs/features/ads.html", + "/docs/for-users/features/ads/" + ], + [ + "/docs/features/ads", + "/docs/features/ads.html" + ], + [ + "/docs/features/ads.md", + "/docs/features/ads.html" + ], + [ + "/docs/features/antenna.html", + "/docs/for-users/features/antenna/" + ], + [ + "/docs/features/antenna", + "/docs/features/antenna.html" + ], + [ + "/docs/features/antenna.md", + "/docs/features/antenna.html" + ], + [ + "/docs/features/charts.html", + "/docs/for-users/features/charts/" + ], + [ + "/docs/features/charts", + "/docs/features/charts.html" + ], + [ + "/docs/features/charts.md", + "/docs/features/charts.html" + ], + [ + "/docs/features/clip.html", + "/docs/for-users/features/clip/" + ], + [ + "/docs/features/clip", + "/docs/features/clip.html" + ], + [ + "/docs/features/clip.md", + "/docs/features/clip.html" + ], + [ + "/docs/features/custom-emoji.html", + "/docs/for-users/features/custom-emoji/" + ], + [ + "/docs/features/custom-emoji", + "/docs/features/custom-emoji.html" + ], + [ + "/docs/features/custom-emoji.md", + "/docs/features/custom-emoji.html" + ], + [ + "/docs/features/deck.html", + "/docs/for-users/features/deck/" + ], + [ + "/docs/features/deck", + "/docs/features/deck.html" + ], + [ + "/docs/features/deck.md", + "/docs/features/deck.html" + ], + [ + "/docs/features/drive.html", + "/docs/for-users/features/drive/" + ], + [ + "/docs/features/drive", + "/docs/features/drive.html" + ], + [ + "/docs/features/drive.md", + "/docs/features/drive.html" + ], + [ + "/docs/features/favorite.html", + "/docs/for-users/features/favorite/" + ], + [ + "/docs/features/favorite", + "/docs/features/favorite.html" + ], + [ + "/docs/features/favorite.md", + "/docs/features/favorite.html" + ], + [ + "/docs/features/follow.html", + "/docs/for-users/features/follow/" + ], + [ + "/docs/features/follow", + "/docs/features/follow.html" + ], + [ + "/docs/features/follow.md", + "/docs/features/follow.html" + ], + [ + "/docs/features/hashtag.html", + "/docs/for-users/features/hashtag/" + ], + [ + "/docs/features/hashtag", + "/docs/features/hashtag.html" + ], + [ + "/docs/features/hashtag.md", + "/docs/features/hashtag.html" + ], + [ + "/docs/features/index.html", + "/docs/features/" + ], + [ + "/docs/features/index.md", + "/docs/features/" + ], + [ + "/docs/features/mention.html", + "/docs/for-users/features/mention/" + ], + [ + "/docs/features/mention", + "/docs/features/mention.html" + ], + [ + "/docs/features/mention.md", + "/docs/features/mention.html" + ], + [ + "/docs/features/mfm.html", + "/docs/for-users/features/mfm/" + ], + [ + "/docs/features/mfm", + "/docs/features/mfm.html" + ], + [ + "/docs/features/mfm.md", + "/docs/features/mfm.html" + ], + [ + "/docs/features/mute-and-block.html", + "/docs/for-users/features/mute-and-block/" + ], + [ + "/docs/features/mute-and-block", + "/docs/features/mute-and-block.html" + ], + [ + "/docs/features/mute-and-block.md", + "/docs/features/mute-and-block.html" + ], + [ + "/docs/features/note.html", + "/docs/for-users/features/note/" + ], + [ + "/docs/features/note", + "/docs/features/note.html" + ], + [ + "/docs/features/note.md", + "/docs/features/note.html" + ], + [ + "/docs/features/online-status.html", + "/docs/for-users/features/online-status/" + ], + [ + "/docs/features/online-status", + "/docs/features/online-status.html" + ], + [ + "/docs/features/online-status.md", + "/docs/features/online-status.html" + ], + [ + "/docs/features/pages.html", + "/docs/for-users/features/pages/" + ], + [ + "/docs/features/pages", + "/docs/features/pages.html" + ], + [ + "/docs/features/pages.md", + "/docs/features/pages.html" + ], + [ + "/docs/features/plugin.html", + "/docs/for-users/features/plugin/" + ], + [ + "/docs/features/plugin", + "/docs/features/plugin.html" + ], + [ + "/docs/features/plugin.md", + "/docs/features/plugin.html" + ], + [ + "/docs/features/reaction.html", + "/docs/for-users/features/reaction/" + ], + [ + "/docs/features/reaction", + "/docs/features/reaction.html" + ], + [ + "/docs/features/reaction.md", + "/docs/features/reaction.html" + ], + [ + "/docs/features/share-form.html", + "/docs/for-users/features/share-form/" + ], + [ + "/docs/features/share-form", + "/docs/features/share-form.html" + ], + [ + "/docs/features/share-form.md", + "/docs/features/share-form.html" + ], + [ + "/docs/features/silence.html", + "/docs/for-users/features/silence/" + ], + [ + "/docs/features/silence", + "/docs/features/silence.html" + ], + [ + "/docs/features/silence.md", + "/docs/features/silence.html" + ], + [ + "/docs/features/theme.html", + "/docs/for-users/features/theme/" + ], + [ + "/docs/features/theme", + "/docs/features/theme.html" + ], + [ + "/docs/features/theme.md", + "/docs/features/theme.html" + ], + [ + "/docs/features/thread-mute.html", + "/docs/for-users/features/thread-mute/" + ], + [ + "/docs/features/thread-mute", + "/docs/features/thread-mute.html" + ], + [ + "/docs/features/thread-mute.md", + "/docs/features/thread-mute.html" + ], + [ + "/docs/features/timeline.html", + "/docs/for-users/features/timeline/" + ], + [ + "/docs/features/timeline", + "/docs/features/timeline.html" + ], + [ + "/docs/features/timeline.md", + "/docs/features/timeline.html" + ], + [ + "/docs/features/webhook.html", + "/docs/for-users/features/webhook/" + ], + [ + "/docs/features/webhook", + "/docs/features/webhook.html" + ], + [ + "/docs/features/webhook.md", + "/docs/features/webhook.html" + ], + [ + "/docs/features/widgets.html", + "/docs/for-users/features/widgets/" + ], + [ + "/docs/features/widgets", + "/docs/features/widgets.html" + ], + [ + "/docs/features/widgets.md", + "/docs/features/widgets.html" + ], + [ + "/docs/features/word-mute.html", + "/docs/for-users/features/word-mute/" + ], + [ + "/docs/features/word-mute", + "/docs/features/word-mute.html" + ], + [ + "/docs/features/word-mute.md", + "/docs/features/word-mute.html" + ], + [ + "/docs/install/bash.html", + "/docs/for-admin/install/guides/bash/" + ], + [ + "/docs/install/bash", + "/docs/install/bash.html" + ], + [ + "/docs/install/bash.md", + "/docs/install/bash.html" + ], + [ + "/docs/install/docker.html", + "/docs/for-admin/install/guides/docker/" + ], + [ + "/docs/install/docker", + "/docs/install/docker.html" + ], + [ + "/docs/install/docker.md", + "/docs/install/docker.html" + ], + [ + "/docs/install/kubernetes.html", + "/docs/for-admin/install/guides/kubernetes/" + ], + [ + "/docs/install/kubernetes", + "/docs/install/kubernetes.html" + ], + [ + "/docs/install/kubernetes.md", + "/docs/install/kubernetes.html" + ], + [ + "/docs/install/manual.html", + "/docs/for-admin/install/guides/manual/" + ], + [ + "/docs/install/manual", + "/docs/install/manual.html" + ], + [ + "/docs/install/manual.md", + "/docs/install/manual.html" + ], + [ + "/docs/install/ubuntu-manual.html", + "/docs/for-admin/install/guides/ubuntu-manual/" + ], + [ + "/docs/install/ubuntu-manual", + "/docs/install/ubuntu-manual.html" + ], + [ + "/docs/install/ubuntu-manual.md", + "/docs/install/ubuntu-manual.html" + ], + [ + "/docs/tips/disable-timelines.html", + "/docs/for-admin/moderation-tips/disable-timelines/" + ], + [ + "/docs/tips/disable-timelines", + "/docs/tips/disable-timelines.html" + ], + [ + "/docs/tips/disable-timelines.md", + "/docs/tips/disable-timelines.html" + ], + [ + "/docs/tips/scale-out.html", + "/docs/for-admin/install/resources/scale-out/" + ], + [ + "/docs/tips/scale-out", + "/docs/tips/scale-out.html" + ], + [ + "/docs/tips/scale-out.md", + "/docs/tips/scale-out.html" + ], + [ + "/appendix/assets.html", + "/brand-assets/" + ], + [ + "/appendix/assets", + "/appendix/assets.html" + ], + [ + "/appendix/assets.md", + "/appendix/assets.html" + ], + [ + "/docs/apps.html", + "/docs/for-users/resources/apps/" + ], + [ + "/docs/apps", + "/docs/apps.html" + ], + [ + "/docs/apps.md", + "/docs/apps.html" + ], + [ + "/docs/donate.html", + "/docs/for-users/resources/donate/" + ], + [ + "/docs/donate", + "/docs/donate.html" + ], + [ + "/docs/donate.md", + "/docs/donate.html" + ], + [ + "/docs/faq.html", + "/docs/for-users/resources/faq/" + ], + [ + "/docs/faq", + "/docs/faq.html" + ], + [ + "/docs/faq.md", + "/docs/faq.html" + ], + [ + "/docs/getting-started.html", + "/docs/for-users/onboarding/" + ], + [ + "/docs/getting-started", + "/docs/getting-started.html" + ], + [ + "/docs/getting-started.md", + "/docs/getting-started.html" + ], + [ + "/docs/glossary.html", + "/docs/for-users/resources/glossary/" + ], + [ + "/docs/glossary", + "/docs/glossary.html" + ], + [ + "/docs/glossary.md", + "/docs/glossary.html" + ], + [ + "/docs/index.html", + "/docs/" + ], + [ + "/docs/index.md", + "/docs/" + ], + [ + "/docs/install.html", + "/docs/for-admin/install/guides/" + ], + [ + "/docs/install", + "/docs/install.html" + ], + [ + "/docs/install.md", + "/docs/install.html" + ], + [ + "/docs/misskey-hub.html", + "/docs/for-users/resources/misskey-hub/" + ], + [ + "/docs/misskey-hub", + "/docs/misskey-hub.html" + ], + [ + "/docs/misskey-hub.md", + "/docs/misskey-hub.html" + ], + [ + "/docs/misskey.html", + "/docs/about-misskey/" + ], + [ + "/docs/misskey", + "/docs/misskey.html" + ], + [ + "/docs/misskey.md", + "/docs/misskey.html" + ], + [ + "/docs/notes.html", + "/docs/for-users/onboarding/warning/" + ], + [ + "/docs/notes", + "/docs/notes.html" + ], + [ + "/docs/notes.md", + "/docs/notes.html" + ], + [ + "/docs/releases.html", + "/docs/releases/" + ], + [ + "/docs/releases", + "/docs/releases.html" + ], + [ + "/docs/releases.md", + "/docs/releases.html" + ], + [ + "/docs/troubleshooting.html", + "/docs/for-users/resources/troubleshooting/" + ], + [ + "/docs/troubleshooting", + "/docs/troubleshooting.html" + ], + [ + "/docs/troubleshooting.md", + "/docs/troubleshooting.html" + ], + [ + "/blog/2021-09-11-hello-to-misskey-hub.html", + "/ja/blog/2021-09-11-hello-to-misskey-hub/" + ], + [ + "/blog/2021-09-11-hello-to-misskey-hub", + "/blog/2021-09-11-hello-to-misskey-hub.html" + ], + [ + "/blog/2021-09-11-hello-to-misskey-hub.md", + "/blog/2021-09-11-hello-to-misskey-hub.html" + ], + [ + "/blog/2021-11-05-mac2021.html", + "/ja/blog/2021-11-05-mac2021/" + ], + [ + "/blog/2021-11-05-mac2021", + "/blog/2021-11-05-mac2021.html" + ], + [ + "/blog/2021-11-05-mac2021.md", + "/blog/2021-11-05-mac2021.html" + ], + [ + "/blog/2021-12-01-inside-misskey-hub.html", + "/ja/blog/2021-12-01-inside-misskey-hub/" + ], + [ + "/blog/2021-12-01-inside-misskey-hub", + "/blog/2021-12-01-inside-misskey-hub.html" + ], + [ + "/blog/2021-12-01-inside-misskey-hub.md", + "/blog/2021-12-01-inside-misskey-hub.html" + ], + [ + "/blog/2022-02-11-inside-mfm.html", + "/ja/blog/2022-02-11-inside-mfm/" + ], + [ + "/blog/2022-02-11-inside-mfm", + "/blog/2022-02-11-inside-mfm.html" + ], + [ + "/blog/2022-02-11-inside-mfm.md", + "/blog/2022-02-11-inside-mfm.html" + ], + [ + "/blog/2022-11-28-media-k-tai.html", + "/ja/blog/2022-11-28-media-k-tai/" + ], + [ + "/blog/2022-11-28-media-k-tai", + "/blog/2022-11-28-media-k-tai.html" + ], + [ + "/blog/2022-11-28-media-k-tai.md", + "/blog/2022-11-28-media-k-tai.html" + ], + [ + "/blog/2023-02-08-contribute-to-earn.html", + "/ja/blog/2023-02-08-contribute-to-earn/" + ], + [ + "/blog/2023-02-08-contribute-to-earn", + "/blog/2023-02-08-contribute-to-earn.html" + ], + [ + "/blog/2023-02-08-contribute-to-earn.md", + "/blog/2023-02-08-contribute-to-earn.html" + ], + [ + "/blog/2023-02-13-gihyo.html", + "/ja/blog/2023-02-13-gihyo/" + ], + [ + "/blog/2023-02-13-gihyo", + "/blog/2023-02-13-gihyo.html" + ], + [ + "/blog/2023-02-13-gihyo.md", + "/blog/2023-02-13-gihyo.html" + ], + [ + "/blog/2023-02-13-media-k-tai.html", + "/ja/blog/2023-02-13-media-k-tai/" + ], + [ + "/blog/2023-02-13-media-k-tai", + "/blog/2023-02-13-media-k-tai.html" + ], + [ + "/blog/2023-02-13-media-k-tai.md", + "/blog/2023-02-13-media-k-tai.html" + ], + [ + "/blog/2023-03-04-media-itmedia.html", + "/ja/blog/2023-03-04-media-itmedia/" + ], + [ + "/blog/2023-03-04-media-itmedia", + "/blog/2023-03-04-media-itmedia.html" + ], + [ + "/blog/2023-03-04-media-itmedia.md", + "/blog/2023-03-04-media-itmedia.html" + ], + [ + "/blog/2023-03-22-gihyo.html", + "/ja/blog/2023-03-22-gihyo/" + ], + [ + "/blog/2023-03-22-gihyo", + "/blog/2023-03-22-gihyo.html" + ], + [ + "/blog/2023-03-22-gihyo.md", + "/blog/2023-03-22-gihyo.html" + ], + [ + "/blog/2023-04-08-media-nikkei-linux.html", + "/ja/blog/2023-04-08-media-nikkei-linux/" + ], + [ + "/blog/2023-04-08-media-nikkei-linux", + "/blog/2023-04-08-media-nikkei-linux.html" + ], + [ + "/blog/2023-04-08-media-nikkei-linux.md", + "/blog/2023-04-08-media-nikkei-linux.html" + ], + [ + "/blog/2023-05-15-gihyo.html", + "/ja/blog/2023-05-15-gihyo/" + ], + [ + "/blog/2023-05-15-gihyo", + "/blog/2023-05-15-gihyo.html" + ], + [ + "/blog/2023-05-15-gihyo.md", + "/blog/2023-05-15-gihyo.html" + ], + [ + "/blog/2023-06-14-gihyo.html", + "/ja/blog/2023-06-14-gihyo/" + ], + [ + "/blog/2023-06-14-gihyo", + "/blog/2023-06-14-gihyo.html" + ], + [ + "/blog/2023-06-14-gihyo.md", + "/blog/2023-06-14-gihyo.html" + ], + [ + "/blog/2023-07-01-interview.html", + "/ja/blog/2023-07-01-interview/" + ], + [ + "/blog/2023-07-01-interview", + "/blog/2023-07-01-interview.html" + ], + [ + "/blog/2023-07-01-interview.md", + "/blog/2023-07-01-interview.html" + ], + [ + "/blog/2023-07-10-interview.html", + "/ja/blog/2023-07-10-interview/" + ], + [ + "/blog/2023-07-10-interview", + "/blog/2023-07-10-interview.html" + ], + [ + "/blog/2023-07-10-interview.md", + "/blog/2023-07-10-interview.html" + ], + [ + "/blog/2023-07-12-trademark.html", + "/ja/blog/2023-07-12-trademark/" + ], + [ + "/blog/2023-07-12-trademark", + "/blog/2023-07-12-trademark.html" + ], + [ + "/blog/2023-07-12-trademark.md", + "/blog/2023-07-12-trademark.html" + ], + [ + "/blog/2023-07-14-skeb.html", + "/ja/2023-07-14-skeb/" + ], + [ + "/blog/2023-07-14-skeb", + "/blog/2023-07-14-skeb.html" + ], + [ + "/blog/2023-07-14-skeb.md", + "/blog/2023-07-14-skeb.html" + ], + [ + "/blog/2023-07-14-xserver.html", + "/ja/blog/2023-07-14-xserver/" + ], + [ + "/blog/2023-07-14-xserver", + "/blog/2023-07-14-xserver.html" + ], + [ + "/blog/2023-07-14-xserver.md", + "/blog/2023-07-14-xserver.html" + ], + [ + "/blog/2023-07-16-media-nikkei.html", + "/ja/blog/2023-07-16-media-nikkei/" + ], + [ + "/blog/2023-07-16-media-nikkei", + "/blog/2023-07-16-media-nikkei.html" + ], + [ + "/blog/2023-07-16-media-nikkei.md", + "/blog/2023-07-16-media-nikkei.html" + ], + [ + "/blog/2023-07-18-shindanmaker.html", + "/ja/blog/2023-07-18-shindanmaker/" + ], + [ + "/blog/2023-07-18-shindanmaker", + "/blog/2023-07-18-shindanmaker.html" + ], + [ + "/blog/2023-07-18-shindanmaker.md", + "/blog/2023-07-18-shindanmaker.html" + ], + [ + "/blog/2023-07-19-gihyo.html", + "/ja/blog/2023-07-19-gihyo/" + ], + [ + "/blog/2023-07-19-gihyo", + "/blog/2023-07-19-gihyo.html" + ], + [ + "/blog/2023-07-19-gihyo.md", + "/blog/2023-07-19-gihyo.html" + ], + [ + "/blog/2023-08-08-misskeyhq.html", + "/ja/blog/2023-08-08-misskeyhq/" + ], + [ + "/blog/2023-08-08-misskeyhq", + "/blog/2023-08-08-misskeyhq.html" + ], + [ + "/blog/2023-08-08-misskeyhq.md", + "/blog/2023-08-08-misskeyhq.html" + ], + [ + "/blog/2023-08-30-conoha.html", + "/ja/blog/2023-08-30-conoha/" + ], + [ + "/blog/2023-08-30-conoha", + "/blog/2023-08-30-conoha.html" + ], + [ + "/blog/2023-08-30-conoha.md", + "/blog/2023-08-30-conoha.html" + ], + [ + "/blog/2023-09-04-media-nlab.html", + "/ja/blog/2023-09-04-media-nlab.html" + ], + [ + "/blog/2023-09-04-media-nlab", + "/blog/2023-09-04-media-nlab.html" + ], + [ + "/blog/2023-09-04-media-nlab.md", + "/blog/2023-09-04-media-nlab.html" + ], + [ + "/blog/2023-09-07-hatenablog.html", + "/ja/blog/2023-09-07-hatenablog.html" + ], + [ + "/blog/2023-09-07-hatenablog", + "/blog/2023-09-07-hatenablog.html" + ], + [ + "/blog/2023-09-07-hatenablog.md", + "/blog/2023-09-07-hatenablog.html" + ], + [ + "/blog/2023-09-09-interview.html", + "/ja/blog/2023-09-09-interview.html" + ], + [ + "/blog/2023-09-09-interview", + "/blog/2023-09-09-interview.html" + ], + [ + "/blog/2023-09-09-interview.md", + "/blog/2023-09-09-interview.html" + ], + [ + "/blog/2023-09-11-gihyo.html", + "/ja/blog/2023-09-11-gihyo.html" + ], + [ + "/blog/2023-09-11-gihyo", + "/blog/2023-09-11-gihyo.html" + ], + [ + "/blog/2023-09-11-gihyo.md", + "/blog/2023-09-11-gihyo.html" + ], + [ + "/blog/2023-09-12-sakuravps.html", + "/ja/blog/2023-09-12-sakuravps.html" + ], + [ + "/blog/2023-09-12-sakuravps", + "/blog/2023-09-12-sakuravps.html" + ], + [ + "/blog/2023-09-12-sakuravps.md", + "/blog/2023-09-12-sakuravps.html" + ], + [ + "/blog/2023-09-24-release.html", + "/ja/blog/2023-09-24-release.html" + ], + [ + "/blog/2023-09-24-release", + "/blog/2023-09-24-release.html" + ], + [ + "/blog/2023-09-24-release.md", + "/blog/2023-09-24-release.html" + ], + [ + "/blog/2023-10-10-release.html", + "/ja/blog/2023-10-10-release.html" + ], + [ + "/blog/2023-10-10-release", + "/blog/2023-10-10-release.html" + ], + [ + "/blog/2023-10-10-release.md", + "/blog/2023-10-10-release.html" + ], + [ + "/blog/2023-10-24-gihyo.html", + "/ja/blog/2023-10-24-gihyo.html" + ], + [ + "/blog/2023-10-24-gihyo", + "/blog/2023-10-24-gihyo.html" + ], + [ + "/blog/2023-10-24-gihyo.md", + "/blog/2023-10-24-gihyo.html" + ], + [ + "/blog/2023-10-27-xserver.html", + "/ja/blog/2023-10-27-xserver.html" + ], + [ + "/blog/2023-10-27-xserver", + "/blog/2023-10-27-xserver.html" + ], + [ + "/blog/2023-10-27-xserver.md", + "/blog/2023-10-27-xserver.html" + ], + [ + "/blog/2023-11-05-mac2023.html", + "/ja/blog/2023-11-05-mac2023.html" + ], + [ + "/blog/2023-11-05-mac2023", + "/blog/2023-11-05-mac2023.html" + ], + [ + "/blog/2023-11-05-mac2023.md", + "/blog/2023-11-05-mac2023.html" + ], + [ + "/blog/2023-11-05-release.html", + "/ja/blog/2023-11-05-release.html" + ], + [ + "/blog/2023-11-05-release", + "/blog/2023-11-05-release.html" + ], + [ + "/blog/2023-11-05-release.md", + "/blog/2023-11-05-release.html" + ], + [ + "/blog/2023-11-14-gihyo.html", + "/ja/blog/2023-11-14-gihyo.html" + ], + [ + "/blog/2023-11-14-gihyo", + "/blog/2023-11-14-gihyo.html" + ], + [ + "/blog/2023-11-14-gihyo.md", + "/blog/2023-11-14-gihyo.html" + ], + [ + "/blog/2023-11-17-release.html", + "/ja/blog/2023-11-17-release.html" + ], + [ + "/blog/2023-11-17-release", + "/blog/2023-11-17-release.html" + ], + [ + "/blog/2023-11-17-release.md", + "/blog/2023-11-17-release.html" + ], + [ + "/blog/2023-12-01-2023recap.html", + "/ja/blog/2023-12-01-2023recap.html" + ], + [ + "/blog/2023-12-01-2023recap", + "/blog/2023-12-01-2023recap.html" + ], + [ + "/blog/2023-12-01-2023recap.md", + "/blog/2023-12-01-2023recap.html" + ], + [ + "/blog/index.html", + "/blog/" + ], + [ + "/blog/index.md", + "/blog/" + ], + [ + "/help.html", + "/docs/for-users/" + ], + [ + "/help", + "/help.html" + ], + [ + "/help.md", + "/help.html" + ], + [ + "/home.html", + "/" + ], + [ + "/home", + "/home.html" + ], + [ + "/home.md", + "/home.html" + ], + [ + "/instances.html", + "/servers/" + ], + [ + "/instances", + "/instances.html" + ], + [ + "/instances.md", + "/instances.html" + ], + [ + "/ns.html", + "/ns/" + ], + [ + "/ns", + "/ns.html" + ], + [ + "/ns.md", + "/ns.html" + ], + [ + "/plugins.html", + "/learn-more/" + ], + [ + "/plugins", + "/plugins.html" + ], + [ + "/plugins.md", + "/plugins.html" + ], + [ + "/index.html", + "/" + ], +]; \ No newline at end of file diff --git a/content/ja/.docs-legacy/advanced/aiscript.md b/content/ja/docs/4.for-developers/aiscript.md similarity index 97% rename from content/ja/.docs-legacy/advanced/aiscript.md rename to content/ja/docs/4.for-developers/aiscript.md index 08f03b50..76da369a 100644 --- a/content/ja/.docs-legacy/advanced/aiscript.md +++ b/content/ja/docs/4.for-developers/aiscript.md @@ -1,8 +1,10 @@ # AiScript AiScriptは、Misskeyで使用できるスクリプト言語です。 -::: tip +:::tip + AiScript実装はMisskeyとは別リポジトリで、[オープンソースで公開されています](https://github.com/syuilo/aiscript)。 + ::: ## 使い方 diff --git a/content/ja/.docs-legacy/api/app.md b/content/ja/docs/4.for-developers/api/app.md similarity index 100% rename from content/ja/.docs-legacy/api/app.md rename to content/ja/docs/4.for-developers/api/app.md diff --git a/nuxt.config.ts b/nuxt.config.ts index fd20b415..2faa43b4 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -3,30 +3,16 @@ import yaml from '@rollup/plugin-yaml'; import svgLoader from 'vite-svg-loader'; import { readFileSync } from 'fs'; import { genApiTranslationFiles } from './scripts/gen-api-translations'; -import type { LocaleObject } from '@nuxtjs/i18n/dist/runtime/composables'; +import { getOldHubRedirects } from './scripts/get-old-hub-redirects'; import { genLocalesJson } from './scripts/gen-locales'; import { getStaticEndpoints } from './scripts/get-static-endpoints'; +import { locales } from './assets/data/locales'; import type { NuxtConfig } from 'nuxt/schema'; // 公開時のドメイン(末尾スラッシュなし) const baseUrl = 'https://misskey-hub-next.vercel.app'; -// 言語定義 -export const localesConst = [ - { files: [ 'ja-JP.json' ], code: 'ja', iso: 'ja-JP', name: '日本語' }, - { files: [ 'en-US.json' ], code: 'en', iso: 'en-US', name: 'English' }, - { files: [ 'id-ID.json' ], code: 'id', iso: 'id-ID', name: 'Bahasa Indonesia' }, - { files: [ 'ko-KR.json' ], code: 'ko', iso: 'ko-KR', name: '한국어' }, - { files: [ 'it-IT.json' ], code: 'it', iso: 'it-IT', name: 'Italiano' }, - { files: [ 'pl-PL.json' ], code: 'pl', iso: 'pl-PL', name: 'Polski' }, - { files: [ 'fr-FR.json' ], code: 'fr', iso: 'fr-FR', name: 'Français' }, - { files: [ 'zh-CN.json' ], code: 'cn', iso: 'zh-CN', name: '简体中文' }, - { files: [ 'zh-TW.json' ], code: 'tw', iso: 'zh-TW', name: '繁体中文' }, -] as const; - -export type LocaleCodes = typeof localesConst[number]['code']; - -export const locales = localesConst as unknown as LocaleObject[]; +// 言語定義は /assets/data/locales.ts に移動しました function getRouteRules(): NuxtConfig['routeRules'] { // 言語ごとに割り当てる必要のないRouteRules @@ -63,6 +49,7 @@ function getRouteRules(): NuxtConfig['routeRules'] { return { ...staticRules, ..._localeBasedRules, + ...getOldHubRedirects(), }; } diff --git a/scripts/get-old-hub-redirects.ts b/scripts/get-old-hub-redirects.ts new file mode 100644 index 00000000..5e1b4f98 --- /dev/null +++ b/scripts/get-old-hub-redirects.ts @@ -0,0 +1,44 @@ +import { redirects } from './../assets/data/old-hub-redirects'; +import { localesConst } from './../assets/data/locales'; +import type { LocaleCodes } from './../assets/data/locales'; +import type { NuxtConfig } from 'nuxt/schema'; +import { joinURL } from 'ufo'; + +export function getOldHubRedirects(): NuxtConfig['routeRules'] { + + // 旧Hub時代の各言語のプレフィックス + const hubLocales: Record = { + ja: '/', + en: '/en', + id: '/id', + ko: '/ko', + it: '/it', + pl: '/pl', + fr: '/fr', + cn: '/zh-CN', + tw: '/zh-TW', + }; + + const out: NuxtConfig['routeRules'] = {}; + + localesConst.forEach((locale) => { + redirects.forEach((route) => { + if (route[0].startsWith('/ns')) return; + + let destination = route[1]; + + if (route[0].endsWith('.html') && !new RegExp(`^/(${localesConst.map((e) => e.code).join('|')})/`, 'g').test(destination)) { + destination = joinURL(`/${locale.code}`, destination); + } + + out[joinURL(hubLocales[locale.code], route[0])] = { + redirect: { + to: destination, + statusCode: 301, + }, + }; + }); + }); + + return out; +} \ No newline at end of file