The site configuration and documentation powering Casnode's website: https://casnode.org
- Git
- Node: install version 6.2.2 or greater. Node v14 would be ideal.
- Yarn: See Yarn Installation
git clone https://github.com/casnode/casnode-website
to download source code.cd casnode-website
to go into the project root.yarn install
to install the website's npm dependencies (ornpm install
, if not using Yarn).
yarn start
to start the development server (powered by Docusaurus) (ornpm start
, if not using Yarn).- open
http://localhost:3000/
to open the site in your favorite browser.
Whenever a new commit lands in master
, the change will be automatically published to: https://casnode.org.
If you're here because you would like to contribute an edit or addition to the docs, you'll probably want to take a look at the docs/
directory.
To edit the internals of how the site is built, you may want to get familiarized with how the site is built. The Casnode website is a static site generated using Docusaurus. This directory is the frame of casnode website. Visit the Docusaurus website to learn more about all the available configuration options.
The following is a high-level overview of relevant files and folders.
casnode-website/
├── docs/
│ ├── intro.md
│ └── ...
├── blog/
│ └── ...
├── src/
| ├── pages/
| │ ├── ...
| │ ├── index.js
| │ └── ...
| ├── css/
| | └── custom.css
| └── components/
| ├── HomepageFeatures.js
| └── ...
├── static/
│ └── img/
├── packages.json
├── sidebars.js
├── docusaurus.config.js
├── babel.config.js
└── versions.json
└── ...
As mentioned above, the docs/
folder contains the source files for all of the docs in the Casnode website. In most cases, you will want to edit the files within this directory. If you're adding a new doc or you need to alter the order the docs appear in the sidebar, take a look at the sidebars.js
. The sidebars file contains a list of document ids that should match those defined in the header metadata (aka frontmatter) of the docs markdown files.
The main config file for the website can be found at docusaurus.config.js
. This file tells Docusaurus how to build the website. Edits to this file are rarely necessary.
The src/pages/
subdirectory contains the Casnode components that make up the non-documentation pages of the site, such as the homepage.
git checkout master
from any folder in your localcasdoor-website
repository.git pull origin master
to ensure you have the latest main code.git checkout -b the-name-of-my-branch
(replacingthe-name-of-my-branch
with a suitable name) to create a branch.
- Follow the Running locally instructions.
- Save the files and check in the browser. Some changes may require a server restart.
- Changes to
/docs
will only be visible in the latest version of the documentation (master).
- If possible, test any visual changes in all latest versions of common browsers, on both desktop and mobile.
- Make sure the commits could deploy the Casnode website.
- Run
yarn prettier
to ensure your changes are consistent with other files in the repo git add -A && git commit -m "My message"
(replacingMy message
with a commit message, such asFixed header logo on Android
) to stage and commit your changesgit push my-fork-name the-name-of-my-branch
- Go to the casnode-website repo and you should see recently pushed branches.
- Follow GitHub's instructions.
- If possible, include screenshots of visual changes.
Crowdin and Docusaurus i18n is used for Casnode website's translation. You can contribute to the translation of your proficient languages on that.
Please contact the Casnode team for manager access on Crowdin.
Casnode is Apache licensed.