Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@hackclub/markdown
Advanced tools
@hackclub/markdown
Render Markdown to HTML, Hack Club-style. Used primarily on the Hack Club Workshops site.
yarn add @hackclub/markdown
# npm i @hackclub/markdown
This package does not include any frontend code, such as React or CSS.
This package is designed for rendering at build or otherwise on a server, not client-side— the bundle size is significant & it’s not been optimized for performance.
Always use with await
.
import fs from 'fs'
import md from '@hackclub/markdown'
const getReadme = async () => (
const text = fs.readFileSync('./README.md', 'utf8')
return await md(text, '/README.md', '/static')
)
Param | Default | Description |
---|---|---|
input | Req’d! | String. The Markdown text to transform. |
filePath | '/README.md' | String. The Markdown’s path (for fixing relative image links). |
imagePrefix | '/' | String. A prefix for the path to relative images. |
removeTitle | false | Bool. Remove starting h1 (if titles are rendered separately). |
If you need to parse frontmatter, we recommend using gray-matter
alongside @hackclub/markdown
, but it’s not included in this package.
Partially based on the Next.js documentation site.
MIT License
FAQs
Render Markdown to HTML, Hack Club-style
The npm package @hackclub/markdown receives a total of 11 weekly downloads. As such, @hackclub/markdown popularity was classified as not popular.
We found that @hackclub/markdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.