Giter VIP home page Giter VIP logo

markdown-to-standalone-html's People

Contributors

juanelas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

eisenbm

markdown-to-standalone-html's Issues

Convert markdown to html from typescript code

I would convert a markdown to html code with this test code on a typescript project:

import markdownToStandAloneHtml from '../node_modules/markdown-to-standalone-html/dist/index'
it('should convert markdown to html standalone', async () => {
    const actual = await markdownToStandAloneHtml(fileContent,
      { here the options } )
    writeFile('cheatSheetStandalone.html', actual)
    // console.log(actual)
    const isFileExist = fileExists('cheatSheetStandalone.html')
    expect(isFileExist === true);
  });

where fileContent is a valid markdown string.

A couple of questions:

  1. how to import without pass from node_modules folder
  2. I didn't quite understand how to pass Options . I have tried to create a custom html template :
{ basePath: "c:/temp", template: "c:/temp/template-simple.html", plugins: [] }

but my custom template is not found.
Any help please ? Thank's

wish for url coding support

Very helpful tool!!!

But I met the following error message when convert markdown file into html.

D:\Log\gitee\notes>markdown-to-standalone-html "抓住重点.md" -o 抓住终点.html
Could not get %E6%8A%93%E4%BD%8F%E9%87%8D%E7%82%B9/%E6%B7%B1%E5%BA%A6%E6%88%AA%E5%9B%BE_org.gnome.Nautilus_20201203182658.png
Error: Error: The protocol "" is not supported, cannot load "%E6%8A%93%E4%BD%8F%E9%87%8D%E7%82%B9/%E6%B7%B1%E5%BA%A6%E6%88%AA%E5%9B%BE_org.gnome.Nautilus_20201203182658.png"
...

The resulting html is not standalone.

It seems to be the non-English words in the folder name that cause the abnormal coding in url.

Wish support for other language in the future!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.