Page MenuHomeFreeBSD

website: Don't build old release docs DRAFT
Needs ReviewPublic

Authored by ziaee on Jun 23 2026, 4:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 13, 1:41 AM
Unknown Object (File)
Tue, Aug 11, 11:10 PM
Unknown Object (File)
Tue, Aug 11, 11:10 PM
Unknown Object (File)
Sun, Aug 9, 1:26 AM
Unknown Object (File)
Wed, Aug 5, 10:17 PM
Unknown Object (File)
Mon, Aug 3, 2:00 PM
Unknown Object (File)
Mon, Aug 3, 1:59 PM
Unknown Object (File)
Mon, Aug 3, 1:27 PM

Details

Reviewers
andrew
Group Reviewers
docs
doceng
releng
clusteradm
Summary

Add a new environment variable WITHOUT_OLD_RELNOTES which will build
the website without building unsupported release notes. This buils the
website in under one second on my laptop, down from several minutes.

Thanks to @markj for helping me profile this, @cperciva for suggesting
it should be a make variable, and @carlavilla for helping me work out
the details.

Unresolved:

  • is quick.toml the right name for this?
  • should we bring back the config directory to put both of the tomls?
  • i need to document this in build.7, note the website is not in the FDP

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74368
Build 71251: arc lint + arc unit

Event Timeline

ziaee requested review of this revision.Jun 23 2026, 4:36 AM

If you do this. Will be impossible to change the theme in the future

  1. i have no idea if this is a reasonable solution
  2. it will be possible because all the source is still where it was originally, just building it is not done by default.

my friend who is better at hugo thinks we might want to investigate using segments instead to do the same thing?

As said in IRC: adding all these files (which will never change, except if we change the stylesheet/theme) will duplicate these when using hugo build in public before the deployment. Maybe having a separate hugo instance just for these (oldrelnotes.freebsd.org) and references these?

As said in IRC: adding all these files (which will never change, except if we change the stylesheet/theme) will duplicate these when using hugo build in public before the deployment.

The lines added to hugo.toml ensure this will not be the case. They will not get rebuilt unless we manually choose to do so, and we always can trivially since everything is still there.

Maybe having a separate hugo instance just for these (oldrelnotes.freebsd.org) and references these?

I do not want to do this because this introduces a separate change with greater complexity and puts the burden on clusteradm . This implementation leaves everything where it is in the source, and also crucially leaves everything where it is on the website.

ziaee added a subscriber: cperciva.

After discussing this with @cperciva, I would like to pursue an alternate course of action where instead of using mounts, i use segments, then we use a build knob like -WITH-UNSUPPORTED-RELNOTES if we want that.

Hello,

I've been looking into this.
I think the simplest solution would be:

In the Makefile, inside the run-local target, add another configuration file, like "hugo.dev.toml" or "hugo.local.toml"
And inside this new file put this:

ignoreFiles = [

"\\.po$",
"/releases/([1-9]|1[0-2])\\.",
"/releases/13\\.[0-4]",

]

What do you think?

I should also mention that I've looked at the segments and partial caches[1], and compilation time hasn't improved.

[1] https://gohugo.io/troubleshooting/performance/#cache-potential

Hello,

I've been looking into this.
I think the simplest solution would be:

In the Makefile, inside the run-local target, add another configuration file, like "hugo.dev.toml" or "hugo.local.toml"
And inside this new file put this:

ignoreFiles = [

"\\.po$",
"/releases/([1-9]|1[0-2])\\.",
"/releases/13\\.[0-4]",

]

What do you think?

That's what I did initially, but ignoreFiles is deprecated and will be removed soon. The new syntax is:

[module]
  [[module.mounts]]
    files = [ "!","en/releases/!(calendar.ics|feed.xml|index.html|14.3R|15.0R|14.4R|15.1R|14.5R)/**" ]
    source = "content"
    target = "content"

Which is what I did in this draft. Actually, that's the whole thing. The rest of the diff is just staging the pre-built relnotes in website/static/releases/.

Sorry, I cannot see the file coz it's too long.

About the use of:

[module]

[[module.mounts]]
  files = [ "!","en/releases/!(calendar.ics|feed.xml|index.html|14.3R|15.0R|14.4R|15.1R|14.5R)/**" ]
  source = "content"
  target = "content"

It's ok, but I get the point of this to local compilations. I think we can put this in a new .toml and use for local env
But what I don't like is to put the HTML in website/static/releases/
If we ignore old releases in our local environments, we will save a lot of time, and if someone, for some reason wants to build an old release file, they will be able

I think we can put this in a new .toml and use for local env

Yes, that is the planned change, and then a makefile knob to trigger it.

My apologies then.
Can you upload again the diff with only these changes?
I want to test it in my machine.

I tried to download the diff and my laptop said goodbye 🫣

ziaee added a subscriber: markj.
website/Makefile
114

BTW I don't understand why this part is needed.

website/Makefile
114

For the cluster

is quick.toml the right name for this? -> TBH, I think no :D, maybe we can find another name
should we bring back the config directory to put both of the tomls? -> hmmm, maybe yes

website/Makefile
51

Is this the right default? That is, should the default be to /not/ build old relnotes? Users won't know to set this unless they look at the makefile.