Shipixen Logo

Blog Post

Updated on

The LandingBlogPost component displays a single blog post card with an image, author information, date, title, summary, reading time, and tags. It's designed to be used within a blog list component but can also function as a standalone element.

Can be used in a LandingBlogList component or as a standalone element.

Getting Started with Shipixen
Open post
Alex Johnson
Alex Johnson

Getting Started with Shipixen

Learn how to quickly set up and customize your Shipixen landing page with our comprehensive guide.

5 min read
GuideTutorial

Usage

Import the component and provide a post object with the required properties:

import { LandingBlogPost } from '@/components/landing/blog/LandingBlogPost';
<LandingBlogPost
  post={{
    slug: 'blog-post-slug',
    date: 'November 15, 2023',
    title: 'Blog Post Title',
    summary: 'This is a summary of the blog post content.',
    tags: ['Tag 1', 'Tag 2'],
    images: ['/static/images/backdrop-1.webp'],
    readingTime: 5,
    author: {
      name: 'John Doe',
      avatar: '/static/images/people/1.webp'
    }
  }}
/>

Examples

Basic Blog Post

A minimal blog post card with only the essential information:

Open post

Minimal Blog Post Example

This is a minimal blog post example with only the essential information.

Image Position Variants

The LandingBlogPost component supports three image position layouts:

Left Image Layout

Blog Post with Left Image
Open post

Blog Post with Left Image

This example shows a blog post with the image positioned on the left side.

4 min read

Center Image Layout

Used by default in grid displays:

Blog Post with Center Image
Open post

Blog Post with Center Image

This example shows a blog post with the image positioned at the top (center layout).

5 min read

Right Image Layout (Default)

Used by default in list displays:

Blog Post with Right Image
Open post

Blog Post with Right Image

This example shows a blog post with the image positioned on the right side.

6 min read

With Image and Summary

A blog post card featuring an image and summary text:

Blog Post with Image and Summary
Open post

Blog Post with Image and Summary

This is a brief summary of the blog post that gives readers an idea of what to expect.

With Author and Reading Time

A blog post with author information and reading time displayed:

Open post
Sarah Williams
Sarah Williams

Blog Post with Author Information

A comprehensive guide written by an expert in the field.

8 min read

With Tags

A blog post card displaying category tags:

Open post

Blog Post with Category Tags

Learn about the latest features and updates in our newest release.

6 min read
New FeaturesUpdatesTutorial

With Clickable Tags

A blog post with tags that link to other pages:

Open post

Blog Post with Clickable Tags

This example shows a blog post with tags that link to other pages when clicked.

7 min read

Complete Example

A fully-featured blog post card with all available properties:

The Complete Guide to Modern Web Development
Open post
Michael Chen
Michael Chen

The Complete Guide to Modern Web Development

Explore the latest tools, frameworks, and best practices for building exceptional web experiences in 2023 and beyond.

12 min read
Web DevelopmentTutorialBest Practices

API Reference

Prop NameProp TypeRequiredDefault
post BlogPostYes-
imagePosition 'left' | 'center' | 'right'No'right'
export interface BlogPost {
  slug: string; // Unique identifier for the blog post
  date: string; // Publication date of the post
  title: string; // Title of the blog post
  summary?: string; // Brief summary of the blog post content
  tags?: string[] | Array<{url: string; text: string}>; // Array of category tags (strings) or objects with url and text properties
  images?: string[]; // Array of image URLs, with the first one used as the post thumbnail
  readingTime?: number; // Estimated reading time in minutes
  author?: {
    name?: string; // Name of the blog post author
    avatar?: string; // URL to the author's avatar image
  };
}

Usage with LandingBlogList

When using LandingBlogPost inside a LandingBlogList component, the imagePosition depends on the list's display mode:

  • For display="grid" (grid layout), the imagePosition should be set to 'center'
  • For display="list" (list layout), the imagePosition should be set to 'right' (default)

More Examples

For more examples, see Blog List.