Skip to content

Commit a6f9312

Browse files
bump alpha.8
1 parent 4009bc3 commit a6f9312

3 files changed

Lines changed: 178 additions & 71 deletions

File tree

greenwood.config.js

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { greenwoodPluginCssModules } from "@greenwood/plugin-css-modules";
22
import { greenwoodPluginImportRaw } from "@greenwood/plugin-import-raw";
3+
import { greenwoodPluginMarkdown } from "@greenwood/plugin-markdown";
34

45
// TODO would be nice to find a better way to solve this problem
56
// https://github.com/ProjectEvergreen/www.greenwoodjs.dev/issues/125
@@ -38,30 +39,27 @@ class ActiveFrontmatterDocsTitleRestorerResource {
3839
export default {
3940
activeContent: true,
4041

41-
// would be nice if we could customize these plugins, like appending the autolink headings
42-
// https://github.com/ProjectEvergreen/greenwood/issues/1247
43-
markdown: {
44-
plugins: [
45-
"@mapbox/rehype-prism",
46-
"rehype-slug",
47-
"rehype-autolink-headings",
48-
"remark-github",
49-
"remark-gfm",
50-
{
51-
name: "rehype-external-links",
52-
options: {
53-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#security_and_privacy
54-
rel: ["nofollow", "noopener", "noreferrer"],
55-
target: "_blank",
56-
contentProperties: { className: ["no-show-screen-reader"] },
57-
content: [{ type: "text", value: " (opens in a new window)" }],
58-
properties: { className: ["external-link-icon"] },
59-
},
60-
},
61-
],
62-
},
63-
6442
plugins: [
43+
greenwoodPluginMarkdown({
44+
plugins: [
45+
"@mapbox/rehype-prism",
46+
"rehype-slug",
47+
"rehype-autolink-headings",
48+
"remark-github",
49+
"remark-gfm",
50+
{
51+
name: "rehype-external-links",
52+
options: {
53+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#security_and_privacy
54+
rel: ["nofollow", "noopener", "noreferrer"],
55+
target: "_blank",
56+
contentProperties: { className: ["no-show-screen-reader"] },
57+
content: [{ type: "text", value: " (opens in a new window)" }],
58+
properties: { className: ["external-link-icon"] },
59+
},
60+
},
61+
],
62+
}),
6563
greenwoodPluginCssModules(),
6664
greenwoodPluginImportRaw(),
6765
{

0 commit comments

Comments
 (0)