Skip to content

Carry #214 and #121#258

Merged
dmcgowan merged 21 commits intocontainerd:mainfrom
samuelkarp:documentation
Mar 23, 2026
Merged

Carry #214 and #121#258
dmcgowan merged 21 commits intocontainerd:mainfrom
samuelkarp:documentation

Conversation

@samuelkarp
Copy link
Copy Markdown
Member

@samuelkarp samuelkarp commented Mar 20, 2026

I've refreshed the attempts in #214 and #121 for automated documentation imports into the website. Some notable improvements:

  • Updated to cover the active release branches (though if we want to include inactive ones like 2.0, we could do that too) and main (though if we want to exclude main that's also reasonable)
  • GitHub Actions workflow will generate a PR to sync the docs as they change
  • Did a bunch of work to make sure that the left navigation has sensible titles while not requiring a huge amount of maintenance from us
  • Fixed the URLs to not have a redundant /docs fragment and also not put it in a v<branch>.x sandwich (which looked like vmain.x for main)
  • Tried to address visual quirks of the original layouts: narrow navigation on the sides, line spacing issues, etc. This was all AI generated as I am not an expert in CSS.

There still seems to be an issue with some embedded images which I plan to fix. This is fixed now.

@samuelkarp samuelkarp force-pushed the documentation branch 3 times, most recently from 8bfa7b2 to 52636b5 Compare March 20, 2026 22:28
Kazuyoshi Kato and others added 20 commits March 20, 2026 15:45
This commit incorporates unaddressed PR feedback from chalin, akhilerm,
and AkihiroSuda. It includes:
- Adding a 302 redirect for /docs/latest to the newest docs (v2.2.x)
- Dynamically linking the /docs/latest endpoint on the homepage
- Bumping actions/checkout from v3 to v4
- Restoring yarn.lock against origin/main and deleting spurious
  package-lock.json

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
This commit drops the unsupported containerd1.6 submodule and adds
tracking for the 2.1, 2.2, and main branches.

This also fixes a bug in tools/refresh-docs.sh parsing branch names.

Tested by manually executing tools/refresh-docs.sh and verifying
the generated paths locally with Hugo.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
Renamed submodule checkouts to use hyphens between the 'containerd'
prefix and the target branch name.

Also amends the 'tools/refresh-docs.sh' regex extraction pipeline
to explicitly parse against the newly hyphenated pathnames, ensuring
the 'X_VER' variable correctly evaluates to valid semver fragments
('1.7' vs '-1.7') during automated documentation generation loops.

Additionally injects a 'git submodule sync' command into the refresh
script ahead of 'git submodule update', which completely guarantees
that local developer repositories pulling this layout change will
dynamically remap their internal git module architectures to the
new paths without hard-crashing.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
The 'historical/' docs are not current documentation and should not be
used to generate pages on the website.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
The automated documentation synchronization bash script previously
dynamically embedded an extra '/docs' internal directory layer when
compiling submodules, alongside enforcing strict 'v' prefixes and
trailing '.x' suffixes on layout paths (e.g. '/docs/vmain.x/docs/').

This commit simplifies the mapping logic:
- Eliminates the redundant internal directory replication.
- Drops the 'v' and '.x' formatting buffers from dynamically scraped paths.

This shifts the live documentation routes to a uniform
'/docs/{VERSION}/[topic]' pattern, such as '/docs/main/getting-started/'.
Internal Hugo shortcode layouts parsing active versions were also updated
from older regex scrapers to raw split directives to support the flatter namespace.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
Documentation folder names and page names are derived from the raw
source files, but need to be adjusted for presentation. Words are
separated, title-cased, and given overrides for specific capitalization.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
The attribute `class="container margin-top: 50px"` translates
to invalid individual classes that lack any CSS binding resulting
in the docs page squeezing against the hero element. This replaces
it evenly across list/single layouts with Bulma's standard `mt-5`
top margin spacing ruleset.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
Abstracts the deeply-nested raw `<style>` tags and inline JavaScript
`onclick` event listeners from the documentation sidebar HTML partials
and correctly ports them into standard SASS properties and `app.js`
global JQuery listeners.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
Fixes an issue where the Docs and Contents dropdown toggles
rendered as stacked block-level elements forcing mobile users
to scroll past significant UI clutter before seeing markdown.
This bundles them natively inside a Bulma `buttons` flex group
so they sit horizontally aligned. Also patches a `drodown-trigger`
typo on the TOC button container.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
Instead of executing a 'replaceRE' regex across the entirety of the
rendered Content chunk (which unintentionally destroys literal mentions
of '.md' like inside codeblocks), this utilizes Hugo's
'_default/_markup/render-link.html' hook to strip the trailing '.md'
extensions from the parsed Markdown anchor destinations without touching
the text bodies.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
When items in the left navigation menu possess longer words that exceed
the horizontal block width (such as 'Architecture' or 'Snapshotters' within
deeply nested tiers), the CSS block-level wrapping automatically shunts the entire
string down onto a new line, stranding the inline-block bullet on the first line.

This updates the SASS configuration to render the nested menu list items as
flex containers to ensure the bullet explicitly flex-shrinks alongside
the baseline item text, enabling longer strings to wrap natively alongside it.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
The right TOC sidebar and left navigation sidebar were both crunched due
to the center main reading article being locked at two-thirds width
(columns is-two-thirds), forcing both sidebars to only ~16% width each.

This commit grants the main reading column a middle ground 58.3%
max-width (is-7), which allows the sidebars to take a breathable 20.8%
each while keeping the main reading body pleasantly wide.

Additionally resolving the visual bleeding glitch on inline <code> tags
by replacing the absolute 100% line-height ceiling in the TOC list with
a fluid 1.4 baseline.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
Previously, the sidebar recursively outputted a '<ul>' wrapper beneath
every single node just in case children needed to render inside it.
If the user navigated to a terminal leaf node (like docs/cri/config/),
that node received the '.active' class, which universally applies
'display: block' CSS to its immediate '<ul>' child to uncollapse the
tree.

However, since 'config' has no children, this inadvertently
block-displayed a completely empty '<ul>' element directly beneath it,
casting invisible padding/margins that forced the next menu item
downwards.

This explicitly gates '<ul>' emission so it's only printed to the DOM
if the node actively has length greater than zero pages, completely
eliminating ghost spacing on active leaves.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
By default, the Bulma '.menu-list ul' target injects .75em top and
bottom margins onto every unordered list generated within a menu layout.
When a nested menu folder branch was toggled active (uncollapsing its
inner '<ul>' to reveal children pages like 'Architecture'), these
vertical margins created visible blank spaces stranding the parent 'CRI'
folder artifically far above its first element, and pushing subsequent
siblings too far below its last.

This commit zeroes the top and bottom margins specifically for
'.nestedmenu' sub-lists, connecting expanded parent tags flush against
their newly uncollapsed documentation hierarchy.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
Previously, because the 'refresh-docs.sh' script dynamically inserts
a blank '_index.md' file into every synchronized subdirectory to appease
Hugo's internal section generation loop, navigating to a structural
parent route organically (e.g. '/docs/main/cri/') produced a fully
barren article layout.

This commit modifies the core 'list.html' document layout to intercept
empty '.Content' payloads directly. If a user hits an empty index route,
it creates a bulleted 'Navigation' list iterating across all of its
available child subsections ('.Pages').

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
The mobile navigation matrix ('dropdown.html') and parts of the desktop
sidebar explicitly referenced the '.CurrentSection.Path' object method to
build iteration arrays for rendering child nodes. While supported in newer
local builds (Hugo 0.123+), this method throws a silent 'nil' evaluation
in Hugo 0.116 (used natively by Netlify deploying preview environments).
This caused the mobile drop-down 'where' loop to crash immediately, leaving
only the hardcoded 'Docs Home' and 'README' fallback buttons visible.

We've removed the unused variable entirely from 'sidebar.html' and fully
migrated the regex lookup in 'dropdown.html' to target the globally
supported '.RelPermalink' string attribute.

Because the mobile dropdown navigation collapses the entire site
structure into a standalone flat alphabetical array, deeply nested
component pages like 'user-namespaces/README.md' or
'snapshotters/erofs.md' simply display their native short titles
('README' or 'erofs') detached from their logical categories.

This commit updates the mobile menu generator to explicitly detect when
an iterated leaf node resides inside a nested subdirectory (via
evaluating its section root) and injects its parent's formatted title
as an explicit 'Parent: Node' prefix, restoring the contextual parity
that exists in the desktop sidebar index.

Assisted-by: gemini-3.1-pro-high
Signed-off-by: Samuel Karp <[email protected]>
@dmcgowan dmcgowan merged commit 43fd2dd into containerd:main Mar 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants