diff --git a/src/client/pages/doc.vue b/src/client/pages/doc.vue index 402872f0ec..2a4b5b626b 100644 --- a/src/client/pages/doc.vue +++ b/src/client/pages/doc.vue @@ -60,7 +60,7 @@ export default defineComponent({ methods: { fetchDoc() { - fetch(`${url}/assets/docs/${this.doc}.${lang}.md`).then(res => res.text()).then(md => { + fetch(`${url}/assets/docs/${lang}/${this.doc}.md`).then(res => res.text()).then(md => { this.parse(md); }); }, diff --git a/src/docs/aiscript.ja-JP.md b/src/docs/ja-JP/aiscript.md similarity index 100% rename from src/docs/aiscript.ja-JP.md rename to src/docs/ja-JP/aiscript.md diff --git a/src/docs/api.ja-JP.md b/src/docs/ja-JP/api.md similarity index 100% rename from src/docs/api.ja-JP.md rename to src/docs/ja-JP/api.md diff --git a/src/docs/create-plugin.ja-JP.md b/src/docs/ja-JP/create-plugin.md similarity index 100% rename from src/docs/create-plugin.ja-JP.md rename to src/docs/ja-JP/create-plugin.md diff --git a/src/docs/custom-emoji.ja-JP.md b/src/docs/ja-JP/custom-emoji.md similarity index 100% rename from src/docs/custom-emoji.ja-JP.md rename to src/docs/ja-JP/custom-emoji.md diff --git a/src/docs/follow.ja-JP.md b/src/docs/ja-JP/follow.md similarity index 100% rename from src/docs/follow.ja-JP.md rename to src/docs/ja-JP/follow.md diff --git a/src/docs/keyboard-shortcut.ja-JP.md b/src/docs/ja-JP/keyboard-shortcut.md similarity index 100% rename from src/docs/keyboard-shortcut.ja-JP.md rename to src/docs/ja-JP/keyboard-shortcut.md diff --git a/src/docs/mute.ja-JP.md b/src/docs/ja-JP/mute.md similarity index 100% rename from src/docs/mute.ja-JP.md rename to src/docs/ja-JP/mute.md diff --git a/src/docs/pages.ja-JP.md b/src/docs/ja-JP/pages.md similarity index 100% rename from src/docs/pages.ja-JP.md rename to src/docs/ja-JP/pages.md diff --git a/src/docs/reaction.ja-JP.md b/src/docs/ja-JP/reaction.md similarity index 100% rename from src/docs/reaction.ja-JP.md rename to src/docs/ja-JP/reaction.md diff --git a/src/docs/reversi-bot.ja-JP.md b/src/docs/ja-JP/reversi-bot.md similarity index 100% rename from src/docs/reversi-bot.ja-JP.md rename to src/docs/ja-JP/reversi-bot.md diff --git a/src/docs/stream.ja-JP.md b/src/docs/ja-JP/stream.md similarity index 100% rename from src/docs/stream.ja-JP.md rename to src/docs/ja-JP/stream.md diff --git a/src/docs/theme.ja-JP.md b/src/docs/ja-JP/theme.md similarity index 100% rename from src/docs/theme.ja-JP.md rename to src/docs/ja-JP/theme.md diff --git a/src/docs/timelines.ja-JP.md b/src/docs/ja-JP/timelines.md similarity index 100% rename from src/docs/timelines.ja-JP.md rename to src/docs/ja-JP/timelines.md diff --git a/src/server/web/index.ts b/src/server/web/index.ts index 468ece5359..57ce9b38a4 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -110,7 +110,7 @@ router.get('/docs.json', async ctx => { ctx.body = []; return; } - const paths = glob.sync(__dirname + `/../../../src/docs/*.${lang}.md`); + const paths = glob.sync(__dirname + `/../../../src/docs/${lang}/*.md`); const docs: { path: string; title: string; }[] = []; for (const path of paths) { const md = fs.readFileSync(path, { encoding: 'utf8' });