Markdown Wiki to Pages?

I have been using Gitlab wiki to make a lot of important notes, and the markdown features have made it really easy and produce nice looking wiki pages.

Is there any possible, EASY way to move my wiki pages to HTML based pages? Or a way for pages to use direct easy Markdown editing as is the case in the wiki section?

https://astro.build/ allows you to build pages using markdown. Not sure whether that will be an option for you. With Gitlab pages, you can pretty much use any type of SSG (static site generator) so whichever one fits your requirements better that also allows generating from markdown.

A programmatic approach requires the GitLab API and

  1. Get the list of wiki pages
  2. Get their content (Markdown)
  3. Convert Markdown to HTML for deployment on GitLab Pages (in CI/CD)

An idea could be to automatically convert the wiki structure into a static site generator layout, e.g. MkDocs Material or Hugo, and then convert using the same methods to HTML and Pages.

An alternative approach is looking into how the GitLab Wiki is developed, Wikis development guidelines | GitLab - create or edit wiki pages locally and directly fetch the Git repository content, and convert Markdown using a static site generator.

Production examples with just MkDocs Material and local Markdown files are in

Maybe they are helpful to fork, and integrate the wiki conversion tasks into CI/CD. I cannot look deeper unfortunately - I have too many things going on at the moment.

2 Likes