This morning, I migrated my Tools in Data Science course page from Docsify to Hugo using Codex.
Why? Because Docsify was great for a single term. For multiple terms, archives became complex. I still could have made it work, but it felt like time to move towards a static site generator.
I don't know how Hugo or Go work. I didn't look at the code. I just gave Codex instructions and it did the rest.
This gives me a bit more confidence that educators can start creating their own course sites without needing coding or platforms. Soon, they might not be stuck to LMSs either - they can build their own.
Here are the prompts I used, along with Codex's responses, leading to two commits:
Generate a MIGRATION-PLAN.md for migrating this student course site from docsify to Hugo.
Currenty, this site uses docsify to render Markdown as HTML on the fly.
Create a setup.sh that generates a static version of the site under public/ using Hugo.
Use a popular, elegant, minimal Hugo theme of your choice. We want to retain the sidebar navigation, as well as the archives under 2025-01/, 2025-05/, 2025-09/, and more in the future.
Minimize the custom coding needed to achieve this.
Agent responseI’ll inspect the repository structure to map the current Docsify content layout, then I’ll create MIGRATION-PLAN.md and a setup.sh that builds a Hugo static site into public/ with minimal custom logic and preserved sidebar/archive organization.
I found the Docsify setup and the key files (index.html, root _sidebar.md, plus archive subfolders with their own _sidebar.md/README.md). Next I’ll inspect those files and then draft a migration plan plus an idempotent setup.sh that maps this structure into Hugo with minimal custom templates.
I have enough context to implement this cleanly. I’m now choosing a Hugo docs theme and validating its sidebar configuration model so setup.sh can auto-generate navigation from your existing _sidebar.md files with minimal maintenance for future archive terms.
I validated hugo-book and will use it because it gives a built-in left docs sidebar with minimal configuration. I’ll now implement setup.sh to generate a Hugo workspace from your existing markdown tree and build to public/, then add MIGRATION-PLAN.md describing the migration steps and rationale.
I’m about to add two files: setup.sh (idempotent Hugo build pipeline into public/) and MIGRATION-PLAN.md (phased migration plan, structure mapping, and rollout checks). I’ll keep the approach low-code by relying on Hugo Book’s built-in sidebar behavior and automatic archive folder discovery.
I’ve written both files and will quickly sanity-check them (including a dry run of setup.sh in this environment, which should currently fail early because hugo isn’t installed here).
I found one cleanup point: setup.sh checked for rsync even though it doesn’t use it. I’ll remove that extra dependency and then provide a concise summary of what was added.
Created both requested files:
MIGRATION-PLAN.mdsetup.shWhat I implemented:
hugo-book as the theme (popular, minimal, docs-style sidebar).setup.sh now:
.hugo-build/sitehugo-bookhugo.tomlcontent/README.md to _index.md (so /, /2025-01/, /2025-05/, /2025-09/ keep clean section URLs)_sidebar.mdstatic/public/Notes:
hugo is not installed in this environment (Error: missing required command 'hugo')../setup.sh
Files:
setup.shMIGRATION-PLAN.mdUse mise x hugo -- hugo and run and test it.
I’ll run setup.sh through mise x hugo -- so Hugo is available in PATH for the script, then verify the generated public/ output and key archive routes.
The first run failed because mise couldn’t write under ~/.cache/mise in this sandbox. I’ll rerun using a temporary cache directory and then validate the generated site.
mise x hugo -- hugo is installing the standard Hugo binary (not Extended), so the script’s Extended check fails. I’ll quickly check the available mise variants and use an Extended one to complete the test run.
mise does not expose an “extended” Hugo variant here. I’ll make setup.sh tolerant of standard Hugo (warn instead of hard-fail), then run it with mise x hugo -- and verify whether the build succeeds end-to-end.
The build failed exactly at SCSS compilation, so we do need Hugo Extended for hugo-book. I’m testing mise x hugo@extended -- hugo with temporary mise data/cache dirs to keep everything inside writable paths.
Found the issue: with mise, Extended is a separate tool named hugo-extended (not a variant of hugo). I’ll run using that to complete the test build.
Build now succeeds with Hugo Extended. I’m validating the generated public/ output, including root and archive routes plus sidebar links.
Ran and tested.
Results:
mise x hugo -- hugo versionhugo v0.153.3 ... (non-extended)mise x hugo -- ./setup.shTOCSS ... you need the extended version) because hugo-book requires Hugo Extended.mise x hugo-extended -- hugo versionhugo v0.155.2+extended ...mise x hugo-extended -- ./setup.shpublic/Pages 289, Static files 103, total ~1.6s.Validation checks passed:
public/index.html existspublic/2025-01/index.html existspublic/2025-05/index.html existspublic/2025-09/index.html existsmarks-dashboard and system-requirements.I also adjusted setup.sh so non-extended Hugo emits a warning instead of exiting immediately (setup.sh). The actual build still correctly fails later if the active theme needs Extended.
The sidebar for the home page should only contain the contains of _sidebar.md.
The sidebar for 2025-01/, 2025-05/, and 2025-09/ should only contain the contents of the respective folders' _sidebar.md.
Convert any links to images/ to an absolute link starting with /images/.
Re-run.
Agent responseI’ll update setup.sh to generate section-specific sidebars directly from each _sidebar.md (root and archive folders), override Hugo Book’s menu partial to use those sidebars, rewrite images/ links to /images/, then rebuild and verify the output.
I’m editing setup.sh now to: 1) normalize _sidebar.md into per-section sidebar files, 2) override Hugo Book’s menu partial to render only the correct sidebar by section, and 3) rewrite markdown links from images/ or ../images/ to /images/. Then I’ll rebuild and verify.
Implemented and re-ran with your requirements.
Changes made in setup.sh:
Sidebar behavior:
_sidebar.md files:
_sidebar.md2025-01/: 2025-01/_sidebar.md2025-05/: 2025-05/_sidebar.md2025-09/: 2025-09/_sidebar.md.hugo-build/site/layouts/_partials/docs/menu-filetree.html during build so:
_sidebar.md/2025-01/, /2025-05/, /2025-09/ use only their own folder sidebarLink normalization in sidebars:
.md links to Hugo-style paths (e.g. /foo/)http-requests to /http-requests/<style> lines from sidebarsImage link rewrite in content:
(images/... and (../images/... to (/images/... while copying content into Hugo.Re-run/test:
mise x hugo -- ./setup.sh still fails because hugo-book needs Extended Hugo (SCSS pipeline).XDG_CACHE_HOME=/tmp MISE_CACHE_DIR=/tmp/mise-cache MISE_DATA_DIR=/tmp/mise-data mise x hugo-extended -- ./setup.shpublic/ successfully.Verified output:
_sidebar.md entries (Jan 2026..., Marks Dashboard) in public/index.html.public/2025-01/index.html sidebar matches 2025-01/_sidebar.md only.public/2025-05/index.html sidebar matches 2025-05/_sidebar.md only.public/2025-09/index.html sidebar matches 2025-09/_sidebar.md only.src=/images/portal_notifications.webp in rendered pages.The Next and Previous buttons at the bottom should follow the _sidebar.md navigation order in each folder.
Add a dark/light mode toggle.
Add a GitHub action to deploy this to GitHub pages
I’ll extend the build so Hugo uses _sidebar.md order for page-to-page navigation, add an explicit dark/light toggle in the generated site, and create a GitHub Actions workflow that builds with Hugo Extended and deploys public/ to GitHub Pages.
I identified how Hugo Book computes prev/next today; I’m now overriding that partial to read an explicit per-sidebar navigation sequence so buttons follow _sidebar.md order exactly. I’ll also add a small injected toggle that switches BookTheme between light and dark at runtime.
I’m implementing three concrete updates now: generate sidebar-order data from _sidebar.md, override Hugo’s prev-next partial to use that order, and inject a real dark/light toggle using custom SCSS + a small script. After that I’ll add the Pages deployment workflow and run a full rebuild.
I’ve added the workflow and finished the setup.sh changes. Next I’m running a full build with Hugo Extended and validating: 1) prev/next order matches sidebar sequences, and 2) the theme toggle appears and works via injected script/CSS.
The rebuild now passes, and spot checks confirm: footer navigation follows sidebar order (e.g., marks-dashboard -> development-tools -> vscode for the Sep 2025 sequence), plus the dark/light toggle is present and persisted via local storage. I’ll do one final status check and summarize exact file changes.
Implemented all three requests and re-ran successfully.
What changed:
setup.sh
_sidebar.md into data/sidebar-nav.yaml.prev-next partial override so footer navigation follows _sidebar.md order._sidebar.md2025-01/, 2025-05/, 2025-09/ use their own _sidebar.mdlocalStorage (tds-theme)/images/.....github/workflows/deploy-pages.yml
main and manual dispatchpeaceiris/actions-hugo@v3)./setup.shpublic/actions/deploy-pages@v4Run/test performed:
XDG_CACHE_HOME=/tmp MISE_CACHE_DIR=/tmp/mise-cache MISE_DATA_DIR=/tmp/mise-data mise x hugo-extended -- ./setup.shsystem-requirements -> marks-dashboard -> development-tools -> vscode in Sep sequence).public/.Files:
setup.sh.github/workflows/deploy-pages.ymlIf you want, I can also add a short “Deploy” section to README.md with the exact GitHub Pages settings (Pages source = GitHub Actions).
Add an appropriate Unicode "icon" for the Dark/Light Mode toggle button
.gitignore public/ and any other files you create that should not be committed (if any).
Move MIGRATION-PLAN.md to .hugo-build
Commit
I’ll update the toggle label to include a Unicode icon, update .gitignore for generated artifacts (public/, .hugo-build/), move MIGRATION-PLAN.md into .hugo-build/, then commit only the migration-related files.
I’m applying the requested edits now: iconized toggle text plus ignore rules, then moving MIGRATION-PLAN.md under .hugo-build/. After that I’ll stage only the intended files and commit.
I’ve moved the migration plan and updated the scripts. I’ll run one quick rebuild to ensure the iconized toggle is reflected in output, then commit the exact files (setup.sh, workflow, .gitignore).
I’ve committed the requested changes. I’m doing a quick post-commit check to confirm .gitignore includes generated paths and that MIGRATION-PLAN.md now lives under .hugo-build/.
Done.
Committed as:
1dd73c6 Add Hugo sidebar-ordered nav, theme toggle icon, and Pages deploy workflowIncluded in commit:
.github/workflows/deploy-pages.yml.gitignoresetup.shAlso completed:
◐, ☀, ☾) in generated site via setup.sh.public/.hugo-build/MIGRATION-PLAN.md to:
.hugo-build/MIGRATION-PLAN.mdNote:
README.md modification and other untracked project files) in the commit.Don't implement it, but just tell me: what's the most elegant, minimal way (directory structure wise) to commit the files setup.sh creates, like hugo.toml, menu-filetree.html, head.html, etc? That way, setup.sh becomes smaller, cleaner, easier to read, and the other files are easier to edit.
Agent responseMost elegant minimal pattern: commit a tiny Hugo scaffold once, and let setup.sh only do content sync + build.
Use this structure in-repo:
hugo/
hugo.toml
layouts/
_partials/
docs/
menu-filetree.html
prev-next.html
inject/
head.html
menu-after.html
assets/
_custom.scss
data/
sidebar-nav.yaml # generated by setup.sh (or committed if static)
sidebars/
root.md # generated by setup.sh (or committed if static)
2025-01.md
2025-05.md
2025-09.md
Then setup.sh just:
.hugo-build/sitehugo/* into itdata/sidebar-nav.yaml, maybe sidebars/*.md)If you want even cleaner: keep theme as a Hugo module in hugo.toml and remove theme clone logic too.
What would the file and directory structure look like if we went the "even cleaner" route?
Agent response.
├── setup.sh
├── .github/
│ └── workflows/
│ └── deploy-pages.yml
├── hugo/
│ ├── hugo.toml # uses Hugo module import for hugo-book
│ ├── assets/
│ │ └── _custom.scss
│ ├── layouts/
│ │ └── _partials/
│ │ └── docs/
│ │ ├── menu-filetree.html
│ │ ├── prev-next.html
│ │ └── inject/
│ │ ├── head.html
│ │ └── menu-after.html
│ ├── archetypes/ # optional (if needed later)
│ └── static/ # optional fixed assets, favicon overrides, etc.
├── sidebars/ # source sidebar definitions (copied from docsify or edited directly)
│ ├── root.md
│ ├── 2025-01.md
│ ├── 2025-05.md
│ └── 2025-09.md
├── content-src/ # optional if you want an explicit input root (or use repo root)
│ └── ... markdown source ...
└── .hugo-build/ # build scratch (gitignored)
└── site/
├── content/ # generated by setup.sh
├── static/ # generated by setup.sh
└── data/
└── sidebar-nav.yaml # generated by setup.sh
Key point: with Hugo Modules, there is no committed themes/ directory and no git clone theme step in setup.sh.
I want the sidebars to stay where they are. Given this, what will be the only files that get committed?
Agent responseIf sidebars remain in-place (_sidebar.md, 2025-01/_sidebar.md, etc.), then only commit the Hugo scaffold and automation files:
setup.sh.github/workflows/deploy-pages.ymlhugo/hugo.tomlhugo/assets/_custom.scsshugo/layouts/_partials/docs/menu-filetree.htmlhugo/layouts/_partials/docs/prev-next.htmlhugo/layouts/_partials/docs/inject/head.htmlhugo/layouts/_partials/docs/inject/menu-after.html.gitignore updates (for public/, .hugo-build/)Everything else (public/, .hugo-build/, generated nav/sidebar data) stays uncommitted/generated at build time.
OK, implement that, run and test.
Agent responseI’m going to refactor to the committed Hugo scaffold layout now: move static template/config/style content into hugo/, shrink setup.sh to orchestration only, then run a full build and verify sidebar behavior, prev/next order, and theme toggle.
I confirmed go is not installed locally, so for the Hugo-module route I’ll also wire go into the workflow and test locally with mise x go hugo-extended -- ./setup.sh. I’m now creating committed scaffold files under hugo/ and rewriting setup.sh to just copy scaffold + generate dynamic sidebar data + build.
I’ve finished the refactor to committed scaffold files under hugo/. I’m now running a full build using mise x go hugo-extended -- ./setup.sh and then validating sidebar scoping, prev/next order, and toggle presence in generated HTML.
The first module-based run failed because Hugo Modules needs initialization in the temporary site (go.mod). I’ll add hugo mod init (and module fetch) inside setup.sh, then rerun the build and checks.
Implemented.
What changed:
Refactored to committed Hugo scaffold files under hugo/:
hugo/hugo.toml (Hugo Module import for github.com/alex-shpak/hugo-book)hugo/assets/_custom.scsshugo/layouts/_partials/docs/menu-filetree.htmlhugo/layouts/_partials/docs/prev-next.htmlhugo/layouts/_partials/docs/inject/head.htmlhugo/layouts/_partials/docs/inject/menu-after.htmlSimplified setup.sh:
hugo/ scaffold into .hugo-build/sitehugo mod init, hugo mod get -u)data/sidebar-nav.yaml from existing _sidebar.md files in-placeimages/ links to /images/public/Updated GitHub Pages workflow:
.github/workflows/deploy-pages.yml now sets up Go (actions/setup-go@v5) before Hugo Extended.Run/test:
XDG_CACHE_HOME=/tmp MISE_CACHE_DIR=/tmp/mise-cache MISE_DATA_DIR=/tmp/mise-data GOMODCACHE=/tmp/go-mod-cache GOPATH=/tmp/go-path mise x go hugo-extended -- ./setup.shPages: 289) and generated public/.Validated behavior after refactor:
2025-09 uses only its sidebar).Previous/Next still follows _sidebar.md order.◐, ☀, ☾) and persisted theme state.I have not made a new commit in this step.
Document what each section in setup.sh does and why. A future reader should not be confused. Also document any other sections you created in this session. Then commit.
Agent responseI’ll add clear section-level comments in setup.sh and concise purpose comments at the top of each newly added Hugo override/workflow file so a future maintainer can understand what exists and why, then I’ll commit those documentation-only changes.
I’m now adding maintainership-focused comments to every new/modified scaffold file (setup.sh, Hugo partials/config, SCSS, workflow), then I’ll run a quick build sanity check and commit.
I’ve added section-level documentation across setup.sh and all related scaffold/workflow files. I’ll run one build sanity check, then commit these documentation updates.
Done. I added documentation comments for maintainability across all migration files and committed.
Committed:
fabb96a Document Hugo migration scaffold and setup sectionsWhat I documented:
setup.sh
Hugo scaffold files under hugo/
hugo/hugo.toml: purpose and module/theme noteshugo/layouts/_partials/docs/menu-filetree.html: sidebar-selection rationalehugo/layouts/_partials/docs/prev-next.html: sidebar-order nav rationalehugo/layouts/_partials/docs/inject/head.html: no-flash theme apply notehugo/layouts/_partials/docs/inject/menu-after.html: toggle purpose notehugo/assets/_custom.scss: theme override and button styling notesWorkflow
.github/workflows/deploy-pages.yml: top-level comment explaining build/deploy flow via setup.sh.Validation run:
mise x go hugo-extended -- ./setup.shpublic/ generated).I made a few changes:
Now, when I visit /2025-09/ (or any other archive page) it shows me the sidebar correctly. But when I click on the next link, e.g. /system-requirements/ the sidebar becomes that of the root /_sidebar.md. I want to retain the sidebar for each course. So I guess the best way is to copy the content into 2025-09/ and 2025-05/ and 2025-01/ folders respectively. In the future, I will have other courses starting with 2026-_ or 2027-_ etc. It's safe to say that any folder with a 20YY-MM/ format is a course folder and should have its own sidebar.
Modify minimally and elegantly to handle this required.
Run and test. Commit as you go.
I understand: for any 20YY-MM/ course, navigation should stay inside that course context (/2025-09/...) so sidebar never falls back to root while moving through next/previous links. I’ll inspect the current setup.sh and generated scaffold, then patch minimally with dynamic course-folder handling and test end-to-end.
I’ve identified a minimal fix: detect all 20YY-MM course folders dynamically, generate course-prefixed sidebar links, and clone shared top-level markdown pages into each course path so navigation stays in-course. I’m applying that now to setup.sh plus the two Hugo partials.
I’ve patched dynamic course detection and course-prefixed navigation. Next I’m running a full build and verifying that /2025-09/ -> next -> /2025-09/system-requirements/ keeps the 2025-09 sidebar (and same for other courses).
Build and behavior checks passed for 2025-09, 2025-05, and 2025-01. I’m committing the minimal fix now (only setup.sh and the two sidebar/nav partials).
Implemented with minimal changes and committed.
Commit:
c54ec05 Keep course sidebar context across next/prev via dynamic course routesWhat changed:
setup.sh
20YY-MM pattern.2025-*)./2025-09/system-requirements/).data/sidebar-nav.yaml dynamically for root + all courses.hugo/layouts/_partials/docs/menu-filetree.html
^/20YY-MM/.hugo/layouts/_partials/docs/prev-next.html
Run and test:
mise x go hugo-extended -- ./setup.shpublic/2025-09/system-requirements/index.htmlpublic/2025-05/development-tools/index.htmlpublic/2025-01/development-tools/index.html/2025-09/ next link points to /2025-09/system-requirements//2025-09/system-requirements/ shows 2025-09 sidebar (not root)2025-05 and 2025-01.Ensure that:
Again, think about the most minimal, elegant, way to do this.
Agent responseI’ll make two small targeted changes: enrich generated sidebar-nav data with label text from _sidebar.md for accurate next/previous titles, and add a lightweight sidebar-active-link highlighter script so the current page is visibly selected. Then I’ll rebuild and verify.
I’m now updating the nav data format to store both path and human-readable title from _sidebar.md, then switching prev-next to use those titles. I’ll also add a tiny sidebar script for active-link highlighting with minimal CSS.
I’ve applied the minimal patches. I’ll now rebuild and verify two things in generated output: active sidebar class appears on the current page link, and next/previous labels use _sidebar.md titles (e.g. “System Requirements”, “Marks Dashboard”).
Build failed due a Hugo template type issue in prev-next (empty dict fields). I’m applying a safe guard in the template to only read path/title when present, then rerunning the build.
The rebuild now passes; next/previous titles are sourced from sidebar labels. I’ll commit these minimal updates (nav-title mapping + active-link highlighter) and summarize the exact behavior change.
Implemented minimally and committed.
Commit:
44ea7b6 Use sidebar labels for prev/next and highlight active sidebar linkWhat changed:
setup.sh
pathtitle (taken from _sidebar.md link text)hugo/layouts/_partials/docs/prev-next.html
{ path, title } entries.System Requirements, Marks Dashboard, 1. Development Tools) instead of derived filename titles.hugo/layouts/_partials/docs/inject/menu-after.html
active class and aria-current="page" to the current sidebar linkhugo/assets/_custom.scss
.book-menu-content a.active styling so current page is visibly highlighted.Run/test:
mise x go hugo-extended -- ./setup.sh/2025-09/system-requirements/ prev = Sep 2025: Tools in Data Science, next = Marks Dashboard/2025-09/marks-dashboard/ prev = System Requirements, next = 1. Development ToolsDo we really need go and hugo extended? Check if it can run without.
Agent responseI’ll run four quick matrix checks to isolate requirements: hugo only, go+hugo, hugo-extended only, and go+hugo-extended, then report exactly which dependency is truly required and why.
I’m waiting on the final success/failure output for the go + hugo-extended run to complete the matrix conclusively.
Short answer: with the current architecture, yes, both are required.
I ran checks:
hugo onlymise x hugo -- ./setup.shError: missing required command 'go'hugo-extended onlymise x hugo-extended -- ./setup.shmissing required command 'go'go + hugo (non-extended)mise x go hugo -- ./setup.shTOCSS ... need the extended version)So:
go is required because setup.sh uses Hugo Modules (hugo mod init/get) to fetch hugo-book.hugo-extended is required because hugo-book compiles SCSS (book.scss).If you want to drop one:
go: stop using Hugo Modules (vendor/submodule theme in repo).hugo-extended: use a theme without SCSS compilation (or precompiled CSS-only setup).How do I install hugo-extended?
Agent responseUse one of these.
mise (recommended in this repo):mise use -g hugo-extended@latest
hugo version
mise project-local:mise use hugo-extended@latest
hugo version
You should see +extended in the version output.
For this project’s build command:
mise x go hugo-extended -- ./setup.sh
I get this error:
❯ mise x go hugo-extended -- ./setup.sh
Start building sites …
hugo v0.155.2-d8c0dfccf72ab43db2b2bca1483a61c8660021d9+extended linux/amd64 BuildDate=2026-02-02T10:04:51Z VendorInfo=gohugoio
Total in 96 ms
ERROR error building site: render: [en v1.0.0 guest] failed to render pages: render of "/" failed: "/home/sanand/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/alex-shpak/hugo...@v0.0.0-20260108111751-81a841c92d62/layouts/baseof.html:63:5": execute of template failed: template: list.html:63:5: executing "footer" at <partial "docs/footer" .>: error calling partial: "/home/sanand/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/alex-shpak/hugo...@v0.0.0-20260108111751-81a841c92d62/layouts/_partials/docs/footer.html:24:3": execute of template failed: template: _partials/docs/footer.html:24:3: executing "_partials/docs/footer.html" at <partial "docs/prev-next" .>: error calling partial: "/home/sanand/code/tools-in-data-science-public/public/.hugo-build/site/layouts/_partials/docs/prev-next.html:16:16": execute of template failed: template: _partials/docs/prev-next.html:16:16: executing "_partials/docs/prev-next.html" at <$item.path>: can't evaluate field path in type interface {}
This error is from the prev-next template assuming every nav item is an object with path/title. I’ll patch it to gracefully handle both shapes ("string" and {path,title}), so stale/generated data won’t break builds, then I’ll test and give you the exact recovery commands.
hugo-extended is installed correctly. This error is a template/data mismatch, not an install issue.
Your prev-next.html expects nav items like:
- path: "/2025-09/system-requirements/"
title: "System Requirements"
But your current setup.sh is still generating plain strings:
- "/2025-09/system-requirements/"
So {{$item.path}} fails.
Fix
44ea7b6), or update setup.sh so write_sidebar_nav_yaml() writes both path and title.rm -rf .hugo-build public
.git):pwd
ls -la .git
mise x go hugo-extended -- ./setup.sh
If you want, I can give you a minimal patch for just write_sidebar_nav_yaml() and prev-next.html to make it robust even if old string-format data appears.
I'm in the right directory, with the .git. Here's what I get:
❯ rm -rf .hugo-build public
❯ mise x go hugo-extended -- ./setup.sh
Start building sites …
hugo v0.155.2-d8c0dfccf72ab43db2b2bca1483a61c8660021d9+extended linux/amd64 BuildDate=2026-02-02T10:04:51Z VendorInfo=gohugoio
Total in 2120 ms
ERROR error building site: render: [en v1.0.0 guest] failed to render pages: render of "/home/sanand/code/tools-in-data-science-public/.hugo-build/site/content/_index.md" failed: "/home/sanand/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/alex-shpak/hugo...@v0.0.0-20260108111751-81a841c92d62/layouts/baseof.html:63:5": execute of template failed: template: list.html:63:5: executing "footer" at <partial "docs/footer" .>: error calling partial: "/home/sanand/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/alex-shpak/hugo...@v0.0.0-20260108111751-81a841c92d62/layouts/_partials/docs/footer.html:24:3": execute of template failed: template: _partials/docs/footer.html:24:3: executing "_partials/docs/footer.html" at <partial "docs/prev-next" .>: error calling partial: "/home/sanand/code/tools-in-data-science-public/.hugo-build/site/layouts/_partials/docs/prev-next.html:16:16": execute of template failed: template: _partials/docs/prev-next.html:16:16: executing "_partials/docs/prev-next.html" at <$item.path>: can't evaluate field path in type interface {}
You’re right, thanks for sharing the exact trace. I’ll make prev-next.html backward-compatible so it works whether nav entries are strings or {path,title} objects, then you can rebuild without depending on one exact setup.sh data format.
I’ve patched the template to accept both data shapes. I’ll quickly run the build once to confirm the error is gone.
Good catch: Hugo evaluates index eagerly, so I rewrote it with explicit if branches to avoid indexing strings. I’ll rerun the build now.
There’s one more edge case: when no prev/next exists, the placeholder map produced a non-string path. I’m patching that guard now (isset checks before reading path/title) so empty edges don’t break rendering.
I’ve reproduced your exact error and fixed it by making prev-next.html robust to both nav data formats. I’m committing this as a small compatibility fix so you can cherry-pick or pull it cleanly.
You’re hitting a real compatibility bug, not an install issue.
Root cause:
prev-next template is reading item.path.can't evaluate field path in type interface {}.I fixed this by making prev-next.html support both:
"/2025-09/system-requirements/"){ path, title })Commit:
b856e7c Make prev/next template compatible with string and object nav entriesI also verified the build succeeds after this fix with:
mise x go hugo-extended -- ./setup.sh
What you should do:
hugo branch (or cherry-pick b856e7c).rm -rf .hugo-build public
mise x go hugo-extended -- ./setup.sh
If you want, I can also give you a one-command patch snippet to apply manually without pulling.