Creating blog posts in subfolders

I followed your blog post tutorial - everything worked fine. Thank I created a year folder (2020) inside of the blog folder and added grandChildren to the “blog.php” query. And my posts get correctly listed under domain/blog.

However they don’t in my Panel. And when I create a post in the panel, it gets created under the blog folder, not the 2020 subfolder.

Appreciate if you could guide me in the right direction. Thank you! markus

You would have to list the years in your blog.yml blueprint

title: Blog
preset: pages
# assuming the year folders use a `year.yml` template
template: year

Then in the year.yml blueprint, put the stuff you currently have in the blog.yml blueprint.

That is one way to do this.

Wow. You’re fast. Thank you!

“assuming the year folder use a year.yml” - can you please let me know how I do that?

Thank you. markus

What do you mean?

You have to create a year.yml in /site/blueprints/pagesand make sure your text file in the year folders is called year.txt.

blog/
  blog.txt
  2019/
    year.txt
    article-1/
      article.txt
    article-2/
      article.txt
  2020/
    year.txt
    ...