|
1 | 1 | import { greenwoodPluginCssModules } from "@greenwood/plugin-css-modules"; |
2 | 2 | import { greenwoodPluginImportRaw } from "@greenwood/plugin-import-raw"; |
| 3 | +import { greenwoodPluginMarkdown } from "@greenwood/plugin-markdown"; |
3 | 4 |
|
4 | 5 | // TODO would be nice to find a better way to solve this problem |
5 | 6 | // https://github.com/ProjectEvergreen/www.greenwoodjs.dev/issues/125 |
@@ -38,30 +39,27 @@ class ActiveFrontmatterDocsTitleRestorerResource { |
38 | 39 | export default { |
39 | 40 | activeContent: true, |
40 | 41 |
|
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 | | - |
64 | 42 | 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 | + }), |
65 | 63 | greenwoodPluginCssModules(), |
66 | 64 | greenwoodPluginImportRaw(), |
67 | 65 | { |
|
0 commit comments