Render specific page or specific section only

Hi, I’m Piper and new to Hugo. I’ve gone through the documentation and searched on the forum.

Is there a way to render just a specific page or a section through the cli?

Let’s say I have a blog and post rarely, on the homepage however, I pull in content which updates every hour. The rest of the site remains unchanged. I would like to render the homepage only (every hour) and publish it on my server (rsync).

The same could apply to specific sections, pages, or even categories and tags. Is there any good workaround?

You have to build different config files and use the --environment option to select it

you can use the ignoreFiles to unselect the not needed

Thank you for your answer @ju52. That solves my problem!

Since I know what kind of part I need to render at a time, I can call Hugo with the correct config-file. Makes totally sense.

By the way - as far as I looked up so far, there is no plan to implement incremental builds, right? I’ve read about some people who use hugo server for that, but I’m not sure if this is “production ready”, and probably not a good idea anyway, since the whole point is to have a static site.

I believe there are plans, especially as the feature-set builds up to supporting really huge (content-wise) sites. I’d check the GitHub issue queue for details. :slight_smile: