Grav Blog and Item pages

29th Oct 2021

In Grav, a blog page (or template) is the parent page for 1 or more blog items (again template). The blog page contains a general description of the the nature of the blog items below. There are several options for this parent blog page that will apply to all blog items (children) below, unless overridden on the individual blog item page. Using the bootstrap4 open matter theme, I don't know how to display the blog page (the general description) on the website. Only the blog items and a blog item list are available to view.

The blog item list is generated by the theme, and is accessed by double clicking on a header drop down menu (and don't know why double click) and selecting the first item above the line. It has the same name as the drop down menu name.

Each blog item contains an individual story or piece of information. There are two parts to a blog item - the summary and the content. Simply, the summary is displayed on blog item list, and the content is displayed on the blog item. There is a delimiter used to separate the 2 parts on the editor page. After the summary, add a blank line, then "===" on a separate line, then one more blank line. The editor has a button labeled summary delimiter to quickly insert the three equal signs, but you must remember to add the blank lines before and after.

Several options must be set correctly to properly display the blog item list and the blog items:

  1. When editing the blog page, go to the blog list tab and under Appearance, set the Hide Summaries on Blog Post Pages to Yes.
  2. When editing each blog item:
    • On the Options tab, make sure published shows Yes.
    • On the Options tab, set a date the item is published. This establishes the order of the previous and next post links at the bottom of each blog item. This date is also displayed on both the blog item and in the list. If the date is not set, the last date the blog item was edited is used.
    • On the Advanced tab, arrange the order of the blog items to set the order of the blog item list.

Next Post