Skip to content

Commit

Permalink
Add a remark plugin to support custom header id
Browse files Browse the repository at this point in the history
Allows validation of custom headers via remark-validate-links
  • Loading branch information
dshevtsov committed Nov 22, 2023
1 parent 748e3c9 commit df853eb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .remarkrc.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import remarkHeadingId from "remark-heading-id";
import remarkValidateLinks from "remark-validate-links";
import remarkFrontmatter from "remark-frontmatter";
import remarkLintFrontmatterSchema from "remark-lint-frontmatter-schema";
import remarkLintNoDeadUrls from "remark-lint-no-dead-urls";

const remarkConfig = {
plugins: [
remarkHeadingId,
remarkValidateLinks,
remarkFrontmatter,
[
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"devDependencies": {
"remark-cli": "^10.0.1",
"remark-frontmatter": "4.0.1",
"remark-heading-id": "^1.0.1",
"remark-lint-frontmatter-schema": "^3.15.2",
"remark-lint-no-dead-urls": "^1.1.0",
"remark-validate-links": "^11.0.2"
Expand Down
13 changes: 12 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6781,6 +6781,7 @@ __metadata:
react-dom: ^17.0.2
remark-cli: ^10.0.1
remark-frontmatter: 4.0.1
remark-heading-id: ^1.0.1
remark-lint-frontmatter-schema: ^3.15.2
remark-lint-no-dead-urls: ^1.1.0
remark-validate-links: ^11.0.2
Expand Down Expand Up @@ -17527,6 +17528,16 @@ __metadata:
languageName: node
linkType: hard

"remark-heading-id@npm:^1.0.1":
version: 1.0.1
resolution: "remark-heading-id@npm:1.0.1"
dependencies:
lodash: ^4.17.21
unist-util-visit: ^1.4.0
checksum: 20fd8072436280936dd76cf3a86d3e8e4f89bb4440863ea67d5c2ad27b74e858350aaf5a56a292bdb7f99c28fa823a83d8cfac87bfc410ebb39d23594d5905d8
languageName: node
linkType: hard

"remark-lint-frontmatter-schema@npm:^3.15.2":
version: 3.15.2
resolution: "remark-lint-frontmatter-schema@npm:3.15.2"
Expand Down Expand Up @@ -20410,7 +20421,7 @@ __metadata:
languageName: node
linkType: hard

"unist-util-visit@npm:^1.0.0, unist-util-visit@npm:^1.1.0, unist-util-visit@npm:^1.4.1":
"unist-util-visit@npm:^1.0.0, unist-util-visit@npm:^1.1.0, unist-util-visit@npm:^1.4.0, unist-util-visit@npm:^1.4.1":
version: 1.4.1
resolution: "unist-util-visit@npm:1.4.1"
dependencies:
Expand Down

0 comments on commit df853eb

Please sign in to comment.