Search code examples
deploymentdocumentationnetlifydocumentationjs

How to deploy a documentation page


I created a library with a demo page that I deployed it using Netlify (the url is something like my-lib.netflify.app) and it is associated with "build": "parcel build demo/index.html --out-dir demo-build",. Then I add to my library a documentation page using documentationjs that using the command yarn docs:

"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"

creates this docs folder:

enter image description here

So what I want to deploy is the index.html page for example using an url like this my-lib-docs.netflify.app or whatever, it's not important. How can I do that? Which command I have to use, how have to configure Netlify and/or documentationjs?

Thanks a lot!


Solution

  • You can set up a new site on Netlify, pointing at the same git repo, and give it the build and output directory setting you list in your question, and point the output at your subdomain.