Feeling genuinely thick - Cannot get basic blog to work

My site at www.stefanholmes.com is a fairly new install of Grav. I installed the ‘Clean Blog’ theme. Then I added a single page, intended as a blog entry. That showed up fine.

Now I want to add further entries, but have the main page list the blog entries. I have tried many combinations of page template type (blog, default, item) and ways of organising them (a blank ‘blog’ page as parent and then one or more pages as children underneath).

I either get a “no page found”, a page heading with no copy body or I can view a single page successfully, but even blind trial-and-error hasn’t resulted in anything that looks like any examples provided.

Am I just missing something? I’ve read the documentation, but that assumes I’m ready to delve into editing the .md files directly, which I’m not. I picked Grav as a platform due to its simplicity and seeming ability to manage content through the admin interface alone.

Thanks in advance.


Could you post a screenshot of your pages list ?
To create a new post, you could:

  • Open the admin
  • Go to the page “Pages”
  • Click on the button “Add”
  • On the modal, select the template item and the parent page (might be home in your case)
1 Like

Thank-you. I don’t have screenshots handy just now - but what I will do is reply with more detail a little later today.

I have tried the format you’ve suggested and I’m fairly sure I got the “page does not exist” situation.

I’m going to save my current content, erase my installation completely, check my host settings, do a fresh install and try again.

Hi there, @DigitalStefan!
First of all, great to see you here :slight_smile: I’m waiting to see more of your blog, I love when people get creative about IT :wink:

So, to the point:
If you wish to set up a blog with your choosen theme, that is clean-blog, you have to:

  1. create a page that will serve as, let’s call it, ‘list view’
  2. convince it to show your blognotes
  3. enable your readers to visit each note separately

In Grav most effective way to achieve it is a mechanism caled page collections. It is quite well documented here and here, but I’ll try to provide quick cheatsheet :slight_smile:

  • create a collection - that is, a mother-page. This will be our ‘blog’ page, so let’s say that we’ll put it into /01.blog folder. To make a collection, create a page, template ‘blog’ would be most appropriate.
    Important: for your collection to work, you have to define it in the page’s frontmatter - otherwise it will be just a simple static page. Following code can be a good example:
    items: '@self.children' //This defines collection and tells Grav what goes into it.
                            //In this case, it means 'every children (non-module subpage) of this very page.
                            //The rest is rather self-explanatory I think?
        by: date
        dir: desc
    limit: 10
    pagination: true
  • when you have your collection defined, you can add some items to it. As we defined collection as every children of this page, thats where we’re going to put blognotes:

    • create few subpages in the /01.blog folder, i. e. /01.blog/01.Programing in C# and /01.blog/02.Why iOS is better than Android?
      Using template item would be nice, but it is not required.
  • now when you enter your /blog page, you should see those 2 items!

1 Like

Hi there. Thanks for the encouragement. After much experimentation, I believe the ‘clean blog’ theme was holding me back a little.If I use the default theme, it shows clear options on setting up a proper blog formatted site.

The caveat was that stefanholmes.com would 404, but stefanholmes.com/blog would work. I toggled the ‘redirect default route’ on then off again and that fixed the issue. I’d already got the ‘blog’ page set as home page, so not sure why that didn’t work first time.

I’m sticking with the default theme, but now it seems I’ve got to dig a little to get rid of the Lorem Ipsum sidebar text widget, which annoyingly is not exposed as feature in the admin panel, but hardcoded in a file somewhere (Google is my friend on this).

I did just try to install the ‘sidewalk’ theme, but that refused to show up in the list of themes, despite giving a ‘success’ message.

I’ve now removed the sidebar text widget by editing the relevant file. Disappointing that the official response to this is “we’re not removing it” - which infers that newbies should just learn how to extend a theme.

Frustrating. I’ve now invested over 2 full hours getting a basic blog site up and running.

WordPress may be a bloated, insecure load of rubbish, by getting a site up takes zero time in comparison.

I’m going to persevere. I just hope usability issues like this are revisited and the apparent dev arrogance disappears.

Well, installing new themes and plugins without command line access can be frustrating, I feel you.
Also, please mind that custom method of adjusting themes and blueprints is rather adding new files than modifying given ones, otherwise you can have ugly surprise after update!

Did you installed it via FTP or via Admin panel? Did you clear all the cache afterwards?

It is actually pretty simple about template files - when you create any page, you have to select it’s default template - see pic:
So id you are displaying this page and seeing this sidebar, it means that this template has it coded or includes some other that does. In this case, as name of Page Template on the picture is ‘Default’, twig template that you should be interested in template file named default.html.twig

What are you actually trying to achieve?
If you only want to set up simple blog without diving into theme developement, you probably should’ve use one of few Blog Skeletons - they exist for this very purpose, to kickstart your project without the unnecessary fuss with developing themes and plugins. Also, before throwing accusations about ‘dev arrogance’ it would be nice to… read the manual
On the other side, if you wish to learn how to code, use templating engine and develop your own projects with system based on most popular PHP framework - Symfony, you can do this as well.
But then you wouldn’t rant, would you?
You really don’t have to preserve anything. If you are not feeling comfortably with software, simply don’t use it. But please, before you start screaming about how the tool is flawed and devs are arogant, well… Read the requirements. Read the instruction manual.