Skip to content

Conversation

@fmunteanu
Copy link
Contributor

@fmunteanu fmunteanu commented Jul 7, 2025

Currently, the navbar title/brand area is hardcoded within navbar.html, making it impossible to customize the title display without overriding the entire navbar template. Users who want to implement custom title layouts must copy and maintain the entire navbar template.

Changes

  • New file: layouts/_partials/navbar-title.html - Contains default title/brand implementation
  • New file: layouts/_partials/custom/navbar-title.html - Empty placeholder for user customization
  • Modified: layouts/_partials/navbar.html - Now calls {{ partial "navbar-title.html" . }} instead of inline title logic

Users can now create layouts/partials/custom/navbar-title.html in their site to customize navbar branding.

Backward Compatibility

  • Fully backward compatible, existing sites continue to work unchanged
  • Follows established Hextra custom partial pattern (custom/footer.html, custom/head-end.html)
  • No breaking changes to existing navbar functionality

@netlify
Copy link

netlify bot commented Jul 7, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 54f3084
🔍 Latest deploy log https://app.netlify.com/projects/hugo-hextra/deploys/687bb47ebfeb020008869343
😎 Deploy Preview https://deploy-preview-718--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@imfing imfing requested a review from Copilot July 21, 2025 19:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the navbar title/brand implementation to enable user customization by extracting the hardcoded title logic into a separate partial template. The change follows the established Hextra pattern of allowing custom overrides through dedicated partial files.

  • Extracts navbar title/brand logic from inline implementation to a dedicated partial template
  • Enables users to customize navbar branding without overriding the entire navbar template
  • Maintains full backward compatibility with existing configurations

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
layouts/_partials/navbar.html Replaces inline navbar title logic with partial template call
layouts/_partials/navbar-title.html Contains the extracted default navbar title/brand implementation

@imfing imfing merged commit c979586 into imfing:main Jul 21, 2025
4 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.

2 participants