Is there a command line utility for rendering GitHub flavored Markdown?

后端 未结 25 1710
一个人的身影
一个人的身影 2020-11-28 16:53

I\'m wondering if there is a command line utility for taking a GitHub flavored Markdown file and rendering it to HTML.

I\'m using a GitHub wiki to create website con

25条回答
  •  死守一世寂寞
    2020-11-28 17:38

    A 'quick-and-dirty' approach is to download the wiki HTML pages using the wget utility, instead of cloning it. For example, this is how I downloaded the Hystrix wiki from GitHub (I'm using Ubuntu Linux):

     $ wget -e robots=off -nH -E -H -k -K -p https://github.com/Netflix/Hystrix/wiki
     $ wget -e robots=off -nH -E -H -k -K -I "Netflix/Hystrix/wiki" -r -l 1 https://github.com/Netflix/Hystrix/wiki
    

    The first call will download the wiki entry page and all its dependencies. The second one will call all sub-pages on it. You can browse now the wiki by opening Netflix/Hystrix/wiki.1.html.

    Note that both calls to wget are necessary. If you just run the second one then you will miss some dependencies required to show the pages properly.

提交回复
热议问题