
Product
Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.
vite-plugin-solid-markdown
Advanced tools
Compile Markdown to SolidJS component.
Install
npm i vite-plugin-solid-markdown -D # yarn add vite-plugin-solid-markdown -D
Add it to vite.config.js
// vite.config.js
import solidPlugin from 'solid-start/vite'
import { defineConfig } from 'vite'
import Markdown from 'vite-plugin-solid-markdown'
export default defineConfig({
plugins: [
solidPlugin({
extensions: ['.mdx', '.md'],
}),
Markdown(),
],
})
And import it as a normal Solid component
import About from './about.md'
export default function App() {
return (
<div>
<About />
</div>
)
}
You can even use Solid components inside your markdown, for example
import Counter from '~/components/Counter'
<Counter />
Frontmatter will be parsed and inject into Solid's instance data frontmatter field.
For example:
---
name: My Cool App
---
# Hello World
This is {{frontmatter.name}}
Will be rendered as
<h1>Hello World</h1>
<p>This is My Cool App</p>
It will also be passed to the wrapper component's props if you have set wrapperComponent option.
// vite.config.js
import solidPlugin from 'solid-start/vite'
import { defineConfig } from 'vite'
import Markdown from 'vite-plugin-solid-markdown'
import remarkPrism from 'remark-prism'
export default defineConfig({
plugins: [
solidPlugin({
extensions: ['.mdx', '.md'],
}),
Markdown({
wrapperClasses: 'prose prose-sm m-auto text-left',
remarkPlugins: [remarkPrism],
// more options will be added in the future
}),
],
})
See the tsdoc for more advanced options
See the /example.
Or the pre-configured starter template Vitesse.
MIT License © 2020-PRESENT xbmlz
FAQs
Compile Markdown to SolidJS component
The npm package vite-plugin-solid-markdown receives a total of 157 weekly downloads. As such, vite-plugin-solid-markdown popularity was classified as not popular.
We found that vite-plugin-solid-markdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.

Research
/Security News
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.