This method is only available with Docker and Node+20. Make sure you have docker, docker compose and node installed. If youβre not in a hurry, you can read how everything works, starting with the Getting Started section, little padawan. π
Follow these quick steps to get Docs Hub up and running in your environment in just 3 minutes, in a blank directory.
Startup DocsHub
Use the docshub
CLI to initialize your working directory or workspace.
npx docshub init
After initializing the workspace, run the following command to start the DocsHub in interactive mode.
npx docshub interactive
The application should be available at http://localhost:4321.
Create new document
Use the CLI again to create a new documentation entry. Fill in all the fields, and the document will be saved in the /docs
folder.
npx docshub create
Edit the document as you like, and youβre all set! β¨
Prepare for production
Once youβre done editing your document, youβre ready to prepare DocsHub for production. Use the CLI again to build your site for production:
npx docshub standard
Remember that, the interactive mode starts by default on port 4321. This aligns with the established standard mode and ensures that the port used by Docshub is not in use before executing the command.
The application should be available at http://localhost:4321.
Keep in mind that this command provides an optimized site, so the application may not be available immediately after the command finishes. Docker is performing the build in the background, so it will take a few moments.
And thatβs it! Now that you have the docker images downloaded locally, repeating the process will take you less than 3 minutes.
Happy coding! π