ComponentsPublishing
Featured Posts
Responsive homepage hero populated from Ghost featured posts.
Install
npx ghostcn@1.4.0 add featured-posts --skip-existingUsage
Mark posts as featured in Ghost Admin to populate this block. Try it in your homepage template.
{{> "components/featured-posts"}}Customize this instance
{{> "components/featured-posts" class="my-6" titleClass="text-purple-700 dark:text-purple-300"}}Styling parameters
| Parameter | Target |
|---|---|
class | Component root — .ghcn-featured |
titleClass | .ghcn-featured__title |
gridClass | .ghcn-featured__grid |
cardClass | .ghcn-featured__card |
contentClass | .ghcn-featured__content |
Styling parameters affect only elements that render. See Style component instances for specificity, dark mode, and preserving customizations.
Installed files
partials/components/featured-posts.hbsassets/css/components/featured-posts.css
Was this helpful?