Browse Source

Fix theme variables

Kevin van Zonneveld 9 years ago
parent
commit
07c9ec5c7b
2 changed files with 4 additions and 4 deletions
  1. 2 2
      website/themes/uppy/layout/example.ejs
  2. 2 2
      website/update.js

+ 2 - 2
website/themes/uppy/layout/example.ejs

@@ -12,9 +12,9 @@
 
     We're on a monthly
     <a href="https://github.com/transloadit/uppy/blob/master/CHANGELOG.md">monthly release cycle</a>
-    and our latest version is v<%- config.uppy_gz_size %>, but the example
+    and our latest version is v<%- theme.uppy_version %>, but the example
     pages reflect the latest work in our master branch, so here's
-    <a href="https://github.com/transloadit/uppy/compare/v<%- config.uppy_version %>...master">what changed since v<%- config.uppy_version %></a>.
+    <a href="https://github.com/transloadit/uppy/compare/v<%- theme.uppy_version %>...master">what changed since v<%- theme.uppy_version %></a>.
   </p>
 
 

+ 2 - 2
website/update.js

@@ -7,7 +7,7 @@ var uppyRoot = path.dirname(__dirname)
 
 var configPath = webRoot + '/themes/uppy/_config.yml'
 var version = require(uppyRoot + '/package.json').version
-var configTemplate = '# Uppy versions, auto updated by update.js\nuppy_version: 0.0.1\n\nuppy_dev_size: "0.0"\nuppy_min_size: "0.0"\nuppy_gz_size: "0.0"'
+var configTemplate = '# Uppy versions, auto updated by update.js\nuppy_version: "0.0.1"\n\nuppy_dev_size: "0.0"\nuppy_min_size: "0.0"\nuppy_gz_size: "0.0"'
 var config
 try {
   config = fs.readFileSync(configPath, 'utf-8')
@@ -37,7 +37,7 @@ for (var file in locations) {
 fs.writeFileSync(
   configPath,
   config
-    .replace(/uppy_version: .*/, 'uppy_version: ' + version)
+    .replace(/uppy_version: .*/, 'uppy_version: "' + version + '"')
     .replace(/uppy_(\w+)_size:.*/g, function (m, p1) {
       return 'uppy_' + p1 + '_size: "' + (sizes[p1] || 99999) + '"'
     })