Our first step is to add the blog page. This is where all of our future posts will be listed. To add a blog page, first click the Add button on the Pages tab.
We have to choose a title for our page. I chose Blog and the folder name automatically constructed itself as blog. We also have to set the template to use as the Blog template. The other settings are good the way they are.
After clicking the Save button at the top right, the page editor will look like this.
The blog page is not supposed to take a lot of content. A heading and subheading is all it really needs. In markdown, headings are denoted with the hashtag symbol. Type
CLIP: # My Example Blog ## Learning to use Grav
This will render as
After saving, we can take a look at the Blog Config tab.
There are a lot of options here. Fortunately, the default settings are usually good to start out with, so all you need to do is glance over this tab for now. Some of the settings define the collection of blog posts. Some others provide settings for enabled plugins.
One setting we might want to change is Max Item Count under Content Definition. By default this is set to 5, which means that the blog page will show five posts per page. Five does not seem like very much to me, so I would change it to 10.
If we switch to expert mode, we can see how these settings are provided in the frontmatter. Although we will not have to edit them while in expert mode, this will help demystify the frontmatter, which may help in the future if we come across something we cannot modify from the provided user interface.
CLIP: title: Blog content: items: - '@self.children' limit: 10 order: by: date dir: desc pagination: true url_taxonomy_filters: true feed: limit: 10
Now we only have Content and Options tabs. On the Content tab, the Title section has been replaced with a Frontmatter section, which defines the title and some of the options we saw on the Blog Config tab. You may notice (especially if you took a look at the Options and Advanced tabs) that not all of the settings are listed here. If a setting is not explicitly defined in the frontmatter, Grav will automatically use the default.
Since the normal editing mode will be much more useful to us in general, we can go ahead and switch back. If we navigate to our website, it should look like this: