Node's Pretty Magical


    0.0.43 • Public • Published


    Render Markdown to HTML, Hack Club-style. Used primarily on the Hack Club Workshops site.

    yarn add @hackclub/markdown
    # npm i @hackclub/markdown

    Try the demo


    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('./', 'utf8')
      return await md(text, '/', '/static')
    Param Default Description
    input Req’d! String. The Markdown text to transform.
    filePath '/' 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

    Tip: Click on a version number to view a previous version's package page

    Current Tags

    • Version
      Downloads (Last 7 Days)
      • Tag
    • 0.0.43
      • latest

    Version History


    npm i @hackclub/markdown

    DownloadsWeekly Downloads






    Unpacked Size

    828 kB

    Total Files


    Last publish


    • lachlanjc
    • maxwofford
    • matthewstanciu
    • uanirudhx
    • sampoder