Github Wiki as post source

I am thinking about switching to Hugo. Currently I write my blog posts in a Github Wiki and use a plug-in for Jekyll I wrote that integrates the wiki repository into my site. How hard/easy would it be to do something like that with Hugo?

Perhaps I can be more specific about what would be needed to make this work. I think there are only two things:

  1. WikiWords, which are relative paths based on page name, e.g. [[Some Page]]. These need to be translated into links.
  2. Metadata in HTML comments. e.g.
      <!-- ---
      foo: bar

This keeps the metadata from showing up on the wiki page (where it would otherwise render horribly). Also, while not necessary but preferable, the metadata can be at the bottom of the page, instead of the top.

I don’t believe this is something that Hugo alone will be able to do for you. Unless I’m mistaken, you’ll need to write a tool to do the necessary conversions for you and put the resulting files within a structure Hugo understands.

The metadata will need to be converted into either TOML, YAML or JSON (see: Front Matter), and the wiki links will need to be converted into your desired format - Markdown by default, or potentially AsciiDoc / reStructuredText (see: Supported Formats).

You might be able to do something funky stemming from the GuessType function where Hugo ultimately calls out to an external command for AsciiDoc and reStructuredText formats. It would be interesting if there was better support for a pre-processor here - might be something for another discussion if there isn’t one already.

Thanks. That’s what I did and it worked. I still have to handle the WikiWords but that shouldn’t be too hard. The bigger problem I ran into is the known bug of empty index.html files. Haven’t found a solution for that.

I kind of just decided Hugo isn’t mature enough yet. I ran into various problems with different themes I tried.