You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
hi
just a quick suggestion,
it would be nice if there could be a way for lb not to modify the date once it have been set at creation time.
while testing out lb, changing some stuffs.. the layout and such, at some point i had to modify all the entries i previously made last month in order to make sure all my articles do pick up the changes i made, and as a result all my entries are now displaying the date at time of editing instead of creation date, giving the impression the article is new while it's not. so i'm reporting this as suggestion for enhancement.
anyway, thanks for lb, it's cool.
The text was updated successfully, but these errors were encountered:
This is an important feature for me as well, so I've figured it out. Have a look a the "publish()" function.
It looks like lb never modifies the date as it's originally generated in the "database" (.htaccess) file at the time of the initial creation of the entry. It actually just updates a string called "$webdate" on each revision while leaving "$rssdate" intact.
Any time a new or existing entry is published, the publish function checks to make sure "$rssdate" exists and thus leaves it alone, creating a new one only if it doesn't exist (meaning, in such cases, the publish function is posting a new entry and not modifying an old one).
Since "$webdate" is defined after "$rssdate" anyway (both just a few lines into the function), we can actually redefine it to reflect "$rssdate" pretty easily. Look for this line as it appears by default and which we'll have to replace:
webdate="$(date '+%a, %d %b %Y %H:%M:%S %z')" # But this visible date you can set to any format.
The date command at least on my system has a "-d" flag you can use which applies the subsequent formatting to whatever date you input into it (as opposed to "right now"). So we can use this with reference to the "$rssdate" string and still apply whatever format we want. In my case, I'll go with this:
hi
just a quick suggestion,
it would be nice if there could be a way for lb not to modify the date once it have been set at creation time.
while testing out lb, changing some stuffs.. the layout and such, at some point i had to modify all the entries i previously made last month in order to make sure all my articles do pick up the changes i made, and as a result all my entries are now displaying the date at time of editing instead of creation date, giving the impression the article is new while it's not. so i'm reporting this as suggestion for enhancement.
anyway, thanks for lb, it's cool.
The text was updated successfully, but these errors were encountered: