diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2016-04-30 03:23:02 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2016-04-30 03:23:02 +0200 |
| commit | c4fd43b435b98ed83756c89aca84dc23a7551906 (patch) | |
| tree | d9efa090432034e69680ee49da0f321821f91946 | |
| parent | 251f17bde5c731f68914a20f40a68e1424d867e9 (diff) | |
pages: Get metadata generator value from pkg.version
Instead of hardcoding the version number and duplicating version strings
in markup, have Grunt grab the version value from package.json. Adds
Gruntfile value pkgVersion.
For consideration, this will cause some issues in efforts to remove
Grunt from Pomf 3.x branch. Right now it's still considerably the best
or simplest thing we can do.
Suggested-by: Eliot Whalan <ewhal@pantsu.cat>
Suggested-by: Austin Gillmann <alucard@cuntflaps.me>
| -rw-r--r-- | Gruntfile.js | 1 | ||||
| -rw-r--r-- | pages/layout.swig | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index 14c167f..2455ff7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -11,6 +11,7 @@ module.exports = function (grunt) { dest: 'dist', generateSitemap: false, generateRobotstxt: false, + pkgVersion: '<%= pkg.version %>', src: [ 'pages/index.swig', 'pages/faq.swig', diff --git a/pages/layout.swig b/pages/layout.swig index 65bf32e..348a7c9 100644 --- a/pages/layout.swig +++ b/pages/layout.swig @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="generator" content="Pomf 2.1.0"> + <meta name="generator" content="Pomf {{pkgVersion}}"> <title>Pantsu.cat · {% block title %}Kawaii File Hosting{% endblock %}</title> <link rel="icon" href="favicon.ico"> <link rel="stylesheet" href="pomf.min.css"> |
