Posts and site content

Show a list of posts

A list of posts is a Collection block. It is not the Collections template, which Ghost uses for page 2 and later of your home page. You design one post card inside it, and the Collection repeats that card for every post Ghost returns. You can start from a ready section in the Posts pattern category or add the Collection block yourself.

Add a ready list of posts

  1. Open your project in Fantasma.
  2. In the left sidebar, under Templates, click Homepage.
  3. On the canvas, point at the line between two sections and click +. An empty section appears.
  4. Click All patterns, the last card in the empty section. The Add Pattern to Template dialog opens.
  5. In its list of categories, click Posts.
  6. Click the pattern you want, such as Clean Grid or Classic List. It replaces the empty section.

Posts patterns come with a Pagination block, which Split post lists into pages explains. They show the posts of the page they are on, newest first, with Show set to Page posts. That works on the Homepage, Collections, Tag and Author templates. On a post or a page, Ghost has no list of posts to give, so the section stays empty on your site, even though the canvas shows sample posts. For a list on the Post or Page template, add a Collection block as the next part shows, or set Show to Latest as Choose which posts a list shows explains.

A section from a pattern stays linked to it. Its Collection shows only Limit in the right sidebar. To change anything else, select the section and click Detach at the top of the right sidebar first. How patterns work explains what that changes.

Add a Collection block

  1. In the Sections list in the left sidebar, point at the row of the section you want the list in, and click the + at its right end. The block picker opens.
  2. Under Layout, click the version you want:
    • Posts: the six latest posts in a grid of cards.
    • Posts list: the six latest posts as rows, each image beside its text.
    • Collection: an empty Collection set to the latest posts, for a card you build from nothing. It shows gray placeholder cards. Click the + in the first one to add blocks to the card.
The block picker opened from the Latest Posts row, scrolled to the Layout group with Collection, Posts, Posts list, Tags and Authors

The Collection appears at the end of the section. With Posts or Posts list, the canvas shows sample posts in it. Tags and Authors in the same group list tags and authors instead, as Show your tags or authors explains.

On your site, Posts shows a grid of cards and Posts list shows one post per row.

Six posts in a grid of four columns, each card with an image, a title, an excerpt and a byline
Posts
Posts in rows, each with its image on the left and its title, excerpt and byline beside it
Posts list

Change the post card

Every post in the list uses the same card. Click any card on the canvas and change it, and all the cards change. In a section from a pattern, detach the section first.

  1. On the canvas, click the card's title, image or date until that block has a blue outline and its name heads the right sidebar. Each click goes one level deeper. Select blocks inside a section shows how.
  2. Change the block in the right sidebar, or press ⌫ (Backspace) to remove it from every card.

To add a block to every card, expand the Collection's row in the Sections list, point at the row under it, which holds the card and is usually named Post, and click the + at the end of its row. Then scroll the picker to Data and pick a block, such as Reading Time, Primary Tag or Read More.

The blocks inside the card read the post they stand in. Title shows each post's title, and Featured Image its feature image. Show the post title and other page data explains these data blocks.

Lay out the cards

Select the Collection. Its layout settings are under General:

Setting What it does
Layout Stack puts one card under another, Row puts them side by side and starts a new line when one is full, and Grid lines them up in columns. A new Collection uses Grid.
Max columns Shows with Grid. The most cards in one row, 3 by default.
Min column width Shows with Grid. Cards never get narrower than this. When the screen is too narrow for Max columns, the grid shows fewer columns.
Separated Draws a thin line between the cards.
Gap Under Spacing. The space between cards.

In the right sidebar, click + next to the Layout heading to add Alternate, which flips every second card so its image and text swap sides. With Row or Grid, click + next to Spacing to add Row gap, the space between rows when it should differ from the space between columns.

Limit, under General, sets how many posts the list shows, from 1 to 100, and 6 by default.

Show a message when there are no posts

A list that finds no posts shows nothing. To show a line of text instead, point at the Collection's row in the Sections list and click the + at its right end. In the picker that opens for the Collection, click No Results under Layout. It holds a paragraph that reads "No results found.", which you can change.

Collection lists every setting of the block.

Next, choose which posts the list shows.

Was this article helpful?