Breadcrumb
Site structure and navigation
This site uses Hugo and the hugo-brewm theme. Local templates, styles, content, and configuration override the theme where needed. The theme submodule stays pinned. This page documents the site’s main navigation, responsive layout, reusable data, search integration, and build checks.
Homepage and main navigation
The homepage uses a text logo so the site name does not require separate light and dark image assets. The main menu contains three entries:
Postsopens the article index.Aboutopens the introduction page.GitHubopens an external profile.
The homepage also contains a carousel with three selected starting points, the site introduction, and the latest posts. Category covers provide a second browsing surface. Keeping both the post feed and category navigation visible makes it possible to browse by recent updates or by subject.
The Recent Posts feed omits generated ZJU Growth month pages and any post marked hideFromRecent: true. Those pages remain available from the full archive.
The carousel was removed during an earlier cleanup, then restored with a narrower purpose. It now links to selected entry points instead of duplicating the complete navigation.
Theme variables and responsive behavior
The theme defines its light, dark, contrast, and palette values through CSS variables. The main variables used for page surfaces and text are --bg, --fg, --mid, and --ac. Changing the color scheme or contrast level updates these variables without creating a separate component stylesheet.
Typography is also inherited from the theme. Catalogue labels, dates, body text, and code blocks keep their existing hierarchy. Local styles use that hierarchy rather than introducing additional font families or card styles.
At narrow widths the page becomes a single column. The site name remains visible, the main menu moves behind the existing navigation control, and decorative images no longer compete with the article header. Content that only works on a wide screen is not placed in the mobile hero.
Footer content
Footer sections are stored as separate content files with:
type: footer
headless: true
This makes their bodies available to the footer without generating ordinary standalone pages. The current footer links to the larger Neuro-sama archive and to public profiles.
The main navigation remains short. Taxonomy pages and the post index handle subject browsing, while the search control handles direct lookup.
Pagefind search
Search is generated by Pagefind after Hugo writes the production site:
npm run build:search
The command runs pagefind --site public. Pages with type: post provide a data-pagefind-body region and are included in the index. The About page and utility pages stay out of it.
The search control is placed in the main navigation so it remains available while a reader is viewing a long article.
Comments
Article comments are disabled globally with site.Params.comments.disabled. The Links page loads its own Giscus component from the link-directory shortcode, so other articles do not display the comment section.
Giscus stores each page’s thread in a GitHub Discussion. It requires a public repository, Discussions enabled for that repository, and the Giscus GitHub App installed on the repository. The site uses pathname mapping and the General category.
Build verification
Use the following checks before publishing layout or navigation changes:
npm run check
npm run build
npm run check:links
These commands validate JavaScript and Hugo output, build the Pagefind index, and check internal links in the generated site.
- (Published)
- (Modified)
Some information might changes over time, we keep redaction up to date.