Skip to content

Add automatic sidebar generation with template support#99

Open
Josephat-S wants to merge 1 commit into
devfrom
fix/sidebar-component
Open

Add automatic sidebar generation with template support#99
Josephat-S wants to merge 1 commit into
devfrom
fix/sidebar-component

Conversation

@Josephat-S

Copy link
Copy Markdown
Contributor

This pull request adds support for generating a customizable sidebar navigation component with icons for selected templates. It introduces an icon mapping for sidebar items, generates a Sidebar.tsx component with appropriate icons and navigation links when the template supports sidebars, and ensures the sidebar is only created if requested in the config.

Sidebar navigation generation:

  • Adds an ICON_MAP object mapping common sidebar item labels to Lucide icon names, and a SIDEBAR_TEMPLATES array listing templates that support sidebar navigation. (src/navigation.js)
  • Implements the generateSidebarComponent function that generates a Sidebar.tsx React component, including logic for importing icons, rendering nav links with icons, and highlighting the active link. (src/navigation.js)
  • Updates the generateNavigation function to generate the Sidebar.tsx file in the appropriate directory if the template supports sidebars and the user has opted to include one. (src/navigation.js)…e template to support it

Closes #88

@Josephat-S Josephat-S requested review from a team and ISONIC0788 June 14, 2026 14:53
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.

ISSUE-003 — Dynamic Sidebar Layout Component Generation

1 participant