Skip to content

chore(layouts): remove unused partials, shortcodes, and layouts - #1410

Merged
sarajkrishnasingh merged 2 commits into
layer5io:masterfrom
AbhiramDhanvi:fix/remove-unused-layouts
Dec 5, 2026
Merged

sarajkrishnasingh merged 2 commits into
layer5io:masterfrom
AbhiramDhanvi:fix/remove-unused-layouts

Conversation

@AbhiramDhanvi

@AbhiramDhanvi AbhiramDhanvi commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Notes for Reviewers

This PR fixes #1169.

  • Removed layouts/partials/plan-info.html. No page sets plan: in its front matter, so it was unused. Also removed the four {{ with .Params.plan }} blocks that depended on it, in layouts/_default/content.html, layouts/docs/list.html, layouts/docs/rest-apis.html and layouts/video/list.html.
  • Removed other unused partials, shortcodes and layouts: navbar-version-selector.html, rest-apis/tag-subsection-meta.html, local-video.html, svg.html, version.html, release/single.html and _default/list.html.
  • Kept layouts/partials/search-input.html, because Docsy's sidebar-tree.html still uses it at build time. Also kept layouts/video/list.html and video-section-index.html.
  • Tested with hugo --templateMetrics, npm run build, npm run build:production and npm test.

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

  • Changes
    • Removed subscription plan information callouts from documentation and video pages.
    • Removed the site’s version-selection dropdown.
    • Removed built-in options for embedding local videos and SVG icons, and for displaying version-styled text.
    • Removed API tag subsection metadata formatting.
    • Some page types no longer use their previous dedicated layouts, which may affect how related content is displayed.

…r5io#1169)

Signed-off-by: Abhiram Dhanvi <abhiramcr2726@gmail.com>
Copilot AI balanced review requested due to automatic review settings December 5, 2026 08:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request removes plan callouts and several layouts, partials, and shortcodes. It also updates a specification to remove svg from its list of Hugo shortcodes.

Changes: Template and shortcode cleanup

Layer / File(s) Summary
Remove plan callouts
layouts/_default/content.html, layouts/docs/list.html, layouts/docs/rest-apis.html, layouts/video/list.html, layouts/partials/plan-info.html
The layouts no longer invoke the plan callout. The plan-info.html partial is deleted.
Remove page templates and partials
layouts/_default/list.html, layouts/release/single.html, layouts/partials/navbar-version-selector.html, layouts/partials/rest-apis/tag-subsection-meta.html
The default list and release single templates are deleted, along with the navbar version selector and REST API tag metadata partial.
Remove shortcodes
layouts/shortcodes/local-video.html, layouts/shortcodes/svg.html, layouts/shortcodes/version.html, docs/superpowers/specs/2026-04-28-five-narrative-design.md
The local-video, svg, and version shortcodes are deleted. The specification no longer lists svg as a shortcode.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: leecalcote

Merge Risk: Minimal · up to 91673

This is a cleanup that removes unused templates and the plan callout blocks. No concrete user-facing risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: removing unused Hugo partials, shortcodes, and layouts. The raw summary shows deleted partials (plan-info.html, navbar-version-selector.html, tag-subsection-meta.html)…
Linked Issues check Passed Issue #1169 asks to identify and remove unused partials and templates. Its only example is layouts/partials/plan-info.html. The PR deletes that partial and the four {{ with .Params.plan }} blocks …
Out of Scope Changes check Passed All code changes are deletions of unused templates, partials, and shortcodes, or deletions of the .Params.plan blocks that call the deleted plan-info.html partial. Those block removals are require…
Full details: Title check

Explanation

The title names the main change: removing unused Hugo partials, shortcodes, and layouts. The raw summary shows deleted partials (plan-info.html, navbar-version-selector.html, tag-subsection-meta.html), deleted shortcodes (local-video.html, svg.html, version.html), and deleted layouts (_default/list.html, release/single.html), plus removed plan conditionals in several templates. The linked issue #1169 and the PR objectives describe the same cleanup. The title is concise, uses the conventional commit format, and avoids vague wording.

Full details: Linked Issues check

Explanation

Issue #1169 asks to identify and remove unused partials and templates. Its only example is layouts/partials/plan-info.html. The PR deletes that partial and the four {{ with .Params.plan }} blocks that call it, in layouts/_default/content.html, layouts/docs/list.html, layouts/docs/rest-apis.html, and layouts/video/list.html. The PR also deletes navbar-version-selector.html, rest-apis/tag-subsection-meta.html, local-video.html, svg.html, version.html, release/single.html, and _default/list.html. It keeps search-input.html, video/list.html, and video-section-index.html, and gives a reason for each kept file. The issue has no other coding requirement. No automated test is requested. The unused status of each deleted file rests on the author's statement. The available tools cannot search page content or front matter, so this was not independently verified. The incremental change since the previous review updates only the narrative spec in docs/superpowers/specs/2026-04-28-five-narrative-design.md, which removes the deleted svg shortcode from a constraints list. This does not change the requirement assessment.

Full details: Out of Scope Changes check

Explanation

All code changes are deletions of unused templates, partials, and shortcodes, or deletions of the .Params.plan blocks that call the deleted plan-info.html partial. Those block removals are required by the partial deletion. The incremental change edits the design spec docs/superpowers/specs/2026-04-28-five-narrative-design.md to drop the removed svg shortcode from its constraints list. The commit message states this as a follow-up that keeps documentation aligned with the removal. Documentation that supports the removal is within the PR objective. The PR adds no new behavior and no unrelated edits. The summary reports no changes to exported or public declarations. Not verified: the author's claim that no content page uses the deleted shortcodes or layouts. The tools cannot search content, so this claim remains unconfirmed.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a8f4319d-f55c-4253-aaae-72ddda38106b
Commits

Reviewing files that changed from the base of the PR and between 7fcd654 and 9167385.

Files selected for processing: 1

  • docs/superpowers/specs/2026-04-28-five-narrative-design.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview deployment: https://docs.layer5.io/pr-preview/pr-1410/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

@sarajkrishnasingh sarajkrishnasingh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup for #1169, thanks for picking this up. The change is exactly scoped: 0 additions and 127 deletions across 12 files, with the plan-info call sites removed together with the partial so nothing dangles. Good judgment keeping search-input.html because Docsy's sidebar-tree still uses it at build time, and keeping the video list layout. I checked that no content page actually invokes the removed shortcodes, and the build, DCO and CodeRabbit checks are all green. No test coverage is needed for a docs-only removal, and you already verified with hugo --templateMetrics plus both production builds and npm test.

One small follow-up: docs/superpowers/specs/2026-04-28-five-narrative-design.md line 198 still lists {{< svg >}} under "Hugo shortcodes in use". Since that shortcode is gone now, that line could drop it:

  • Hugo shortcodes in use: {{< cardpane >}}, {{< alert >}}. No new shortcodes needed.

Otherwise this looks ready to go.

@AbhiramDhanvi AbhiramDhanvi changed the title chore(layouts): remove unused partials, shortcodes, and layouts (#1169) chore(layouts): remove unused partials, shortcodes, and layouts Dec 5, 2026
Signed-off-by: Abhiram Dhanvi <abhiramcr2726@gmail.com>
@AbhiramDhanvi

Copy link
Copy Markdown
Contributor Author

Thanks for catching that, @sarajkrishnasingh!

I removed {{< svg >}} from docs/superpowers/specs/2026-04-28-five-narrative-design.md in commit 91673855 and pushed the update.

@sarajkrishnasingh sarajkrishnasingh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for following up so quickly. The new commit drops {{< svg >}} from the shortcodes list in the five narrative spec, which was the one open point from my earlier review, and the rest of the cleanup is unchanged.

Verified on head 9167385: the svg shortcode file is gone and nothing references it, the build, DCO and CodeRabbit checks are all green, and the branch is clean with no conflicts or unresolved threads. Approving.

@sarajkrishnasingh
sarajkrishnasingh merged commit b12e6d9 into layer5io:master Dec 5, 2026
3 checks passed
@AbhiramDhanvi
AbhiramDhanvi deleted the fix/remove-unused-layouts branch December 5, 2026 09:40
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.

[Debt] Unused partials and layouts should be removed

3 participants