lumeland / cms

A framework-agnostic CMS for Deno
https://lume.land/cms/
MIT License
51 stars 4 forks source link

page title is capitalized file name #17

Open iacore opened 2 months ago

iacore commented 2 months ago

for the record, that's neither the file name or the page title is a bit confusing

image

image

oscarotero commented 2 months ago

The list of elements is generated from the file name (removing the extension, replacing - and _ to spaces and converted to title case). This is the function.

The reason is because the real file name is not very friendly for some people. And showing the title (or any other value) requires to load and parse the file, which is slow for sites with many pages or if you're using a remote storage (like GitHub).

iacore commented 2 months ago

I see. I don't have much motivation for a change since I only just started using Lume CMS.

If I have to use this CMS daily, I would much prefer showing the full filename (e.g. src/file.pug) since I can look at the block of text as-is without parsing what it means.

oscarotero commented 2 months ago

LumeCMS use the file paths omiting the collection root folder. For example, if you define a collection and the storage is src:articles/*.md, the articles/ folder is not included in entry name and this file would be displayed as First article.

But it can show subfolders. If the file is /articles/first-article/chapter-1.md it would take first-article/chapter-1.md to generate the name.

Example:

imaxe
iacore commented 2 months ago

But it can show subfolders. If the file is /articles/first-article/chapter-1.md it would take first-article/chapter-1.md to generate the name.

Example: [image]

oh well

this is more confusing isn't it

the folder/file analogy is perfect, i think. there is no need to unsluggify the filenames.

using open/closed folder icon would also be better here