Overview
The blog index page (src/pages/blog/index.astro) displays a grid of all published blog posts using the CardsBlog component.
Source Code
src/pages/blog/index.astro
Page Structure
The blog index is minimal, delegating all functionality to the CardsBlog component:- Layout Wrapper - Provides SEO, header, and footer
- CardsBlog Component - Handles post loading, display, and search
Features
The blog index page provides:- Automatic Post Loading - Fetches all published posts from content collections
- Grid Display - Responsive card grid (1-3 columns based on screen size)
- Search Functionality - Filter posts by title, description, or tags
- Post Sorting - Shows newest posts first by creation date
- Empty State - Displays message when no posts are published
Accessing the Page
The blog index is accessible at:SEO Configuration
Post Filtering
Only posts withpublish: true in their frontmatter are displayed:
Customization
Change Blog Title
Edit the CardsBlog component to customize the header:src/components/Blog/CardsBlog.astro
Add Featured Posts Section
You can add a featured posts section above the grid:src/pages/blog/index.astro
Pagination
For large blogs, you may want to add pagination. See the Astro pagination guide.Related Documentation
CardsBlog Component
Learn about the blog cards component
Blog System
Understand the complete blog architecture
Creating Posts
Learn how to create new blog posts
Blog Post Page
See how individual posts are rendered
