问题描述
我下载了Bootstrap v5的源代码,并按广告中的npm run docs
编译了文档。我可以看到该过程会编译文档并将其保存到:
./bootstrap-5.0.0-alpha1/_gh_pages/docs/5.0/...
此目录在子目录中包含几个index.html
文件。但是,如果我打开其中一个,它们都将包含重定向到https://v5.getbootstrap.com/docs/5.0/getting-started/introduction
的位置,因此无法打开本地文件。
<Meta http-equiv="refresh" content="0; url=https://v5.getbootstrap.com/docs/5.0/getting-started/introduction/">
我想将Bootstrap文档系统用于自己的文档,有人知道我在这里缺少什么吗?
解决方法
首先下载v5.0.0-alpha1源。
cd bootstrap-5.0.0-alpha1/
npm install
然后您可以通过以下方式在本地运行文档:
npm run docs-serve
如果一切顺利,您应该会看到类似以下的内容。
Web服务器可从http:// localhost:9001 /
获得
当您从本地主机浏览该本地URL时,将提供文档。要在计算机上找到文档,它们会作为降价文件存储在/bootstrap-5.0.0-alpha1/site/content/docs/5.0
中。