Automatic update of "modified:..." in .md file header
First post so please be gentle…
I’m currently working on the website for TV Rename (www.tvrename.com) which is contains many markdown files (.md) hosted using GitHub pages.
Problem is I keep forgetting to update the “modified:” tag in the file headers viz:
excerpt: “This guide will help you with the initial setup TV Rename.”
Is there a method (or plugin) that will automatically modify this entry when the file is saved?
Been looking for absolutely ages and haven’t found anything yet!
What you want is something that will set a callback on the FILEBEFORESAVE notification.
You could use PythonScript – download the latest using the Plugin Manager, or directly from the github repo releases. The Plugins > Python Script > Context-Help will bring up a help window; navigate to Notepad++ Object and scroll down to notepad.callback(function, notifications) for the syntax.
You can search this forum for “callback” to find other complete examples of how to set up a callback. (You would want to put the callback initialization in your
startup.pyin order to get it to be always enabled.) I believe there are also examples in the forum of applying a callback only to a particular type of file – for you, you’d presumably want it only if the file was a
I assume LuaScript would also have the notification/callback feature, too (though I could be wrong).