docs(blocks): add numbered split layout example for approach - #131
Merged
Conversation
Document the mod-blocks approach component's new opt-in arguments (gethinode/mod-blocks#181): layout: split renders the heading beside a vertically stacked element list instead of the card grid, and numbered: true auto-numbers elements with a digit badge resolved through the site's configured Font Awesome family. Follows the same per-variant subsection pattern used for the articles block's magazine layout example (commit 2e86551): a short prose intro plus a fenced example-bookshop block, placed before the Arguments section. The exampleSite here only mounts mod-docs' layouts (not its content or data), so it never renders content/blocks/*.md and can't exercise this example live; pnpm test (the exampleSite build) and pnpm run lint:markdown both pass, and lint:markdown reports zero new issues introduced by this change (21 pre-existing issues remain in unrelated files: preview.md, testimonials.md, components/ testimonial.md — not gated by CI, which only runs pnpm test). Does not depend on a release: mod-blocks#181 is still open, and this docs change is intentionally left unpushed until it ships. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Update the approach block's numbered split-layout example to give each element an explicit icon (1-circle/2-circle/3-circle, the same set already used in this page's default example) rather than relying on the bare-digit fallback. Follows the mod-blocks fix that makes numbered: true prefer an element's own icon over the auto-digit fallback, and documents why: the digit fallback only shows a glyph when the resolved icon family ships plain digit names (Font Awesome does; Bootstrap Icons does not, hence the explicit icons here). Re-verified via the hinode exampleSite harness (same read-only scaffolding + full-revert discipline as the prior smoke test, this time replacing both mod-docs and mod-blocks to their local unpushed worktrees): the rendered page now shows real bi-1-circle/bi-2-circle/ bi-3-circle glyphs inside the approach-number badges, confirming the docs example works correctly on hinode's own bi-default site. pnpm run lint:markdown clean on this file (21 pre-existing issues remain in unrelated files, unchanged). pnpm build clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
🎉 This PR is included in version 1.15.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the
approachBookshop component's new opt-in arguments, shipped in gethinode/mod-blocks v2.3.0 (PR #181):layout: "split"— renders the heading in a left column with the elements as a vertically stacked list on the right (50-50 onmd+, stacked on mobile), instead of the card grid.numbered: true— auto-numbers elements with a digit badge instead of a per-element icon; the digit is resolved through the site's configured Font Awesome family (site.Params.modules.fontawesome.defaultFamily).Adds a new
### Numbered split layoutsubsection tocontent/blocks/approach.md, combining both arguments in one example, following the same per-variant pattern already used for the articles block'slayout: magazineexample (commit2e86551): short prose intro + a fenced{{< example-bookshop lang="bookshop" >}}block, placed before## Arguments.Smoke-test evidence
mod-docs' ownexampleSitedeliberately does not mountcontent/blocks/*.md(it only imports this module'slayouts/dist, notcontent/data— confirmed by inspectingexampleSite/hugo.toml), so it can't render this example live. Per review feedback, I smoke-tested against gethinode/hinode's ownexampleSite, which does importmod-docswith content mounted atcontent/docsalongsidemod-blocks/v2:exampleSite/go.modwith areplaceto this branch's worktree and bumpedmod-blocks/v2tov2.3.0, built withhugo --gc --minify -s exampleSite, then reverted every change (git statusclean, nothing left behind — this was a read-only smoke test of a shared checkout)./en/docs/blocks/approach/page contains the intended split-layout markup:approach-steps/approach-step/approach-numberclasses present, heading correctly split into the left column with thedisplay-5/text-start mb-0treatment.One real finding, not a docs bug: on hinode's own exampleSite,
defaultFamilyis configured to"bi"(Bootstrap Icons) — a realistic, already-live site configuration. Bootstrap Icons has no bare digit icon names (only compound ones like1-circle/1-square), so thenumbereddigit glyph resolves toassets/svgs/bi/1.svgand similar, which don't exist, leaving theapproach-numbercircle empty (Hugo logsCannot find icon: assets/svgs/bi/1.svgetc.). This is amod-blockscomponent defect (the bare-digit-name design assumes every icon family ships plain numeric glyphs, which isn't true for Bootstrap Icons), not something this docs page can paper over — the example demonstrates correct, minimal component syntax. Reported separately for amod-blocksfollow-up; not fixed here per review guidance (docs changes shouldn't silently work around upstream component bugs).Verification
pnpm run lint:markdown— zero new issues from this change (21 pre-existing issues remain in three unrelated files:preview.md,testimonials.md,components/testimonial.md; confirmed identical on a cleanmaincheckout, not introduced here).pnpm run lint:stylespasses trivially (no SCSS touched).pnpm run build(hugo --gc --minify -s exampleSite) clean, 0 errors (unaffected by this content change, sincecontent/blocks/*.mdisn't part of this repo's own exampleSite build scope — see above).pre-commit(pnpm test) andcommit-msg(commitlint) both passed on commit.🤖 Generated with Claude Code