mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
upgrade katex to 0.12, wiki load
This commit is contained in:
1 parent
3b9910529e
commit
bf29661eaa
18 files changed
+189
-54
No files matched your search
@@ -10,13 +10,14 @@ class WikiHandler extends Handler {
|
||||
if (!global.Hydro.wiki[category]) throw new NotFoundError(category);
|
||||
if (!global.Hydro.wiki[category][page]) throw new NotFoundError(category, page);
|
||||
const contents = global.Hydro.wiki[category][page];
|
||||
const pages = Object.keys(global.Hydro.wiki[category]);
|
||||
const path = [
|
||||
['Hydro', 'homepage'],
|
||||
[`wiki_${category}`, null],
|
||||
[`wiki_${category}_${page}`, null],
|
||||
];
|
||||
this.response.body = {
|
||||
path, contents, page_name: `wiki_${category}_${page}`,
|
||||
path, contents, pages, page_name: `wiki_${category}_${page}`,
|
||||
};
|
||||
this.response.template = 'wiki.html';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user