cms icon indicating copy to clipboard operation
cms copied to clipboard

page title is capitalized file name

Open iacore opened this issue 1 year ago • 4 comments

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

image

image

iacore avatar Jun 17 '24 19:06 iacore

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).

oscarotero avatar Jun 17 '24 20:06 oscarotero

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.

iacore avatar Jun 18 '24 16:06 iacore

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

oscarotero avatar Jun 18 '24 21:06 oscarotero

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

iacore avatar Jun 18 '24 22:06 iacore