You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/resources/markdown.md
+126-8Lines changed: 126 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,31 +6,149 @@ tocHeading: 2
6
6
7
7
# Markdown
8
8
9
-
In this section we'll cover some of the Markdown related features of **Greenwood**, which by default supports the [CommonMark](https://commonmark.org/help/) specification and [**unifiedjs**](https://unifiedjs.com/) as the markdown / content framework.
9
+
For authoring in markdown, Greenwood provides a plugin that you can install, which by default supports the [CommonMark](https://commonmark.org/help/) specification and uses [**unifiedjs**](https://unifiedjs.com/) as the markdown / content framework. See the [plugin's README](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-markdown) for additional information, like standalone usage.
10
10
11
-
## Plugins
11
+
## Installation
12
12
13
-
Using your _greenwood.config.js_ you can have additional [markdown customizations and configurations](/docs/reference/configuration/#markdown).
13
+
You can use your favorite JavaScript package manager to install this plugin:
14
14
15
-
For example, to use the [**remark-github**](https://github.com/remarkjs/remark-github) plugin:
15
+
<!-- prettier-ignore-start -->
16
+
<app-ctc-blockvariant="runners">
17
+
18
+
```shell
19
+
npm i -D @greenwood/plugin-markdown
20
+
```
21
+
22
+
```shell
23
+
yarn add @greenwood/plugin-markdown --dev
24
+
```
25
+
26
+
```shell
27
+
pnpm add -D @greenwood/plugin-markdown
28
+
```
29
+
30
+
</app-ctc-block>
31
+
32
+
<!-- prettier-ignore-end -->
33
+
34
+
Then add this plugin to your _greenwood.config.js_.
Now you can start authoring your pages in markdown:
55
+
56
+
```shell
57
+
src/
58
+
pages/
59
+
blog/
60
+
first-post.md
61
+
second-post.md
62
+
index.md
63
+
```
64
+
65
+
## Types
66
+
67
+
Types should automatically be inferred through this package's exports map, but can be referenced explicitly in both JavaScript (JSDoc) and TypeScript files if needed.
You can install **remark** or **rehype** compatible plugins to extend this plugin's markdown rendering and transformation capabilities by passing their names in as an array.
98
+
99
+
For example, after installing something like **rehype-slug**, pass the name as a string when adding the plugin to your Greenwood config file:
0 commit comments