2 ms·
After reviewing the Basics Tutorial[0] I have a few reasons I don't like it, but others may: - It is not purely Flat File based, but rather a specific Folder s
by merlincorey 3y ago
After reviewing the Basics Tutorial[0] I have a few reasons I don't like it, but others may:
- It is not purely Flat File based, but rather a specific Folder structure with specifically named and marked up Files in them
- URL Routing is implicit in your folder structure; however
+ URL Routing has some special cases wherein:
a. Folders named starting with digits and a dot (i.e. "04.") will be "ordered"
b. Folders named starting with digits and a dot (i.e. "04.") will be "included in the navigation menu"
c. Folders named starting with digits and a dot (i.e. "04.") will be have the digits and dot removed in the URLs
d. It is unclear what "unordered" pages mean
e. It is unclear how to escape the starting numbers and dot so that they are included, but maybe just doubling "04.04." would work
- Page metadata such as HTML Meta Title and special CSS classes are included in a special header of the Markdown content
- Page template is determined by the actual filename within the URL routed folder rather than in the Page metadata
Personally, I would prefer a simpler "flat file" format that simply mapped folders and files to URLs in a more naive manner.
Metadata being in the page is fine and can totally include the Template that I want to use for that content.
Metadata within a page could also include the "ordering" and "menu" information.
That said, I'd possibly prefer a declarative mapping somewhere of my templates to folder and file patterns and a declarative mapping of my menus to specific files rather than including that data within the content file.
Maybe I should start a side project.
[0] https://learn.getgrav.org/17/basics/basic-tutorial https://learn.getgrav.org/17/basics/basic-tutorial
- ilyt 3y agoIn my flat-file blog thingy I just included the page's slug in the file's metadata, that is so I could order files as I please but still not break links for page