Banner Feature Documentation
Banner Feature Documentation
Overview
The banner feature allows you to add a banner image to posts, publications, events, talks, and portfolio items by adding a banner
field to the front matter.
Usage
Adding a Banner to Content
Simply add the banner
field to your front matter:
---
title: "Your Content Title"
date: 2025-07-18
banner: assets/images/your-banner-image.jpg
---
Banner Path Resolution
The banner path is automatically resolved relative to your siteโs base path. You can use:
- Relative paths:
assets/images/banner.jpg
- Full paths:
/assets/images/banner.jpg
- External URLs:
https://example.com/banner.jpg
Supported Content Types
The banner feature works with:
- Posts (
_posts/
) - Publications (
_publications/
) - Events (
_events/
) - Talks (
_talks/
) - Portfolio items (
_portfolio/
)
Banner Styling
The banner images are styled with CSS classes:
- Full content pages:
.page__banner
- Archive listings:
.archive__item-banner
Banner Size Options
You can customize banner sizes by adding CSS classes:
// Default banner (max-height: 400px)
.page__banner
// Small banner (max-height: 200px)
.page__banner--small
// Medium banner (max-height: 300px)
.page__banner--medium
// Large banner (max-height: 500px)
.page__banner--large
// Full-width banner (extends beyond content margins)
.page__banner--full-width
Example Usage
Blog Post with Banner
---
title: "My Blog Post"
date: 2025-07-18
tags: [productivity, automation]
banner: assets/posts/blog-banner.jpg
---
Portfolio Item with Banner
---
title: "My Project"
collection: portfolio
excerpt: "A great project I worked on"
banner: assets/portfolio/project-banner.jpg
---
Publication with Banner
---
title: "Research Paper"
collection: publications
venue: "Journal Name"
date: 2025-07-18
banner: assets/publications/paper-banner.jpg
---
Best Practices
- Image Dimensions: Use images with aspect ratios around 16:9 or 3:1 for best results
- File Size: Optimize images to keep file sizes reasonable (< 500KB recommended)
- Alt Text: The banner will use the page title as alt text automatically
- Responsive Design: Banners automatically adjust for different screen sizes
Troubleshooting
- Image not showing: Check that the path is correct and the image exists
- Banner too tall: Consider using a banner size modifier class
- Banner not responsive: Ensure images are properly sized (avoid extremely wide images)
Technical Details
The banner feature is implemented in:
_layouts/single.html
- Main content layout_layouts/talk.html
- Talk-specific layout_includes/archive-single.html
- Archive listing template_includes/archive-single-talk.html
- Talk archive template_includes/archive-single-cv.html
- CV archive template_includes/archive-single-talk-cv.html
- Talk CV archive template_sass/_banner.scss
- Banner styling