Replies: 1 comment 2 replies
-
We parse CommonMark, and optionally GFM or a couple other extensions. A markdown parser doesn’t see what you have as a link:
[title]({{< relref "page" >}}) See also https://github.com/orgs/remarkjs/discussions/1166, remarkjs/vscode-remark#18, remarkjs/remark-lint#58 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm investigating
remark-cli
to lint the Markdown content of a site generated by Hugo (a static site generator). So far, I have successfully includedremark-frontmatter
to filter Hugo's front matter. However, I'm struggling to address severalno-undefined-references
warnings.The markdown content contains several Hugo
shortcodes
that generate a link. For example, the following line is a relative reference. Hugo replaces the shortcoderelref
with a valid (relative) reference to a local page during build.Basically, I would like to allow any reference that contains a shortcode reference to
relref
,ref
, andparam
, enclosed by{{<
and>}}
. I was able to come up with the following configuration and regex pattern (package.json
):The script seems to work for
[][]
references, but fails on[]()
references.I created a public repository with the above files to illustrate the issue. I'm quite new to remark, so perhaps I made an obvious configuration error. Any help is greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions