请选择 进入手机版 | 继续访问电脑版
搜索
热搜: 活动 交友 discuz
查看: 9325|回复: 139

[wiki知识库] docsify部署-把markdown文档变成知识库网站

[复制链接]

43

主题

44

帖子

1160

积分

超级版主

Rank: 8Rank: 8

积分
1160
发表于 2023-12-9 20:41:42 | 显示全部楼层 |阅读模式
本帖最后由 Maybe 于 2023-12-9 20:43 编辑

一、docsify入门
1、简介
docsify 可以快速帮你生成文档网站。不同于 GitBook、Hexo 的地方是它不会生成静态的 .html 文件,所有转换工作都是在运行时。如果你想要开始使用它,只需要创建一个 index.html 就可以开始编写文档并直接部署。

官网地址:https://docsify.js.org/#/zh-cn/

2、特性
无需构建,写完文档直接发布
容易使用并且轻量 (压缩后 ~21kB)
智能的全文搜索
提供多套主题
丰富的 API
支持 Emoji
兼容 IE11
支持服务端渲染

二、快速开始
1、安装node环境
安装docsify-cli之前,我们需要安装npm包管理器,而安装了node.js就会自动安装npm。
(1)安装node
官网下载安装程序,双击下载的exe安装,下一步下一步直到完成。
官网地址:https://nodejs.org/en/

(2)验证安装
输入node -v,npm -v输出版本就是安装成功了

#验证node
  1. node -v
复制代码
#验证npm
  1. npm -v
复制代码

2、安装docsify-cli工具
推荐全局安装 docsify-cli 工具,可以方便地创建及在本地预览生成的文档。
#用npm安装全局工具
  1. npm i docsify-cli -g
复制代码

3、初始化项目
如果想在项目的 . 当前目录里写文档,直接通过 init 初始化项目
  1. docsify init .
复制代码
初始化成功后,可以看到 . 目录下创建的几个文件

index.html 入口文件
README.md 会做为主页内容渲染
.nojekyll 用于阻止 GitHub Pages 忽略掉下划线开头的文件


如果不喜欢 npm 或者觉得安装工具太麻烦,我们可以直接手动创建一个 index.html 文件
  1. <!DOCTYPE html>

  2. <html>

  3. <head>

  4.   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  5.   <meta name="viewport" content="width=device-width,initial-scale=1">

  6.   <meta charset="UTF-8">

  7.   <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css">

  8. </head>

  9. <body>

  10.   <div id="app"></div>

  11.   <script>

  12.     window.$docsify = {

  13.       //...

  14.     }

  15.   </script>

  16.   <script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>

  17. </body>

  18. </html>
复制代码

4、本地预览
通过运行 docsify serve . 启动一个本地服务器,这里的点就是当前目录的意思,可以方便地实时预览效果。默认访问地址 http://localhost:3000 。也可以用-p指定端口。
  1. docsify serve -p 80 .
复制代码


5、Loading 提示
初始化时会显示 Loading... 内容,你可以自定义提示信息。直接修改index.html文件。
  1. <div id="app">加载中</div>
复制代码
如果更改了 el 的配置,需要将该元素加上 data-app 属性。
  1. <!-- index.html -->

  2.   <div data-app id="main">加载中</div>



  3.   <script>

  4.     window.$docsify = {

  5.       el: '#main'

  6.     }

  7.   </script>
复制代码



回复

使用道具 举报

匿名  发表于 2024-1-10 14:54:01
回复

使用道具

0

主题

198

帖子

1216

积分

禁止发言

积分
1216
发表于 2024-1-10 18:28:11 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

匿名  发表于 2024-1-10 18:36:31

cstamgeb

回复

使用道具

匿名  发表于 2024-1-11 10:18:30
回复

使用道具

匿名  发表于 2024-1-12 08:42:42

uxnthdab

回复

使用道具

匿名  发表于 2024-1-12 11:19:49
回复

使用道具

匿名  发表于 2024-1-13 04:32:24

Before superseded enquiry nets, shock.

IvyHot ??? 2024-1-10 18:28
**** ???????? ?????? ****

Emboli xkg.esvu.bbs.itqu.net.ile.ti revalidation, on line cialis soft flavored tadagra price at walmart buy viagra online generic vardenafil tablets singapore tentex-forte zoloft online uk cialis best price usa tadalafil phenergan coupon viagra viagra best price mail order tadalafil lasix no prescription lowest price for testosterone gel prednisone online prednisone [/URL] [URL=https://comicshopservices.com/malegra-pro/]malegra pro cialis-black from usa suppliers non prescription promethazine bentyl 20mg cost walmart generic retin a gel 0,1 in canada retin-a-gel-0,1 price per pill brahmi brahmi.com lowest price canadian panmycin lasix canada lowest price for lasix buy levitra [/URL] [URL=https://oliveogrill.com/generic-levitra-20mg/] ticlid retin a cheap female cialis online coversyl.com lowest price where can i buy ed-sample-pack-1 online cheap ed sample pack prices [/URL] [URL=https://happytrailsforever.com/pill/zithromax/]buying zithromax cialis lasix dapoxetine no prescription generic dapoxetine 60 mg buy tadalista online prednisone priligy.com lowest price phenamax priligy bexovid price buy cheap albendazole generic albendazole from india zyvox womenra primaquine price walmart cheap cymbalta pills lowest price on generic obsenil generic amoxicillin online on line priligy generic metaglip lowest price order hydroxychloroquine plates <a href="https://rrhail.org/cialis-soft-flavored/">on line cialis soft flavored</a> <a href="https://adailymiscellany.com/tadagra/">tadagra uk</a> <a href="https://cafeorestaurant.com/viagra/">viagra without an rx</a> <a href="https://shilpaotc.com/vardenafil-generic-pills/">no prscription vardenafil</a> <a href="https://adailymiscellany.com/tentex-forte/">tentex forte online canada</a> <a href="https://alliedentinc.com/item/zoloft/">generic zoloft canada</a> <a href="https://ankurdrugs.com/cialis-cost/">cialis</a> <a href="https://tonysflowerstucson.com/product/tadalafil/">tadalafil in uk</a> <a href="https://downtowndrugofhillsboro.com/drug/phenergan/">phenergan on line</a> <a href="https://sjsbrookfield.org/product/viagra-best-price/">viagra without a prescription</a> <a href="https://marcagloballlc.com/lowest-price-on-generic-tadalafil/">tadalafil information</a> <a href="https://columbiainnastoria.com/product/lasix/">gout and lasix use</a> <a href="https://petermillerfineart.com/drugs/testosterone-gel/">testosterone gel</a> <a href="https://alliedentinc.com/item/cost-of-prednisone-tablets/">prednisone online</a> <a href="https://charlotteelliottinc.com/item/hydroxychloroquine-online-no-script/"></a> <a href="https://comicshopservices.com/malegra-pro/">malegra pro information</a> <a href="https://petralovecoach.com/cialis-black/">farmacie cialis-black</a> <a href="https://marcagloballlc.com/item/promethazine/">promethazine</a> <a href="https://primerafootandankle.com/item/bentyl/">buy bentyl uk</a> <a href="https://adailymiscellany.com/retin-a-gel-0-1/">retin a gel 0,1 pills</a> <a href="https://downtowndrugofhillsboro.com/brahmi/">brahmi without prescription</a> <a href="https://midsouthprc.org/item/panmycin/">panmycin prices</a> <a href="https://beauviva.com/lasix/">lasix uk</a> cheap lasix online <a href="https://oliveogrill.com/price-of-levitra-20-mg/">purchase levitra online</a> generic levitra <a href="https://bayridersgroup.com/tadalafil-generic/"></a> <a href="https://oliveogrill.com/generic-levitra-20mg/"></a> <a href="https://carolinahealthclub.com/ticlid/">ticlid online</a> <a href="https://eatliveandlove.com/canadian-retin-a/">canadian retin a</a> <a href="https://csicls.org/item/female-cialis/">female cialis</a> <a href="https://carolinahealthclub.com/coversyl/">coversyl in usa</a> <a href="https://rrhail.org/ed-sample-pack-1/">generic ed sample pack 1 canada</a> <a href="https://eatliveandlove.com/product/ed-sample-pack/">lowest price ed sample pack</a> <a href="https://marcagloballlc.com/item/nizagara/"></a> <a href="https://happytrailsforever.com/pill/zithromax/">zithromax.com lowest price</a> <a href="https://mplseye.com/generic-cialis-at-walmart/">cialis uk</a> <a href="https://ankurdrugs.com/item/lasix/">lasix without dr prescription usa</a> <a href="https://youngdental.net/dapoxetine-no-prescription/">dapoxetine</a> <a href="https://yourdirectpt.com/item/tadalista/">tadalista</a> <a href="https://center4family.com/buy-prednisone/">buy prednisone</a> <a href="https://cafeorestaurant.com/product/priligy/">generic priligy at walmart</a> priligy price at walmart <a href="https://fountainheadapartmentsma.com/product/phenamax/">ordonnance phenamax</a> <a href="https://inthefieldblog.com/priligy/">cheap priligy online</a> <a href="https://frankfortamerican.com/product/bexovid/">online bexovid sales canada</a> <a href="https://autopawnohio.com/albendazole/">generic albendazole in canada</a> <a href="https://yourdirectpt.com/pill/zyvox/">zyvox best price</a> <a href="https://comicshopservices.com/drug/womenra/">lowest price for womenra 100mg</a> online store womenra <a href="https://csicls.org/item/primaquine/">primaquine</a> <a href="https://plansavetravel.com/cymbalta/">cymbalta without an rx</a> <a href="https://mychik.com/drug/obsenil/">obsenil canadian pharmacy</a> <a href="https://petralovecoach.com/amoxicillin/">generic amoxicillin tablets</a> <a href="https://comicshopservices.com/priligy/">on line priligy</a> <a href="https://adailymiscellany.com/metaglip/">metaglip 250mg sales</a> <a href="https://mplseye.com/product/hydroxychloroquine/">hydroxychloroquine</a> mattress, guardian, https://rrhail.org/cialis-soft-flavored/ order cialis soft flavored online https://adailymiscellany.com/tadagra/ tadagra to buy https://cafeorestaurant.com/viagra/ best price viagra https://shilpaotc.com/vardenafil-generic-pills/ purchase vardenafil cpx24 ads vardenafil https://adailymiscellany.com/tentex-forte/ tentex forte from canada acheter tentex-forte en suisse https://alliedentinc.com/item/zoloft/ price of zoloft https://ankurdrugs.com/cialis-cost/ cialis cost https://tonysflowerstucson.com/product/tadalafil/ tadalafil https://downtowndrugofhillsboro.com/drug/phenergan/ phenergan paypal us https://sjsbrookfield.org/product/viagra-best-price/ viagra best price https://marcagloballlc.com/lowest-price-on-generic-tadalafil/ canadian tadalafil https://columbiainnastoria.com/product/lasix/ lasix on line https://petermillerfineart.com/drugs/testosterone-gel/ testosterone gel generic pills testosterone gel https://alliedentinc.com/item/cost-of-prednisone-tablets/ prednisone.com https://charlotteelliottinc.com/item/hydroxychloroquine-online-no-script/  https://comicshopservices.com/malegra-pro/ lowest price for malegra pro https://petralovecoach.com/cialis-black/ cialis black https://marcagloballlc.com/item/promethazine/ buy promethazine online canada https://primerafootandankle.com/item/bentyl/ generic bentyl lowest price https://adailymiscellany.com/retin-a-gel-0-1/ retin a gel 0,1 pills https://downtowndrugofhillsboro.com/brahmi/ brahmi.com lowest price https://midsouthprc.org/item/panmycin/ panmycin https://beauviva.com/lasix/ lasix https://oliveogrill.com/price-of-levitra-20-mg/ generic levitra levitra generic https://bayridersgroup.com/tadalafil-generic/  https://oliveogrill.com/generic-levitra-20mg/  https://carolinahealthclub.com/ticlid/ cost of ticlid tablets https://eatliveandlove.com/canadian-retin-a/ retin-a online answers https://csicls.org/item/female-cialis/ cheapest female cialis dosage price https://carolinahealthclub.com/coversyl/ coversyl without ed https://rrhail.org/ed-sample-pack-1/ ed sample pack 1 price at walmart https://eatliveandlove.com/product/ed-sample-pack/ ed-sample-pack stock price https://marcagloballlc.com/item/nizagara/  https://happytrailsforever.com/pill/zithromax/ zithromax https://mplseye.com/generic-cialis-at-walmart/ suppliers of cialis in uk cialis https://ankurdrugs.com/item/lasix/ lasix https://youngdental.net/dapoxetine-no-prescription/ dapoxetine without a doctor https://yourdirectpt.com/item/tadalista/ tadalista without dr prescription usa https://center4family.com/buy-prednisone/ purchase prednisone https://cafeorestaurant.com/product/priligy/ priligy https://fountainheadapartmentsma.com/product/phenamax/ phenamax buy https://inthefieldblog.com/priligy/ mail order priligy https://frankfortamerican.com/product/bexovid/ bexovid https://autopawnohio.com/albendazole/ albendazole compare cost https://yourdirectpt.com/pill/zyvox/ zyvox https://comicshopservices.com/drug/womenra/ lowest price for womenra 100mg https://csicls.org/item/primaquine/ discount site primaquine https://plansavetravel.com/cymbalta/ online cymbalta no prescription https://mychik.com/drug/obsenil/ order obsenil overnight https://petralovecoach.com/amoxicillin/ best price amoxicillin https://comicshopservices.com/priligy/ priligy no prescription priligy https://adailymiscellany.com/metaglip/ metaglip generic https://mplseye.com/product/hydroxychloroquine/ pharmacie canadienne hydroxychloroquine fingers, eugenic crust minimized.
回复

使用道具

匿名  发表于 2024-1-13 09:58:10

vebnbgjo

回复

使用道具

匿名  发表于 2024-1-13 12:25:56

slsalqsul

IvyHot ??? 2024-1-10 18:28
**** ???????? ?????? ****

generic trazodone
回复

使用道具

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

抖音账号
关注抖音
加入粉丝群,抽取论坛金币


Archiver|手机版|小黑屋|IT趣-GEEK社区

GMT+8, 2024-5-22 16:20 , Processed in 0.112075 second(s), 21 queries .

Powered by Discuz! X3.4. 技术支持 by 巅峰设计

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表