diff --git a/docs/README.md b/docs/README.md index d87b01d7..5d81918c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,44 +1,31 @@ - -# PCUI docs guide +# PCUI Docs Guide The PCUI documentation website is built using a Jekyll template. The markdown pages for the site can be found and edited in the `docs/pages` directory. -The doc site also makes use of storybook to display React components and typedocs to display the API reference. If you are developing the PCUI library, you should use `npm run storybook` and `npm run typedocs` directly to generate the storybook and typedocs respectively. The following guide is for updating and publishing the documentation site. +The docs site also makes use of Storybook to display React components. If you are developing the PCUI library, you should use `npm run storybook` directly to generate the storybook. The following guide is for updating and publishing the documentation site. -### Testing docs locally +### Developing Docs Locally Ensure you have Ruby 3.x installed. Go [here](https://rubyinstaller.org/downloads/) for a Windows installer. -In the `pcui/docs` directory run: - -`bundle install` - -To install the ruby dependencies. If you are having trouble with the install, try deleting the `Gemfile.lock` file. - -Then in the main PCUI directory run: - -`npm run build:typedocs` to build the latest typedocs API reference site which will be copied into the doc site in the next step - -`npm run build:docsite:local` to build the Jekyll doc site and latest storybook - -`npm run docsite:serve` to serve the Jekyll doc site - -Visit http://localhost:3497/ +To install the Ruby dependencies, run: -### Publishing docs + cd docs + bundle install + cd .. -If you haven't cloned the [playcanvas.github.io](https://github.com/playcanvas/playcanvas.github.io) repo, install it locally to a projects folder which will now be referenced as ``. +If you are having trouble with the install, try deleting the `Gemfile.lock` file. -Then in the PCUI main directory run: +You are now able to build the site: -`npm run build:docsite:production` + npm run build:docsite:local -`rm -rf ~//playcanvas.github.io/pcui/` +To view the built site, run: -`cp -r ./docs/_site/ ~//playcanvas.github.io/pcui/` + npm run docsite:serve -`cd ~//playcanvas.github.io` +Open your browser and visit: http://localhost:3497/ -Commit changes to the [playcanvas.github.io](https://github.com/playcanvas/playcanvas.github.io) repo & create a PR +### Publishing Docs -Upon the PR merging into the master branch of the repo, http://playcanvas.github.io/pcui will be updated. +The PCUI docs site is automatically redeployed one every commit to the `main` branch.