Best practice for preserving archive pages?

I have a simple site is keyed to the calendar and grows by 200-400 pages per year. Presently I’m at 2200 pages and it takes ten seconds to build.

I would prefer NOT to modify or update pages from previous years, though that often happens as I heavily leverage shortcodes and json data sources for content. Those shortcodes, some of which have significant decision trees, continue to evolve. Many of the pages look similar from year to year, but the finer details are always changing.

I would like to archive pages so that I can have:

  • the freedom to evolve shortcodes without worrying about distorting older pages
  • faster builds

Is there a preferred way to archive pages within my site so that they will not be rebuilt any more?

Could I, for example, copy sub-directories of the deployed (html) site into the static folder and link them from the relevant content page? Or perhaps I should keep separate repo’s for older years and somehow mount them into the current one?

The site in question can be found at GitHub - toddfoster/sharedprayers · GitHub

Thank you for any suggestions/observations!

Todd

Thats two topics:

  • build performance and segmentation

    Before going into partial builds with caching parts I would check template metrics if there are candidates for using partialCached. Check the time consuming/often called ones for code improvements.

    One approach maybe exclude the old pages (by year folders) from standard builds. cache the old segments and just build the one for the new pages

    Configure segments

  • versioning your layouts

    keep in mind, that that won’t help if you loose your rendered “caches” without some versioning. tag your repo and in case you loose your caches

    • versioning your shortcodes sc-v1, sc-v2
    • check for old pages in shortcode and ignore
    • implement a version guard in the shortcodes that calls different code
    • version your repo use tags to go back
      tag your repo and in case you loose your caches start rebuilding for each tag/segment.

tried to do a bare build after clone on wndows.

duplicate pagenames Capitalization

warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'content/archive/2023/Proper-19.md'
  'content/archive/2023/proper-19.md'
  'content/archive/2023/Proper-28.md'
  'content/archive/2023/proper-28.md'
  'content/archive/2024/Proper-14.md'
  'content/archive/2024/proper-14.md'
  'docs/images/qr/archive/2023/Proper-19.png'
  'docs/images/qr/archive/2023/proper-19.png'
  'docs/images/qr/archive/2023/Proper-28.png'
  'docs/images/qr/archive/2023/proper-28.png'
  'docs/images/qr/archive/2024/Proper-14.png'
  'docs/images/qr/archive/2024/proper-14.png'
  'static/images/qr/archive/2023/Proper-19.png'
  'static/images/qr/archive/2023/proper-19.png'
  'static/images/qr/archive/2023/Proper-28.png'
  'static/images/qr/archive/2023/proper-28.png'
  'static/images/qr/archive/2024/Proper-14.png'
  'static/images/qr/archive/2024/proper-14.png'

build errors with hugo 164.0

hugo
WARN  deprecated: project config key languageCode was deprecated in Hugo v0.158.0 and will be removed in a future release. Use locale instead.
Start building sites …
hugo v0.164.0-ce2470e7012b5ab5fc4e10ebe4027e9f8d9e00dc windows/amd64 BuildDate=2026-07-06T16:39:30Z VendorInfo=gohugoio

Total in 36151 ms
ERROR error building site: assemble: failed to create page from pageMetaSource /archive/2021/he-covid-augustinearchbishop: "C:\_repos\github\clone\topic-57468-archive\content\archive\2021\he-covid-augustinearchbishop.md:5:1": [4:1] mapping key "title" already defined at [1:1]
   1 | title: Holy Eucharist, Rite II (Augustine, First Archbishop of Canterbury)
   2 | date: 2021-05-26
   3 | lectionaryyear: b
>  4 | title: "Holy Eucharist for Augustine, First Archbishop of Canterbury, 605"
       ^
   5 | bcppage: 355ff.