typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
424 stars 60 forks source link

Metadata in the editor displays the root's metadata #428

Open Alzarath opened 4 months ago

Alzarath commented 4 months ago

As mentioned in a comment in #407:

Most of the meta information—especially the Navigation Title, Meta Title, and Meta Description—appear to reflect the top-most folder. In my case the "home" folder. Changing the values has thus far modified the correct entry's information, but future visits will continue to show information for Home. The slug does appear to reflect appropriately, however.

This is still an issue for 2.0.3

It makes editing metadata much harder, since you need to delete everything and fill it all back in with the correct data to make any changes, or edit the yaml file manually.

Looking at it again, the modified dates and the visibility are reflecting the root's metadata, so it's probably safe to assume everything but the slug is wrong.

trendschau commented 4 months ago

I cannot reproduce this behavior when working with the author area. Some of the metadata are generated automatically when a page is published. Others have to be added manually.

I guess you use a special workflow?

Alzarath commented 4 months ago

I use lighttpd 1.4.74 and PHP 8.2.12.

I do sometimes edit notes manually, but most of the content is generated from Typemill and any metadata is generated exclusively from Typemill. It's consistent behavior for viewing any metadata on my end.

To showcase this, from the typemill folder, running cat content/index.yaml displays the following:

meta:
    navtitle: Home
    title: Navigation
    description: "\nInformation\nOpinions\nCult of the Spider\n"
    heroimage: null
    heroimagealt: null
    owner: ''
    author: Alzarath
    manualdate: null
    modified: '2023-10-14'
    created: '2023-10-13'
    time: 03-13-25
    reference: null
    referencetype: null
    hide: false
    noindex: false

Meanwhile cat content/information/index.yaml has:

meta:
    navtitle: Information
    title: ''
    description: ''
    owner: ''
    author: Alzarath
    modified: '2023-10-14'
    created: '2023-10-13'
    time: 03-13-25
    hide: false
    noindex: false

But when editing the meta for the information folder, I see what I would expect from the Home folder:

image

As well, you can see that the Home folder is not capitalized. Perhaps that's related.