Skip to content

Commit f96c9f6

Browse files
chore: upgrade Greenwood v0.33.0 (#211)
1 parent d656a77 commit f96c9f6

File tree

5 files changed

+387
-97
lines changed

5 files changed

+387
-97
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.13.0
1+
22.18.0

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)