From 99925558b80a17ffa52025f839b5679894f9f749 Mon Sep 17 00:00:00 2001 From: Kristinita Date: Fri, 21 Apr 2017 20:00:57 +0300 Subject: [PATCH] [Fix] #30 --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4073afb..ec7fee2 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ Right click on a file being edit, and access the commands under the **SublimePel If you think it's hard to remember what tags you've used when writing articles, then this command is made for you. This command lists tags you've used in your Pelican site in the quick panel, allowing you to fuzzily select and insert a previously used tag quickly. -* **Pelican: Update Article Date** +* **Pelican: Update Modified Date** This command updates the date metadata field to current date and time. @@ -124,6 +124,26 @@ Instead, customize your settings in **Preferences** > **Package Settings** > **S Default value: `"save"` +#### Modified date generation + +You can automatically update last modified date: + +![Update modified](http://i.imgur.com/L0po0FS.gif) + +Please, install [**Hooks**](https://packagecontrol.io/packages/Hooks) package → open any page/article in syntax, that you use for Pelican pages/articles → in Menu bar: `Preferences` → `Settings` - `Syntax Specific` → add in right-side file this lines: + +```json +"on_pre_save_language": [{ + "command": "pelican_update_modified_date" +}], +``` + +Save file. + +Now if you run `save` command for saving your article or page, your modified date will update automatically. + +**Note**: command `pelican_update_modified_date` will run in all files for syntax, in which you write your pages and articles, if file contains `:?Modified:\s*` string. + ### Customizable metadata template * **article_metadata_template**