Skip to content

sotatek-dev/slate_node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slate with node.js

js-standard-style

A port of the documentation generator Slate to node.js.
See it in action!

The major difference is the use of marked for parsing the .md, highlight for syntax highlighting, and Handlebars for templating.

Running

  1. Clone the repo, install the npm modules.

  2. Run node marked.js. In addition, you can refer to the parameters of the following table:

    Parameter Explain
    --i File input template
    --o File output
    --p Path folder includes
    --d Path folder source slate_node
    --css Css file custom
  3. This will build the page and save it to /source/index.html

  4. You're done!

  • Replace /source/index.md with your own markdown to use that instead

Todo/Bugs

  • Package it in a more modular way (Grunt?)
  • marked seems to be handling tables a bit differently, if there's too many em-dashes it's failing
  • highlight.js might have some differences in language detection than Rouge; at the very least 'shell' becomes 'bash'. Ideally this repo should be compatible with any markdown made for Ruby Slate.
  • Cleanup how marked parses the top-level settings. Right now they are manually being parsed.
  • Actually build the scss/js
  • Allow you to choose from highlight's different themes

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.8%
  • HTML 6.4%
  • CSS 0.8%