patrickdavey / vimwiki_markdown

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

Markdown directory links #4

Closed has2k1 closed 7 years ago

has2k1 commented 7 years ago

Directory links are not processed accurately.

For example,

[anchor-text](directory/)

creates a link to directory.html instead of a link to one of the following:

  1. directory/
  2. directory/index.html.

I think the second form is better since some browsers show a directory listing when pointed to a local directory root.

Thanks for this, it makes Vimwiki irresistible.

patrickdavey commented 7 years ago

Good catch :)

I'll make time for this in the next few weeks (will be busy over Christmas). If you want to send a Pull Request with the change (and a test to cover it) then that's also welcome.

However, I think that the directory link should go to directory/ not directory/index.html, there might be local links, it could be on a server running php ;) etc.

has2k1 commented 7 years ago

I had not considered the use-case explosion that happens when the HTML is served by a real server, and that it makes for a decent blog system.

Maybe taking a hint from the g:vimwiki_dir_link option would lead to the least surprises i.e. the same navigation in vim as in html, this would require the wiki link at the top of the "index" page to go up one-level. If that is not possible then directory/ is fine.

Sorry I cannot do a PR, as yet I do not know how to work my way around Ruby.