|
1 | 1 | # `chkware` website |
2 | 2 |
|
3 | | -This repository holds source code and publishable website for [**`chkware`**](https://github.com/chkware/cli#readme). Please access using https://chkware.github.io |
| 3 | +This repository holds source code and publishable website for [**`chkware`**](https://github.com/chkware/cli#readme). Please access using https://chkware.github.io. |
4 | 4 |
|
| 5 | +## Installation |
5 | 6 |
|
6 | | -### Installation [TBD] |
| 7 | +Clone the repo: |
7 | 8 |
|
| 9 | +```sh |
| 10 | +git clone https://github.com/chkware/chkware.github.io.git |
| 11 | +cd chkware.github.io |
8 | 12 | ``` |
9 | | -$ npm install |
| 13 | + |
| 14 | +Install dependencies: |
| 15 | + |
| 16 | +```sh |
| 17 | +npm install |
10 | 18 | ``` |
11 | 19 |
|
12 | | -### Local Development [TBD] |
| 20 | +## Local Development |
13 | 21 |
|
14 | 22 | ``` |
15 | 23 | $ npm start |
16 | 24 | ``` |
17 | 25 |
|
18 | 26 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. |
19 | 27 |
|
20 | | -### Build [TBD] |
| 28 | +## Build |
21 | 29 |
|
22 | 30 | ``` |
23 | 31 | $ npm run build |
24 | 32 | ``` |
25 | 33 |
|
26 | 34 | This command generates static content into the `build` directory and can be served using any static contents hosting service. |
27 | 35 |
|
28 | | -### Status |
| 36 | +## Guides |
| 37 | + |
| 38 | +Learn how to contribute to this website. |
| 39 | + |
| 40 | +### Configs |
| 41 | + |
| 42 | +All the configs can be found in `docusaurus.config.js`. |
| 43 | + |
| 44 | +### Create a doc page |
| 45 | + |
| 46 | +Create a Markdown file, `example.md`, and place it under the `docs` directory. Any markdown file will render into the site without needing any extra configuration. It will be displayed alphabetically on the sidebar. |
| 47 | + |
| 48 | +```bash |
| 49 | +root |
| 50 | +├── docs |
| 51 | +│ └── example.md |
| 52 | +├── docusaurus.config.js |
| 53 | +├── ... |
| 54 | +``` |
| 55 | + |
| 56 | +Markdown documents can use the Markdown front matter metadata fields, enclosed by a line `---` on either side. At the top of the file, you can optionally specify attributes in the front matter, so that Docusaurus will pick them up correctly when generating the site. Accepted fields can be found [here](https://docusaurus.io/docs/next/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter). |
| 57 | + |
| 58 | +### Create a doc category |
| 59 | + |
| 60 | +Creating a `example.md` in a sub folder will create a category in the sidebar. |
| 61 | + |
| 62 | +```bash |
| 63 | +root |
| 64 | +├── docs |
| 65 | +│ └── sub-folder |
| 66 | +│ └── example.md |
| 67 | +``` |
| 68 | + |
| 69 | +To change the category name or other category meta data, an optional file `_category_.json` can be created in the respective sub folder. More [here](https://docusaurus.io/docs/next/sidebar/autogenerated#autogenerated-sidebar-metadata). |
| 70 | + |
| 71 | +```json |
| 72 | +{ |
| 73 | + "label": "Tutorial" |
| 74 | +} |
| 75 | +``` |
| 76 | + |
| 77 | +### Static Assets |
| 78 | + |
| 79 | +The Static Assets can be found in the `static` folder. More [here](https://docusaurus.io/docs/next/static-assets). |
| 80 | + |
| 81 | +### Change theme color |
| 82 | + |
| 83 | +Generate the variables from [here](https://docusaurus.io/docs/next/styling-layout#styling-your-site-with-infima). Then replace the variables in `src/css/custom.css` with these new variables. Don't forget variables for dark mode. |
| 84 | + |
| 85 | +### Change codeBlock theme |
| 86 | + |
| 87 | +Docusaurus uses [Prism React Renderer](https://github.com/FormidableLabs/prism-react-renderer) to highlight code blocks. All configuration are in the `prism` object of `docusaurus.config.js`. You can specify a custom theme from the [list of available themes](https://github.com/FormidableLabs/prism-react-renderer/tree/master/src/themes). |
| 88 | + |
| 89 | +### Change footer |
| 90 | + |
| 91 | +You can add logo and a copyright to the footer via `themeConfig.footer`. More [here](https://docusaurus.io/docs/next/api/themes/configuration#footer-1). |
| 92 | + |
| 93 | +### Blog |
| 94 | + |
| 95 | +To set up blog, start by creating a `blog` directory. More [here](https://docusaurus.io/docs/next/blog). |
| 96 | + |
| 97 | +### Admonitions |
| 98 | + |
| 99 | +In addition to the basic Markdown syntax, Docusaurus use [remark-admonitions](https://github.com/elviswolcott/remark-admonitions) alongside MDX to add support for admonitions. Admonitions are wrapped by a set of 3 colons. More [here](https://docusaurus.io/docs/next/markdown-features/admonitions). |
| 100 | + |
| 101 | +### Update Docusaurus version |
| 102 | + |
| 103 | +To update Docusaurus version, manually change the version number in `package.json` to the desired version. Then run `npm run install`. |
| 104 | + |
| 105 | +Any required change/depricated message will be shown on the terminal when running the command `npm run start`. More [here](https://docusaurus.io/docs/next/installation#updating-your-docusaurus-version). |
| 106 | + |
| 107 | +## Status |
29 | 108 |
|
30 | 109 | The current status of the website is **under construction**. Please follow us on Twitter [@chkware](https://twitter.com/chkware) for update. Thank you for your patience. |
31 | 110 |
|
32 | 111 | --- |
33 | | -`chkware` website uses [docusaurus v2.0.0-beta.17](https://github.com/facebook/docusaurus/releases/tag/v2.0.0-beta.17) as CMS backend. |
| 112 | + |
| 113 | +`chkware` website uses [docusaurus v2.0.0-beta.17](https://github.com/facebook/docusaurus/releases/tag/v2.0.0-beta.17) as CMS backend. |
0 commit comments