A simple tool for generating html files from (github flavored) markdown.
- Whats New
- Download
- Build Instructions
- Installation Instructions
- Usage
- [Archive] (#archive)
MarkdownTool Version 1 just begins to exist.
MarkdownTool-src-with-dependencies.zip
- Get the source
- Run
ant
Just place the MarkdownTool.jar somewhere.
Optional you can create a script like
#!/bin/sh
java -jar /path/to/MarkdownTool.jar $@
and save it as MarkdownTool in your path.
Now you can just type MarkdownTool ... instead of java -jar /path/to/MarkdownTool.jar ... each time.
java -jar /path/to/MarkdownTool.jar template.html generated.html
or if you have set up the script above
MarkdownTool template.html generated.html
For the sake of laziness I will use the latter version only ;)
The option --no-loop omits recursive processing.
MarkdownTool --no-loop template.html generated.html
You can use - as filename to read from stdin or write to stdout. Happy piping!
Also MarkdownTool --help and MarkdownTool --version will do a great job.
The html template is a regular html file with a single line comment where the markdown is included.
<html>
<head />
<body>
<!-- MarkdownInclude: README.md -->
</body>
</html>
This looks for the file README.md in the current directory and replaces the comment with includes the generated html fragment.
<html>
<head />
<body>
<!-- MarkdownInclude: README.md -->
<p>lots of many texts
...
and stuff<p>
<!-- MarkdownInclude: another.md -->
</body>
</html>
The secound template will work as expected.
If you include a raw html comment inside your markdown - this will work recursively. Just dont create loops.
MarkdownTool Version 1 just begins to exist.