mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
fix: update the doc application to the latest API
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good
This commit is contained in:
parent
6da933da67
commit
a05507123c
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
||||
BUILDDIR?=./build
|
||||
PROJS?=grs blog talk get info
|
||||
PROJS?=grs blog talk get info doc
|
||||
# info blog doc talk get
|
||||
copyfiles = layout.ls index.lua mimes.json
|
||||
main: copy
|
||||
|
@ -2,12 +2,11 @@ require(CONTROLLER_ROOT..".doccontroller")
|
||||
DocController:subclass("AntosController", {
|
||||
path_map = {
|
||||
vfs_path = "book://",
|
||||
local_path = "/home/mrsang/doc/antos",
|
||||
api_path = "/opt/www/htdocs/doc/antos"
|
||||
local_path = DOC_DIR.."/antos",
|
||||
},
|
||||
name = "antos",
|
||||
elinks = {
|
||||
{ name = "API", url = "https://doc.iohub.dev/antos/api/index.html" },
|
||||
{ name = "API", url = "https://ci.iohub.dev/public/antos-release/doc/1.2.x/" },
|
||||
{ name = "Code", url = "https://github.com/lxsang/antos" }
|
||||
}
|
||||
})
|
||||
|
@ -8,7 +8,7 @@ function IndexController:index(...)
|
||||
local md = require("md")
|
||||
local callback = function(s) content = content .. s end
|
||||
md.to_html(file:read("*a"), callback)
|
||||
file.close()
|
||||
file:close()
|
||||
self.template:set("data", content)
|
||||
end
|
||||
return true
|
||||
|
@ -2,7 +2,7 @@ require(CONTROLLER_ROOT..".doccontroller")
|
||||
DocController:subclass("JarvisController", {
|
||||
path_map = {
|
||||
vfs_path = "book://",
|
||||
local_path = "/home/mrsang/doc/jarvis",
|
||||
local_path = DOC_DIR.."/jarvis",
|
||||
},
|
||||
name = "jarvis"
|
||||
})
|
||||
|
@ -167,7 +167,7 @@ function DocController:index(...)
|
||||
local md = require("md")
|
||||
local callback = function(s) content = content .. s end
|
||||
md.to_html(pre_process_md(file:read("*a"), self), callback)
|
||||
file.close()
|
||||
file:close()
|
||||
content, has_3d = post_process_md(content, self)
|
||||
-- replace some display plugins
|
||||
|
||||
|
@ -14,15 +14,17 @@ if HEADER.Host then
|
||||
else
|
||||
HTTP_ROOT = "https://doc.iohub.dev"
|
||||
end
|
||||
-- TODO remove me
|
||||
HTTP_ROOT = HTTP_ROOT.."/next/doc"
|
||||
|
||||
-- class path: path.to.class
|
||||
CONTROLLER_ROOT = ."doc.controllers"
|
||||
CONTROLLER_ROOT = "doc.controllers"
|
||||
MODEL_ROOT = "doc.models"
|
||||
-- file path: path/to/file
|
||||
VIEW_ROOT = WWW_ROOT..DIR_SEP.."views"
|
||||
|
||||
-- TODO change me
|
||||
DOC_DIR = "/home/mrsang/doc"
|
||||
DOC_DIR = "/home/dany/doc"
|
||||
DOC_COVER = DOC_DIR.."/library.md"
|
||||
|
||||
package.path = package.path..";"..__ROOT__.."/os/libs/?.lua"
|
||||
|
@ -25,7 +25,7 @@ end
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="<?=HTTP_ROOT?>/rst/katex/katex.min.css" />
|
||||
<script src="<?=HTTP_ROOT?>/rst/gscripts/jquery-3.4.1.min.js"> </script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"> </script>
|
||||
<?lua
|
||||
if has_3d then
|
||||
?>
|
||||
@ -67,14 +67,8 @@ end
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="<?=HTTP_ROOT?>/assets/github-markdown.css" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="<?=HTTP_ROOT?>/rst/font-awesome.css" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="<?=HTTP_ROOT?>/rst/ubuntu-regular.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin" />
|
||||
<title>
|
||||
<?lua
|
||||
if tocdata then
|
||||
|
Loading…
Reference in New Issue
Block a user