Creating a blog with Grav

Hi,

I’m creating a website with Grav using the skeleton blog based on the Quark theme, with about 200 blog entries, and often duplicate folder names appear. It’s easy to avoid that problem manually by removing or adding characters, but… Is there any method or plugin that helps to create a unique ID automatically and cleanly in the eyes of an end client?

I also see some unwanted side effects that make me question if this is the best way to create a blog with Grav, although all the themes I’ve downloaded use the same strategy… For example: in the advanced options tab (Admin plugin) the long menu list moves the below options a long way away :smiley:

Has anyone used any other way to create a blog? Flex-objects could be a good candidate here? According to the official documentation, it doesn’t support multilanguage (a must for my projects) and I don’t see how to manage images and related files, or how it would integrate with other plugins like sitemap, etc.

Thanks for your help!

1 Like

For a blog site, you would probably like and find that Bludit is a much better flat file cms to use. https://www.bludit.com/

Enjoy

Since you already know the number of blog items, I guess you are converting an existing site? And the existing site is presumably not file based?

and often duplicate folder names appear.

How come blog items have the same folder name?

Is there any method or plugin that helps to create a unique ID automatically and cleanly in the eyes of an end client?

I don’t think so.

I also see some unwanted side effects […] For example: in the advanced options tab (Admin plugin) the long menu list moves the below options a long way away :smiley:

In general, libraries don’t put all books on a single shelve… Have you considered creating multiple subfolders (or even root folders) based on topic (category/tag), or year, or any other commonalities?

Thank you @anon76427325 for addressing the question with Grav CMS

Right, I’m converting an existing site. I can’t use the same links due to bad practices, it’s something I need to correct. Anyway, I wasn’t just thinking about existing posts, but rather future posts. No problem.

I hadn’t thought about it until your reply refloated this thread. I didn’t know that different subfolders could be printed from the same parent folder. Grav surprised me again :slight_smile:

Having consulted the documentation, I think I have to use the following collection

content:
    items:
      '@page.descendants': '/blog'

Or with multiple collections for display only the posts, or using this other collection to display categories:

 '@page.children': '/blog'

I look forward to testing. Thanks again!

@sdesergi, When the collection is defined inside /pages/01.blog/blog.md you can simply use:

content:
    items: '@self.descendants'

See self@.descendants

Yes, thanks!

The problem with descendants is that it shows both child and grandchild folders, mixing categories with entries at the same level. But Grav has plenty of solutions :slight_smile: