Skip to content

Commit fea0360

Browse files
committed
docs: document new documentation
1 parent ece880c commit fea0360

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,39 @@ Faust.js is a toolkit for building Next.js applications for headless WordPress s
2727

2828
## Documentation
2929

30-
Visit [https://faustjs.org/docs/getting-started](https://faustjs.org/docs/getting-started) to view the full documentation.
30+
Visit [https://faustjs.org/docs/](https://faustjs.org/docs/getting-started) to view the full documentation.
31+
32+
### Editing Docs
33+
34+
Docs are MD in [`docs`](docs/). Here are a couple things you should know!
35+
36+
1. Our Docs support [Github Flavored Markdown](https://github.github.com/gfm/) (GFM).
37+
2. Images should be stored along side the doc that uses them in an `images/` folder.
38+
3. Shared Images can be stored in a shared folder @ `docs/images`
39+
4. [Callouts](https://github.com/lin-stephanie/rehype-callouts?tab=readme-ov-file#rehype-callouts): These are similar to block quotes or an aside but for various warnings, info, pro times, etc.
40+
5. Code Blocks:
41+
42+
- Required
43+
1. Specify a language: ` ```js ` or `` `const inlineCode = [1,2,3];{:js}` ``
44+
- Commands for a users terminal = `bash`
45+
- env files = `ini`
46+
- JavaScript = `js`
47+
- TypeScript = `ts`
48+
- GraphQL = `gql`
49+
- JSON = `json`
50+
- For a full list see: https://shiki.style/languages
51+
2. Add [line numbers](https://rehype-pretty.pages.dev/#line-numbers) to any complex code. `ini` and `bash` don't need to show line numbers generally. ` ```js showLineNumbers`
52+
3. Complete files should have a [file names](https://rehype-pretty.pages.dev/#titles) ` ```js title="pages/_app.js`
53+
- Optional
54+
55+
1. Lines can be [highlighted](https://rehype-pretty.pages.dev/#highlight-lines) in code blocks ` ```js {1,3-5}`. There are a variety of advanced highlighting methods, see: https://rehype-pretty.pages.dev/#highlight-lines
56+
2. Lines may be [diffed](https://shiki.style/packages/transformers#transformernotationdiff) in a code block:
57+
58+
```js
59+
console.log('hewwo') // [!code --]
60+
console.log('hello') // [!code ++]
61+
console.log('goodbye')
62+
```
3163

3264
## WordPress Plugin (FaustWP)
3365

0 commit comments

Comments
 (0)