‚̧Nearsighted Paramecium Multiverse
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    itsa-react-fs-markdown

    15.1.3¬†‚Äʬ†Public¬†‚Äʬ†Published

    itsa-react-fs-markdown

    Read markdownfiles and return a dangerouslySetInnerHTML object as a Promise.

    usage:

    const fsMD = require('itsa-react-fs-markdown')(__dirname); // <-- always invoke with the current __dirname
    const pagecontentPromise = fsMD.readFile('./markdown_files/index.MD');
     
    /*
     * pagecontentPromise is a promise that gets fulfilled with an object like this:
     * {__html: 'the <b>content</b> of the file'}
     */
     

    Code-blocks will get markedup as well, though you need to take care of the right css yourselve. Get the css from Highlight.js.

    Install

    npm i itsa-react-fs-markdown

    DownloadsWeekly Downloads

    2

    Version

    15.1.3

    License

    New BSD

    Last publish

    Collaborators

    • avatar