Making a wiki with vimWiki

I read through:

and the Hugo docs to try and figure out how to link .md Vimwiki documents together but I couldn’t seem to figure it out. In the wiki the files are linked to in any of the following ways…

  • [[name of wiki page]]
  • [name of link](name of wiki page)
  • [name of link](name of wiki

when I tried to replicate this cristianpb’s sh file for automating the process didn’t seem to work (I think he had some files that he doesn’t include) so I put the wiki files in the content folder under /posts/. However, the links would not work and only the wiki index page would render. If anyone has experience with this or some advice please let me know!

I have read the cristianpb’s post and I agree that there is a lack of information to understand the integration that he made with Hugo.

Perhaps the author of the post can give you a better answer:

Thank you for responding,

I saw that he has contact info but was unsure if he would be open to random people emailing / reaching out. I will give it a try !

1 Like


Markdown files should be placed in the content folder. All files in this folder are converted into html on the public folder when using the command hugo --config config.toml.

You can try to clone the project and use hugo --config config.toml to see if you obtain the same behaviour. Otherwise that would help me to see why it doesn’t work.

In order to get vimwiki working with hugo, you should add the configuration to vimrc file like here and be sure to have file.

1 Like

@CadeMichael, here is the answer from the author of the post you mentioned. :+1:

@cristianpb, thank you for taking the time to respond. :slightly_smiling_face:

thank you for your response!

I had a similar config and placed everything in the content folder (in the post subclass I believe) the main issue that I experienced was that the links were not working. So one content page would not link to the other. The only one that would render is the home page of the wiki, and all links on it were to 404. I half solved the issue by just using the vim wiki syntax and converting to html with their converter and hosting the pages as an extension of my website, which of course isn’t ideal (the formatting is very different from the main website) but works.

I’d like to join in to hammer out a real working solution to this problem. While I appreciate the input of cristianpb, and I do not doubt that he has made these tools work together for his own purposes, he simply has not given all the details of how to get a working solution.

The first thought that comes to mind for me, and what I’m trying to accomplish, is to start analyzing a working site to better understand how Hugo does what it does with Markdown files. I’ve managed to put together a local repo of the Docsy User Guide (which is smaller than the docsy-example site). I’ve then removed support for multiple languages from the config.toml file, and I plan to gradually remove any other stuff that turns out not to be necessary, so that I end up with a working site which has minimal configuration. That way I’ve got a better chance at wrapping my head around the problem at hand.

The first thing that I see I will have to reconcile is Hugo’s use of versus VimWiki’s use of (when you tell VimWiki to use Markdown syntax, which seems to me the path of least resistance).

Please, anyone who would like to join in and help us really get this working, feel free to do so. Once I have worked things out in my own wiki, I’ll publish a Hugo site with comprehensive instructions that anyone can follow, but of course at this time I don’t know what the hell I’m doing yet.

I cant remember where I found this snippet, but this is all I needed to add into the following file:

<a href="{{ .Destination }}" {{ with .Title }} title="{{ . }}"{{ end }} {{ if strings.HasPrefix .Destination "https" }} target="_blank"{{ end }}>{{ .Text }}</a>

1 Like

Ah, very interesting, pinchedave. I will certainly investigate this snippet and report back here as to what it does for me at my earliest opportunity.

That may not be real soon, as my personal life is in a state of upheaval at the moment. Nonetheless, I intend to follow up because I am not going to abandon Vimwiki and Hugo seems like the right tool for the job.

Stay tuned, and anyone who has more specific information, please share!

1 Like

hi all.

Any development on how to get a working solution?
Kind regards