From 46f53868c5804f6991427636a7568344ff8e3970 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 5 Aug 2021 16:04:31 +0900 Subject: [PATCH] Improve docs --- src/client/pages/doc.vue | 4 ++++ src/client/pages/docs.vue | 9 +++++++-- src/docs/ja-JP/general/glossary.md | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/client/pages/doc.vue b/src/client/pages/doc.vue index 2e315887a..00a353052 100644 --- a/src/client/pages/doc.vue +++ b/src/client/pages/doc.vue @@ -64,6 +64,10 @@ export default defineComponent({ fetchDoc() { fetch(`${url}/doc-assets/${lang}/${this.doc}.md`).then(res => res.text()).then(md => { this.parse(md); + }).catch(() => { + fetch(`${url}/doc-assets/ja-JP/${this.doc}.md`).then(res => res.text()).then(md => { + this.parse(md); + }); }); }, diff --git a/src/client/pages/docs.vue b/src/client/pages/docs.vue index e677fe0cb..a419bf5f9 100644 --- a/src/client/pages/docs.vue +++ b/src/client/pages/docs.vue @@ -69,8 +69,13 @@ export default defineComponent({ }, created() { - fetch(`${url}/docs.json?lang=${lang}`).then(res => res.json()).then(docs => { - this.docs = docs; + fetch(`${url}/docs.json?lang=ja-JP`).then(res => res.json()).then(jaDocs => { + fetch(`${url}/docs.json?lang=${lang}`).then(res => res.json()).then(docs => { + this.docs = jaDocs.map(doc => { + const exist = docs.find(d => d.path === doc.path); + return exist || doc; + }); + }); }); }, }); diff --git a/src/docs/ja-JP/general/glossary.md b/src/docs/ja-JP/general/glossary.md index 60de2123f..f3a9b9af3 100644 --- a/src/docs/ja-JP/general/glossary.md +++ b/src/docs/ja-JP/general/glossary.md @@ -9,6 +9,10 @@ Misskeyに関する用語集です。 (読み: あいすくりぷと) Misskey上で使用できるプログラミング言語です。詳細は[こちら。](../advanced/aiscript) +## API +(読み: えーぴーあい) +Misskeyのサーバーが公開している、プログラムからMisskeyを扱うためのインターフェース。詳細は[こちら。](../advanced/api) + ## Bot (読み: ぼっと) プログラムによって動作しているアカウント。