Giter Club home page Giter Club logo

vimwiki-godown's Introduction

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 :-)

vimwiki-godown's People

Contributors

aignas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

edwlarkey

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.