TopDocs 是一个开源的基于graphql、nuxtjs、mongodb、keystonejs的实时在线文档编辑系统,可用作各种在线文档编辑和展示,支持markdown语法。
其拥有动态实时编辑系统,移动优先,服务端渲染,针对SEO优化。适合小到大型项目的在线文档官网。
机器配置:1C-1G-1M
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
2.安装Mongodb
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl start mongod
mongo
use admin
db.createUser( { user: "admin", pwd: "<Enter a secure password>", roles: [ { role: "root", db: "admin" } ] } )
use topdocs
db.createUser( { user: "topdocs", pwd: "topdocs", roles: [ { role: "readWrite", db: "topdocs" } ] } )
exit
vim /etc/mongod.conf
<!-- append lines -->
security:
authorization: enabled
<!-- 退出编辑 -->
sudo systemctl restart mongod
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
git clone https://gitee.com/quazero/topdocs
cd topdocs
yarn
const config = {
endpoint: 'http://127.0.0.1:3000/admin/api',
}
find endpoint
edit it
endpoint: 'https://docs.moejj.com/admin/api'
yarn build
nohup yarn start &
exit
开启之后,后台地址/admin ,密码为adminadmin,自己进后台修改。 设置中index中是首页的展示内容,需要注意的是:
-logo-/logo.png-logo-
-title-跨世代文档编辑系统-title-
-subtitle-实时动态markdown文档编辑系统,基于graqhql、mongodb、keystonejs、nuxtjs开发的移动优先的服务端渲染文档系统。-subtitle-
-button-查看文档$https://gitee.com/quazero/topdocs-button-
===header===
header下面就是完全的markdown语法的编写区域,编辑完成之后,首页可查看变化。
-logo-之间的是LOGO图片,可链接也可路径。
-title-之间的是首页展示大标题。
-subtitle-之间的是首页展示的项目介绍。
-button-是首页展示按钮需要的内容。其中<按钮名>$<链接>,链接可链接也可路径,按需更改。
===header===下面的就是正常的markdown语句,自己根据需要编写。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有