mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
refactor
This commit is contained in:
parent
698fbdf88b
commit
0e7778bebf
@ -60,7 +60,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
fetchDoc() {
|
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);
|
this.parse(md);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -110,7 +110,7 @@ router.get('/docs.json', async ctx => {
|
|||||||
ctx.body = [];
|
ctx.body = [];
|
||||||
return;
|
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; }[] = [];
|
const docs: { path: string; title: string; }[] = [];
|
||||||
for (const path of paths) {
|
for (const path of paths) {
|
||||||
const md = fs.readFileSync(path, { encoding: 'utf8' });
|
const md = fs.readFileSync(path, { encoding: 'utf8' });
|
||||||
|
Loading…
Reference in New Issue
Block a user