如何部署文档页面

How to deploy a documentation page

我创建了一个带有演示页面的库,我使用 Netlify 部署了它(url 类似于我的-lib.netflify.app)并且它与 "build": "parcel build demo/index.html --out-dir demo-build", 相关联。 然后我使用命令 yarn docs:

使用 documentationjs 添加到我的库中的文档页面
"docs:html": "documentation build --config documentation.yml src/lib/**/*.ts --parse-extension ts --format html --output docs --favicon ../public/peacock-64.png",
"docs:md": "documentation build --config documentation.yml src/lib/**/*.ts --parse-extension ts --format md --output docs/docs.md",
"docs": "yarn docs:html && yarn docs:md"

创建此 docs 文件夹:

所以我想要部署的是 index.html 页面,例如使用像这样的 url my-lib-docs.netflify.app 或其他什么,这并不重要。 我怎样才能做到这一点?我必须使用哪个命令,如何配置 Netlify and/or documentationjs?

非常感谢!

您可以在 Netlify 上建立一个新站点,指向同一个 git 存储库,并为其提供您在问题中列出的构建和输出目录设置,并将输出指向您的子域。