Skip to content

Commit 042f994

Browse files
committed
setup website for document contributor
1 parent 55aa0b3 commit 042f994

3 files changed

Lines changed: 128 additions & 115 deletions

File tree

README.md

Lines changed: 4 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,8 @@
11
# CHKware website
22

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).
44

5-
### Installation
5+
### Install and setup
66

7-
Clone the repo:
8-
9-
```sh
10-
git clone https://github.com/chkware/chkware.github.io.git
11-
cd chkware.github.io
12-
```
13-
14-
Install dependencies:
15-
16-
```sh
17-
npm install
18-
```
19-
20-
### Local Development
21-
22-
```
23-
npm start
24-
```
25-
26-
This command starts a local development server and opens up a browser window. You can also follow `http://localhost:3000/` URL in any browser.
27-
28-
Most changes are reflected live reload without having to restart the server.
29-
30-
### Build
31-
32-
```
33-
npm run build
34-
```
35-
36-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
37-
38-
### Guides
39-
40-
Learn how to contribute to this website.
41-
42-
### Configs
43-
44-
All the configs can be found in `docusaurus.config.js`.
45-
46-
#### Create a doc page
47-
48-
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.
49-
50-
```bash
51-
root
52-
├── docs
53-
│ └── example.md
54-
├── docusaurus.config.js
55-
├── ...
56-
```
57-
58-
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).
59-
60-
#### Create a doc category
61-
62-
Creating a `example.md` in a sub folder will create a category in the sidebar.
63-
64-
```bash
65-
root
66-
├── docs
67-
│ └── sub-folder
68-
│ └── example.md
69-
```
70-
71-
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).
72-
73-
```json
74-
{
75-
"label": "Tutorial"
76-
}
77-
```
78-
79-
#### Static Assets
80-
81-
The Static Assets can be found in the `static` folder. More [here](https://docusaurus.io/docs/next/static-assets).
82-
83-
#### Change theme color
84-
85-
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.
86-
87-
#### Change codeBlock theme
88-
89-
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).
90-
91-
#### Syntax highlighting
92-
93-
To add syntax highlighting for any of the other [Prism-supported languages](https://prismjs.com/#supported-languages), define it in an array of additional languages. More [here](https://docusaurus.io/docs/next/markdown-features/code-blocks#supported-languages).
94-
95-
#### Change footer
96-
97-
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).
98-
99-
#### Blog
100-
101-
To set up blog, start by creating a `blog` directory. More [here](https://docusaurus.io/docs/next/blog).
102-
103-
#### Admonitions
104-
105-
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).
106-
107-
#### Update Docusaurus version
108-
109-
To update Docusaurus version, manually change the version number in `package.json` to the desired version. Then run `npm run install`.
110-
111-
Any required change / deprecated 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).
112-
113-
### Status
114-
115-
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.
116-
117-
---
118-
119-
*CHKware* website uses [docusaurus v2.3.0](https://github.com/facebook/docusaurus/releases/tag/v2.3.0) as CMS backend.
7+
- Head to [CHKware website](https://chkware.github.io/setup), for documentation, if you want to use *CHKware* in your project.
8+
- Jump to the [setup for website developer](http://chkware.github.io/setup/setup-site-dev) if you want to contribute to this repository.

docs/setup/setup-site-dev.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
title: Setup for website developer
3+
---
4+
5+
### Local development environment setup for *CHKware* documentation site
6+
7+
This repository holds source code and publishable website for [**`CHKware`**](https://github.com/chkware/cli#readme). Please access using https://chkware.github.io.
8+
9+
### Installation
10+
11+
Clone the repo:
12+
13+
```sh
14+
git clone https://github.com/chkware/chkware.github.io.git
15+
cd chkware.github.io
16+
```
17+
18+
Install dependencies:
19+
20+
```sh
21+
npm install
22+
```
23+
24+
### Local Development
25+
26+
```
27+
npm start
28+
```
29+
30+
This command starts a local development server and opens up a browser window. You can also follow `http://localhost:3000/` URL in any browser.
31+
32+
Most changes are reflected live reload without having to restart the server.
33+
34+
### Build
35+
36+
```
37+
npm run build
38+
```
39+
40+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
41+
42+
### Guides
43+
44+
Learn how to contribute to this website.
45+
46+
### Configs
47+
48+
All the configs can be found in `docusaurus.config.js`.
49+
50+
#### Create a doc page
51+
52+
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.
53+
54+
```bash
55+
root
56+
├── docs
57+
│ └── example.md
58+
├── docusaurus.config.js
59+
├── ...
60+
```
61+
62+
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).
63+
64+
#### Create a doc category
65+
66+
Creating a `example.md` in a sub folder will create a category in the sidebar.
67+
68+
```bash
69+
root
70+
├── docs
71+
│ └── sub-folder
72+
│ └── example.md
73+
```
74+
75+
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).
76+
77+
```json
78+
{
79+
"label": "Tutorial"
80+
}
81+
```
82+
83+
#### Static Assets
84+
85+
The Static Assets can be found in the `static` folder. More [here](https://docusaurus.io/docs/next/static-assets).
86+
87+
#### Change theme color
88+
89+
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.
90+
91+
#### Change codeBlock theme
92+
93+
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).
94+
95+
#### Syntax highlighting
96+
97+
To add syntax highlighting for any of the other [Prism-supported languages](https://prismjs.com/#supported-languages), define it in an array of additional languages. More [here](https://docusaurus.io/docs/next/markdown-features/code-blocks#supported-languages).
98+
99+
#### Change footer
100+
101+
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).
102+
103+
#### Blog
104+
105+
To set up blog, start by creating a `blog` directory. More [here](https://docusaurus.io/docs/next/blog).
106+
107+
#### Admonitions
108+
109+
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).
110+
111+
#### Update Docusaurus version
112+
113+
To update Docusaurus version, manually change the version number in `package.json` to the desired version. Then run `npm run install`.
114+
115+
Any required change / deprecated 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).
116+
117+
### Status
118+
119+
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.
120+
121+
---
122+
123+
*CHKware* website uses [docusaurus v2.3.0](https://github.com/facebook/docusaurus/releases/tag/v2.3.0) as CMS backend.

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const sidebars = {
6464
items: [
6565
'setup/setup-ext-dev',
6666
'setup/setup-cli-dev',
67+
'setup/setup-site-dev',
6768
],
6869
},
6970
],

0 commit comments

Comments
 (0)