-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Context
I'm greatly impressed by this theme and currently using it on my website. After working with it, I've identified several enhancements that would significantly improve its flexibility and usability for users like myself who want more control over configuration, layout, and content presentation.
I'm referencing some features from the Blowfish theme which demonstrates excellent implementation of these capabilities, though I understand hugo-narrow has its own unique philosophy and design.
Feature Requests
1. Structured Multi-File Configuration System
Current Behavior:
The theme likely uses a single configuration file (e.g., hugo.toml or config.toml) in the root directory.
Proposed Enhancement:
Support Hugo's modular configuration directory structure under /config/ with environment-specific overrides:
config/
_default/
hugo.toml # Base configuration
params.toml # Theme parameters
menus.toml # Navigation menus
languages.toml # Multi-language settings (if applicable)
production/
hugo.toml # Production overrides (e.g., baseURL)
development/
hugo.toml # Development overrides
Benefits:
- Better organization for complex sites
- Easier environment-specific configuration management
- Improved maintainability for multi-language sites
- Cleaner version control (separate concerns)
References:
2. Customizable Homepage Content Order
Current Behavior:
Homepage layout follows a fixed order of elements (profile, posts list, content, social links).
Proposed Enhancement:
Add configuration parameter to allow users to customize the order of homepage sections:
[params.home]
sectionOrder = ["profile", "content", "posts", "social"]
# or alternative ordering:
# sectionOrder = ["content", "profile", "social", "posts"]Benefits:
- Flexibility to prioritize what matters most (e.g., showcase writing before profile)
- Better control over first impressions for visitors
- Adaptability for different use cases (portfolio vs blog vs personal site)
3. Flexible Table of Contents (ToC) Positioning
Current Behavior:
ToC appears to be hidden or in a fixed position.
Proposed Enhancement:
Provide configuration options for multiple ToC display modes:
[params.page.toc]
enable = true
position = "sidebar-right" # Options: "sidebar-left", "sidebar-right", "top", "hidden"
keepStatic = false # Sticky behavior on scroll
auto = true # Auto-generate from headingsBenefits:
- Better navigation for long-form content
- Improved reading experience with persistent ToC visibility
- Flexibility for different content types and screen sizes
- Accessibility improvements for users navigating complex articles
Implementation Examples:
4. Full-Width Navbar Option
Current Behavior:
Navbar likely matches the content width constraint.
Proposed Enhancement:
Add configuration to expand navbar to full browser width:
[params.navbar]
fullWidth = true # Navbar spans full viewport width
contentWidth = "narrow" # Content remains narrowBenefits:
- Modern design aesthetic option
- Better visual separation between navigation and content
- More space for navigation items on wider screens
- Professional look for portfolio or business sites
5. Rich Shortcode Library
Current Situation:
Limited built-in shortcodes for content enhancement.
Proposed Enhancement:
Add a comprehensive shortcode library for richer content presentation:
Essential Shortcodes:
-
Cards - Display content in card layouts
{{< card img="/image.jpg" title="Card Title" button="/link" >}} Card content here {{< /card >}} -
Carousel/Slider - Image or content carousels
{{< carousel duration="5000" >}} {{< carousel-item img="/img1.jpg" caption="First" >}} {{< carousel-item img="/img2.jpg" caption="Second" >}} {{< /carousel >}} -
Code Importer - Import code from external files or GitHub
{{< code-import file="example.js" lang="javascript" >}} -
GitHub Gist - Embed gists easily
{{< gist username gist-id >}} -
Lead Text - Emphasized introductory paragraphs
{{< lead >}}Important introduction text{{< /lead >}} -
Icon Support - Easy icon insertion
{{< icon "github" >}} {{< icon "twitter" >}} -
Button - Styled call-to-action buttons
{{< button href="/contact" target="_blank" >}}Contact Me{{< /button >}} -
Badge - Display status badges
{{< badge >}}New{{< /badge >}} -
Timeline - Display chronological events
{{< timeline >}} {{< timeline-item date="2023" >}}Event description{{< /timeline-item >}} {{< timeline-item date="2024" >}}Another event{{< /timeline-item >}} {{< /timeline >}} -
TypeIt - Animated typing effects for text
Benefits:
- Richer, more engaging content without custom HTML
- Consistency in design patterns across the site
- Easier content creation for non-technical users
- Professional presentation capabilities
References:
- Blowfish Shortcodes - Comprehensive implementation
- Hugo Codex Add-ons
- Hugo Mods Shortcodes
6. Display Website/Site Name in Navigation Bar
Current Behavior:
The navigation bar only displays a logo (either custom image or first letter of site title) but does not show the actual site name/title as text.
Proposed Enhancement:
Add a configuration option to display the site name/title next to or instead of the logo in the navigation bar:
[params.navbar]
showSiteTitle = true # Display site title text
showLogo = true # Display logo
titlePosition = "right" # Options: "left", "right", "only" (hides logo)
showTitleOnPages = ["all"] # Options: "all", "home", "posts", ["about", "contact"]Implementation Options:
-
Logo + Title Combination:
<!-- In layouts/_partials/navigation/header.html --> <div class="flex items-center gap-3"> <!-- Logo (existing) --> <a href="/" class="flex h-10 w-10 items-center..."> <img src="{{ site.Params.logo.image }}" alt="{{ site.Title }}" /> </a> <!-- Site Title (NEW) --> {{ if site.Params.navbar.showSiteTitle }} <a href="/" class="text-lg font-semibold hover:text-primary transition-colors"> {{ site.Title }} </a> {{ end }} </div>
-
Conditional Display by Page Type:
[params.navbar] showSiteTitle = true showTitleOnPages = ["posts", "about"] # Only show on specific pages # or showTitleOnPages = ["all"] # Show on all pages # or hideTitleOnPages = ["home"] # Hide only on homepage
-
Title-Only Mode (No Logo):
[params.navbar] titlePosition = "only" # Hides logo, shows only title
Benefits:
- Improved brand recognition across all pages
- Better visual hierarchy with text alongside logo
- More professional appearance for business/portfolio sites
- Accessibility: screen readers get clear site identification
- Flexibility for sites that prefer text-based navigation
- Useful when logo is abstract and needs context
Use Cases:
- Personal blogs: Show "John Doe's Blog" alongside avatar
- Business sites: Display company name prominently
- Portfolio sites: Ensure name is always visible for branding
- Documentation sites: Show project name for clarity
Design Considerations:
- Responsive behavior: On mobile, consider showing only logo or abbreviated title
- Typography: Title should use the site's primary font and sizing
- Positioning: Should integrate smoothly with existing nav layout
- Animation: Optional subtle hover effects on title link
Implementation Example from Current Code:
Looking at the existing layouts/_partials/navigation/header.html, the modification would be around line 7-26 where the logo is currently displayed:
<!-- Enhanced version with site title -->
<div class="flex items-center gap-3">
{{ if ne site.Params.logo.image "" }}
<a href="{{ site.Home.RelPermalink }}"
class="flex h-10 w-10 items-center justify-center overflow-hidden rounded-full...">
<img src="{{ site.Params.logo.image }}" alt="{{ site.Title }}" />
</a>
{{ else }}
<a href="{{ site.Home.RelPermalink }}"
class="bg-primary text-primary-foreground... flex h-10 w-10...">
{{ substr site.Title 0 1 | upper }}
</a>
{{ end }}
<!-- NEW: Site Title Display -->
{{ if site.Params.navbar.showSiteTitle }}
{{ $showOnCurrentPage := false }}
{{ if eq site.Params.navbar.showTitleOnPages "all" }}
{{ $showOnCurrentPage = true }}
{{ else if in site.Params.navbar.showTitleOnPages .Type }}
{{ $showOnCurrentPage = true }}
{{ end }}
{{ if $showOnCurrentPage }}
<a href="{{ site.Home.RelPermalink }}"
class="text-lg font-semibold text-foreground hover:text-primary transition-colors duration-200 hidden md:block">
{{ site.Title }}
</a>
{{ end }}
{{ end }}
</div>References:
Priority
Based on implementation complexity and impact:
- High Priority: Feature 3 (ToC positioning), Feature 1 (Multi-file config), Feature 6 (Site name in nav)
- Medium Priority: Feature 2 (Homepage order), Feature 4 (Full-width navbar)
- Nice-to-Have: Feature 5 (Shortcodes library) - Could be implemented incrementally
Additional Notes
I understand these are significant enhancements and may not align with the theme's minimalist philosophy. I'm happy to:
- Test beta implementations
- Provide feedback during development
- Contribute documentation for new features
- Help with use case examples
Thank you for considering these suggestions and for maintaining this excellent theme!