HUGO

Virtual file system

Currently, Hugo builds pages from content in the content/ directory on the local file system. However, I noticed it relies on Afero functions, which support a virtual file system, and I was wondering if there was a documented way to make it read from a non-filesystem source (eg a CMS database) by writing some form of adapter.

Interesting. I was thinking among the lines mentioned by @bep , from the same discovery of Gatsby using a VFS
" A person in another thread mentioned GatsbyJS’s create-source-plugin.

I don’t think their approach of emulating the file system is a good match for Hugo, but I’m more curious about how they pull in data."

I’m curious why it wouldn’t be a good match for Hugo, since it walks the content subtree: superficially, it seems any plugin exposing a similary subtree of content could be walkable and ingested to generated content. FWIW, there was a demo about this (with Gatsby) at DrupalCon Amsterdam (yes, I’m thinking of Drupal sources), demonstrating live preview in Gatsby from a Drupal site: https://www.youtube.com/watch?v=YDFRsEJLXxo