Multiple blogs from a single source folder

I recently started playing with Hugo a bit more seriously than my first look a year or so ago. I’m totally impressed and intend to push forward with Hugo!

My 2 (related) questions:

  1. I desire to publish multiple blogs but would like to maintain a single source (i.e. “ssot”) on my computer’s storage for centralized management and (especially) historical archiving.

The way I visualize this is to symlink such a “content” folder into each Hugo site’s content folder.

The key issue, however, is that I only wish to publish some of the “master” content in each blog (although my “personal” site will have every post).

At first look it seems I could do this with some variation of:
ignoreFiles = [ “\.foo$”, “\.boo$” ]
and come up with a clever file naming scheme (i.e.,, . . . etc.).

Unfortunately, this seems to have two significant downsides: 1. it would make management cumbersome (particularly if I want to later add a post to a second blog – would require changing the filename) and 2. this would likely affect URLs (and if so, “permanent” links if the URL changes because I decide I want the post later published to a different set of blogs)

Therefore, is there a way to have Hugo publish/not publish based on a user-defined variable in the front matter?

On each post (in the “single source” folder described above) I envision a field like
publish_on: [individual variables like: ALL, blog1, blog2, blog3 … or a list like: blog1, blog2]

and then each individual site’s config.toml would specify which posts to publish (i.e. posts with front matter marked publish_on: blog1 or publish_on: blog2, etc.)

  1. if the above is achievable, is it possible to ALSO publish files from the site’s actual content directory? It is expected one of the sites will have multiple content editors, and content written by other parties should (ideally) not be stored on my personal machine but in a folder of the server I will make available for such a joint project.

Conceptually, generation of this site would include all posts within the site’s content folder and those posts in my simlinked “single source” marked with the correct publish_on: front matter variable.

Sorry I I overlooked something available in the documentation [nothing jumped out except the cumbersone (for this application) “ignoreFiles”].

Thanks in advance for any insights!


I haven’t read your entire post, but I suggest you look into Hugo’s file mounts (pretty powerful) and maybe also the modules feature. Use the search in docs.