We are building an extensive documentation centre that requires loading static files from the disk in particular programming languages, parsing those files and pick up bits of comments and parse them in YML to pick apart fields.
We’ve been fighting with Hugo to get Shortcode to provide that functionality but the closest we’ve got to is brittle regexes and they aren’t very good at this point.
So we are exploring writing these custom processors in Go. From various threads that I’ve seen, we can’t just create Go functions and expose them to Go Template or Markdown, and the general advise is to clone Hugo to add our custom functions;
Now a couple of questions;
- Is cloning Hugo what’s needed here? Do people generally do that, who have advanced(?) use cases like above? Can you provide example repos that we can use as inspiration?
- Does Hugo support Go Plugins (like Nakama) that we can write our custom Go functions as a plugin and not have to fork Hugo?
- Any other advise/comments/directions?