Commit ed3da471 authored by Isabella Skořepová's avatar Isabella Skořepová

Fix sitegin not copying files from static

if path contains "git". Should be if contains ".git"
parent 36225b8d
Pipeline #154 passed with stages
......@@ -111,7 +111,7 @@ var copyStaticFiles = function(builddir, staticdir,themedir) {
fsextra.copy(
staticdir,
builddir,
function(file){ return !(file.match('.git') || file.match('static/articles')); },
function(file){ return !(file.match('\\.git') || file.match('static/articles')); },
function(){console.log('copy static done');}
);
fsextra.copy(
......
......@@ -11,13 +11,11 @@ var readRedirectWorker = function(content, obj) {
throw e;
}
obj.content = obj.metadata.target;
console.log(obj.file)
obj.file = obj.file.split(path.sep).join('/');
if(obj.file.match(/^redirects\/(.*)index\.toml/))
obj.file = obj.file.replace(/^redirects\/(.*)index\.toml/,'$1');
else
obj.file = obj.file.replace(/^redirects\/(.*)\.toml/,'$1');
console.log(obj.file)
return obj;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment