This repo hosts the code for the CDP Information Hub, and is intended to be the goto resource for the CDP Project. The site is based on the Docusaurus, framework which is an open source project developed in house at Facebook. The Information Hub, is deployed to Github Pages and is publically accessible.
The project team discussed several documentation solutions including, github wiki, wcms, github pages, before finally deciding that Docusaurus would best meet our needs. Search the GitHub discussions for details.
The workflow behind this project is intended to be simplistic and encourgage rapid development and corrections. Below is the simple feature based workflow that this repository follows.
---
title: Documentation Branching Strategy
---
%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showCommitLabel': false}} }%%
gitGraph
commit
commit
checkout main
branch feature_1
commit
commit
commit
checkout main
merge feature_1
checkout main
branch feature_2
commit
commit
checkout main
merge feature_2
checkout main
commit
commit
Download and install Node.js
Create a site (sample or cdp)
npx create-docusaurus@latest my-website classic
Clone the Github CDP Doc site
This will create a new "doc" directory in your current directory to house the contents of the repository
git clone https://github.com/cdp-ucsc/doc.git
Launch the site locally for viewing (sample or cdp)
cd my-website
npx docusaurus start
Launch the CDP site locally
cd \doc\cdp-docs
npm install [this command only needs to be run once to load dependencies]
npx docusaurus start
The vulnerability warnings encountered when running npm install
can be safely ignored.
These are false positives due to the audit differences of building an app vs generating static content with react(more info).
Note: While the site is running locally, any changes in the page source files are reflected immediately on the website
# Title 1
## Title 2
This is a markdown page
* **/src/pages** contains individual pages hosted at http://localhost:3000/mypage
* **/docs** contains markdown pages that are organized into sections, presented via the sidebar
See [Create a Document](https://tutorial.docusaurus.io/docs/tutorial-basics/create-a-document)