Muliama's Diaries

I was able to make my wiki works

I've been talking about some problems I had while trying to create my personal wiki. These past few days I've been trying out different things to make all of this work. And in this post I will talk about the solutions I was able to find!

Renaming files in Vimwiki

When I was renaming a file with Vimwiki it was troublesome. I saw a message saying that all my links were renamed correctly. But when I saw a link of the file I renamed and clicked on it, it created a new file. The links were not updated at all.

I didn't understood why and that was terrible. Because that meant that I couldn't rename a file without manually updating all links in my wiki. That wasn't something I live with.

But I found the problem. The thing was that I was writing links with the wrong syntax. Let me explain.

Under here is the link format I was using. Aka how I wrote my links.

(1) [[this-is-a-link|Text]]

But the link format that Vimwiki expected wasn't this one. When I select text in Visual mode and type enter it create a link. Here is the link format that Vimwiki use when creating a new link.

(2) [Text](this-is-a-link)

Vimwiki recognized that (1) and (2) were links so I could use them both normally. But the problem was the part of the program that rename a file. It only recognized (2) as a link and only updated those with this format. And since I use (1) everywhere, it caused a lot of problems in my wiki.

So I just had to change my link format to solve the problem. Which I did and I am happy with the result!

Maybe there is a way to change the default link format of Vim. But I didn't find a thing about that. I don't think I'll change it in the future though. So it's fine.

I also had a problem with Eleventy. My links where not converted to the HTML format. That meant that none of my pages where linked together in my Website.

After looking around in the documentation, I found something that could help. An Eleventy plugin that was supposed to do exactly what I needed. It's the InputPath to URL plugin.

So I followed the instructions, I copied the code I pasted it to my eleventy.config.js file. Then I tried it out and it didn't worked.

But once again I had the same trouble that I had with Vimwiki. I was trying to solve this problem before the renaming problems. Because not having any links is worst than not being able to rename a file. But when I changed the link format, I just worked. It was also causing trouble with the plugin too.

The Amazing :h Vimwiki page

One day I received a mail from Matthew.1 He read my post about the problems I encountered while creating a wiki website. He gave me some advice which were really helpful! One of them was to checkout the help page of Vimwiki. You can do so by typing :h Vimwiki.

I read it a lot it was very useful! I found out about how to correctly use the Diary. I also learned about how to check for orphan files in Vimwiki. There was a lot of useful commands and shortcuts!

I also found out how to use the Omni Completion! If for example, I want to put a link to a file that I know is in my blog folder. But I don't remember the exact name. I can use the Omni Completion! I simply type <Ctrl-X><Ctrl-O> and the magic occurs. I get a list of every option I could complete the text with! Here is what it looks like.

Screenshot of Omni Completion in Vim

It's something that I will use a lot for sure! It can be useful for me to see the files I have. Or simply make sure that I correctly write a link!

Published my first site ever!

After all of that I finally had some HTML files. These form the very first version of my website! I'm quite happy that I was able to get through all of the problems!

It's just a website in plain HTML without any CSS. But I'm proud of what I was able to do! Even if it's not that impressive.

I even bought a domain name for it on porkbun!2


I hope that these solutions will maybe help someone else in the same case as me. I will surely do more detailed articles in the future about Vim and Eleventy. You can now check out my wiki here!

Thank you again Matthew for sending me a mail! It was truly useful!

Also thank you, reader, for reading my post!


  1. Thank you Matthew!

  2. Have you noticed that I bought one for my blog too?

#100DaysToOffload