metalsmith-source-link
v1.0.1
Published
A Metalsmith plugin that puts the link to your content source in file metadata.
Downloads
3
Readme
metalsmith-source-link
Plugin to add a link to your content src on github (or elsewhere) from the template.
Installation
$ npm install metalsmith-source-link --save
Usage
var Metalsmith = require('metalsmith');
var sourcelink = require('metalsmith-source-link');
Metalsmith
.use(sourcelink('https://github.com/earnubs/field-notes/tree/master/'))
Each file then has a sourceURL
property which can be used in templates like so:
<a href="{{ sourceURL }}">See the source for this file on Github.</a>
Licence
MIT