Skip to content

A Markdown to HTML converter for .md files that were created with Vimwiki

License

Notifications You must be signed in to change notification settings

maqiv/vimwiki-godown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vimwiki-GoDown

Vimwiki-GoDown is a Markdown to HTML converter for .md files that were created with Vimwiki. The converter is implemented in Golang. It's idea is based on the preceding implementation mikasa_md2html, which is written in Python.

To convert Markdown syntax to HTML, Vimwiki-GoDown uses the Blackfriday Markdown processor. The only conversion that is done manually are checkboxes.

One of the main reasons behind creating another Markdown to HTML converter for Vimwiki is that, compared to other converters, Vimwiki-GoDown has the additional ability to prefix relative links to other Vimwiki pages. This means that the converted HTML files can be hosted in a subdirectory, or rather a URL subpath (of course it can also be used without prefixing links between Vimwiki pages).

Installation

To run Vimwiki-GoDown, an installation of Golang (Go 1 or above) is required. The following command will install Vimwiki-GoDown into the $GOPATH/bin directory:

go get "github.com/maqiv/vimwiki-godown"

Please make sure that the environment variable $GOPATH is set correctly and $GOPATH/bin is included in the $PATH environment variable. For more information please consult the Golang $GOPATH environment variable.

Configuration

To get Vimwiki-GoDown running with Vimwiki only a few settings need to be configured. Parameters that need to be adjusted can be found in the ~/.vim/vimrc configuration file or rather in the variable g:vimwiki_list. The two parameters that are required for Vimwiki-GoDown are:

  • custom_wiki2html: Path to the Vimwiki-GoDown binary
  • custom_wiki2html_args: URL Subpath that is prefixed to every relative link between Vimwiki pages

Example:

let g:vimwiki_list = [{
...
  \'custom_wiki2html': '$GOPATH/bin/vimwiki-godown',
  \'custom_wiki2html_args': 'xyz/',
...
\}]

More information about the parameters can be found in the Vimwiki help.

License

This software is distributed under the MIT license.

ToDo

  • Possibility to use templates
  • Ensure compatility to percent codes used in misaka_md2html.py
  • Customize title guessing so that TOC heading is not used as title
  • .... any additional ideas or contributions are very welcome :-)

About

A Markdown to HTML converter for .md files that were created with Vimwiki

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages