markdown-magic-last-modified
v1.0.1
Published
Print the last modified date using git for a given file
Downloads
7
Maintainers
Readme
Install command plugin
Add install command to markdown files via markdown-magic
Install
npm i markdown-magic markdown-magic-last-modified --save-dev
Adding the plugin
See example.js
for usage.
const fs = require('fs');
const path = require('path');
const markdownMagic = require('markdown-magic');
const config = {
transforms: {
LASTMODIFIED: require('./index.js'),
},
};
const markdownPath = path.join(__dirname, 'README.md');
markdownMagic(markdownPath, config);
Usage in markdown
README.md last modified Sat Mar 26 15:49:09 2022 +0100
Options
- file (current file by default) - file to get last modified date from (relative to the Markdown file)