jandecaluwe / urubu

A micro CMS for static websites, with a focus on good navigation practices.
urubu.jandecaluwe.com
GNU Affero General Public License v3.0
179 stars 36 forks source link

Is it possible to create extensionless urls? #64

Closed saulpw closed 7 years ago

saulpw commented 7 years ago

How would I create a page at domain.com/faq, for example? Ideally I could configure Urubu such that faq.md becomes faq/index.html, but setting file_ext to "/index.html" breaks the root index.md. And creating a 'faq/index.md' doesn't work because index pages are special and apparently can't just have straight content. So is there any way to create these clean urls?

leouieda commented 7 years ago

@saulpw my guess is that the easiest way is to create a faq/index.md file. Urubu maps the md file structure into HTML and that's actually one of it's strengths. You don't have to guess what generated a certain HTML file.

saulpw commented 7 years ago

@leouieda Yeah, I tried that, and it doesn't work unfortunately, I guess because index.md are special:

urubu.UrubuError: in faq/index.md: No 'content' or 'order' specified

leouieda commented 7 years ago

@saulpw they are special because they need to know in what order the content inside the folder is organized. You can specify content: as an ordered list of entries or use order: date to organize whatever is in there by date. If you have no content expect the index.md file, specifying order: date in the header should solve your problem.

saulpw commented 7 years ago

Okay, thank you! Specifying order: date worked as you said.

leouieda commented 7 years ago

👍