0.1.0 • Published 6 months ago
remark-github-alerts v0.1.0
remark-github-alerts
- Ported from antfu/markdown-it-github-alerts
- Support GitHub-style alerts for remark
- Check out the demo
Usage
Install the package:
ni remark-github-alerts
Add the plugin to your processor
:
import remarkGithubAlerts from "remark-github-alerts";
const processor = unified()
.use(remarkParse)
.use(remarkGithubAlerts)
.use(remarkRehype)
.use(rehypeStringify);
Import the styles:
import "remark-github-alerts/styles/github-colors-light.css";
import "remark-github-alerts/styles/github-colors-dark-class.css";
// or
// import "remark-github-alerts/styles/github-colors-dark-media.css"
import "remark-github-alerts/styles/github-base.css";
If you are using Nextra, you can add the plugin to your next.config.mjs
:
import nextra from "nextra";
import remarkGithubAlerts from "remark-github-alerts";
const withNextra = nextra({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
mdxOptions: {
remarkPlugins: [remarkGithubAlerts],
},
});
export default withNextra();
Check Also
0.1.0
6 months ago
0.1.0-beta.3
1 year ago
0.1.0-beta.2
1 year ago
0.1.0-beta.1
1 year ago
0.0.4
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago
0.0.1
1 year ago