Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
astro-rehype-relative-markdown-links
Advanced tools
A rehype plugin built for Astro that aims to transform relative links in MD and MDX files into the proper URL path
This is a rehype plugin built for Astro that aims to transform relative links in MD and MDX files into their final output paths.
🚨 This is experimental and build exclusively for Astro. Happy to take contributions!
For example, if you have a markdown files at src/content/blog/post.md
with the content of:
[relative link](./other-markdown.md)
The resulting HTML should be:
<a href="/blog/other-markdown">relative link</a>
It supports links with Query Strings and Hashes (e.g. [relative link](./other-markdown.md?query=test#hash)
).
Yarn
yarn add astro-rehype-relative-markdown-links
PNPM
pnpm add astro-rehype-relative-markdown-links
NPM
npm install astro-rehype-relative-markdown-links
astro.config.mjs
import rehypeAstroRelativeMarkdownLinks from "astro-rehype-relative-markdown-links";
// ...everything else
export default defineConfig({
// ...everything else
markdown: {
rehypePlugins: [rehypeAstroRelativeMarkdownLinks],
},
});
Using Yarn in example (sorry).
DEBUG=astro-rehype-relative-markdown-links yarn build
# or
DEBUG=astro-rehype-relative-markdown-links yarn dev
rehype-astro-relative-markdown-links
in the past. I've changed this due to rehype's naming guidelines.FAQs
A rehype plugin built for Astro that aims to transform relative links in MD and MDX files into the proper URL path
We found that astro-rehype-relative-markdown-links demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.