patrickdavey / vimwiki_markdown

A gem to use for converting vimwiki markdown files to html.
MIT License
144 stars 16 forks source link

[LinkDescription][LinkToMDFile.md] gets converted as <a href="LinkToMDFile.md.html"> #37

Closed ElPiloto closed 3 years ago

ElPiloto commented 3 years ago

My setup

let g:vimwiki_list = [{'path': '~/vimwiki', 'template_path': '~/vimwiki/templates/',
          \ 'template_default': 'default', 'syntax': 'markdown', 'ext': '.md',
          \ 'path_html': '~/vimwiki/site_html/', 'custom_wiki2html': 'vimwiki_markdown',
          \ 'html_filename_parameterization': 1,
          \ 'template_ext': '.tpl'}]

and

gem install vimwiki_markdown

running on lunarvim (layer on top of neovim 0.5).

Issue

VimwikiDiaryGenerateLinks creates links in the diary index as [SomeDiaryEntry][SomeDiaryDate.md]. When I subsequently run Vimwiki2HTML on diary.md, the link in diary.html points to SomeDiaryDate.md.html instead of SomeDiaryDate.html as expected. This results in a broken link since only SomeDiaryDate.html exists.

If I manually remove the .md from the link in the diary index markdown file (i.e. [SomeDiaryDate.md] becomes [SomeDiaryDate], then everything works as expected. But I don't believe vimwiki is in error here by including the .md extension at the end of the generated link.

ElPiloto commented 3 years ago

Had aliased vimwiki_markdown to another (python-based) binary. This is working fine, sorry for the noise and thanks for the great tool :)

patrickdavey commented 3 years ago

Hey @ElPiloto , glad you got it sorted. I don't think I ever actually checked the use with VimwikiDiaryGenerateLinks, so, I'm glad it's working with it ;)