This commit is contained in:
syuilo 2020-12-27 21:49:39 +09:00
parent 8ed6124dd2
commit ed3a6391e8
15 changed files with 2 additions and 2 deletions

View file

@ -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);
});
},

View file

@ -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' });