mirror of
https://github.com/lxsang/antd-web-apps
synced 2025-04-17 09:16:44 +02: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
|
BUILDDIR?=./build
|
||||||
PROJS?=grs blog talk get info
|
PROJS?=grs blog talk get info doc
|
||||||
# info blog doc talk get
|
# info blog doc talk get
|
||||||
copyfiles = layout.ls index.lua mimes.json
|
copyfiles = layout.ls index.lua mimes.json
|
||||||
main: copy
|
main: copy
|
||||||
|
@ -2,12 +2,11 @@ require(CONTROLLER_ROOT..".doccontroller")
|
|||||||
DocController:subclass("AntosController", {
|
DocController:subclass("AntosController", {
|
||||||
path_map = {
|
path_map = {
|
||||||
vfs_path = "book://",
|
vfs_path = "book://",
|
||||||
local_path = "/home/mrsang/doc/antos",
|
local_path = DOC_DIR.."/antos",
|
||||||
api_path = "/opt/www/htdocs/doc/antos"
|
|
||||||
},
|
},
|
||||||
name = "antos",
|
name = "antos",
|
||||||
elinks = {
|
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" }
|
{ name = "Code", url = "https://github.com/lxsang/antos" }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -8,7 +8,7 @@ function IndexController:index(...)
|
|||||||
local md = require("md")
|
local md = require("md")
|
||||||
local callback = function(s) content = content .. s end
|
local callback = function(s) content = content .. s end
|
||||||
md.to_html(file:read("*a"), callback)
|
md.to_html(file:read("*a"), callback)
|
||||||
file.close()
|
file:close()
|
||||||
self.template:set("data", content)
|
self.template:set("data", content)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
@ -2,7 +2,7 @@ require(CONTROLLER_ROOT..".doccontroller")
|
|||||||
DocController:subclass("JarvisController", {
|
DocController:subclass("JarvisController", {
|
||||||
path_map = {
|
path_map = {
|
||||||
vfs_path = "book://",
|
vfs_path = "book://",
|
||||||
local_path = "/home/mrsang/doc/jarvis",
|
local_path = DOC_DIR.."/jarvis",
|
||||||
},
|
},
|
||||||
name = "jarvis"
|
name = "jarvis"
|
||||||
})
|
})
|
||||||
|
@ -167,7 +167,7 @@ function DocController:index(...)
|
|||||||
local md = require("md")
|
local md = require("md")
|
||||||
local callback = function(s) content = content .. s end
|
local callback = function(s) content = content .. s end
|
||||||
md.to_html(pre_process_md(file:read("*a"), self), callback)
|
md.to_html(pre_process_md(file:read("*a"), self), callback)
|
||||||
file.close()
|
file:close()
|
||||||
content, has_3d = post_process_md(content, self)
|
content, has_3d = post_process_md(content, self)
|
||||||
-- replace some display plugins
|
-- replace some display plugins
|
||||||
|
|
||||||
|
@ -14,15 +14,17 @@ if HEADER.Host then
|
|||||||
else
|
else
|
||||||
HTTP_ROOT = "https://doc.iohub.dev"
|
HTTP_ROOT = "https://doc.iohub.dev"
|
||||||
end
|
end
|
||||||
|
-- TODO remove me
|
||||||
|
HTTP_ROOT = HTTP_ROOT.."/next/doc"
|
||||||
|
|
||||||
-- class path: path.to.class
|
-- class path: path.to.class
|
||||||
CONTROLLER_ROOT = ."doc.controllers"
|
CONTROLLER_ROOT = "doc.controllers"
|
||||||
MODEL_ROOT = "doc.models"
|
MODEL_ROOT = "doc.models"
|
||||||
-- file path: path/to/file
|
-- file path: path/to/file
|
||||||
VIEW_ROOT = WWW_ROOT..DIR_SEP.."views"
|
VIEW_ROOT = WWW_ROOT..DIR_SEP.."views"
|
||||||
|
|
||||||
-- TODO change me
|
-- TODO change me
|
||||||
DOC_DIR = "/home/mrsang/doc"
|
DOC_DIR = "/home/dany/doc"
|
||||||
DOC_COVER = DOC_DIR.."/library.md"
|
DOC_COVER = DOC_DIR.."/library.md"
|
||||||
|
|
||||||
package.path = package.path..";"..__ROOT__.."/os/libs/?.lua"
|
package.path = package.path..";"..__ROOT__.."/os/libs/?.lua"
|
||||||
|
@ -25,7 +25,7 @@ end
|
|||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="<?=HTTP_ROOT?>/rst/katex/katex.min.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
|
<?lua
|
||||||
if has_3d then
|
if has_3d then
|
||||||
?>
|
?>
|
||||||
@ -67,14 +67,8 @@ end
|
|||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="<?=HTTP_ROOT?>/assets/github-markdown.css" />
|
href="<?=HTTP_ROOT?>/assets/github-markdown.css" />
|
||||||
<link
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
|
||||||
rel="stylesheet"
|
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin" />
|
||||||
type="text/css"
|
|
||||||
href="<?=HTTP_ROOT?>/rst/font-awesome.css" />
|
|
||||||
<link
|
|
||||||
rel="stylesheet"
|
|
||||||
type="text/css"
|
|
||||||
href="<?=HTTP_ROOT?>/rst/ubuntu-regular.css" />
|
|
||||||
<title>
|
<title>
|
||||||
<?lua
|
<?lua
|
||||||
if tocdata then
|
if tocdata then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user