-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7eaeaeb
commit 98416f0
Showing
1 changed file
with
15 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 `<projects_folder>`. | ||
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 ~/<projects_folder>/playcanvas.github.io/pcui/` | ||
To view the built site, run: | ||
|
||
`cp -r ./docs/_site/ ~/<projects_folder>/playcanvas.github.io/pcui/` | ||
npm run docsite:serve | ||
|
||
`cd ~/<projects_folder>/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. |