I have been experimenting with Grav for a few days now and find it a real breath of fresh air for someone who has only ever used WordPress. However, there is one thing that bothers me. The folder structure driven flat file page hierarchy used by Grav can easily end up with a folder structure like the one below
01.home
|
--- default.en.md
|
01.sub-page-1
|
--- default.en.md
|
02.sub-page-2
|
--- default.en.md
There in lies the problem. I prefer to edit my markdown in Visual Studio Code via SFTP, not in the Grav Admin panel. However, that means that I can end up with multiple default.en.md files open at the same time and that is a disaster waiting to happen. Is it possible to rename the markdown files to something more logical?
You can actually.
By default, grav pulls the template type from the markdown file's name. However, you can override this behavior by setting the template
variable in your page's YAML header. So we could easily have something like:
01.home
|
--- homepage.en.md
|
01.sub-page-1
|
--- home.subpage1.en.md
If we simply have a header of
---
title: blah
template: default
...
---