diff --git a/.eleventy.js b/.eleventy.js index 4497189..d8b3cdd 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -13,7 +13,7 @@ module.exports = function(config) { let sortedPlaces = (api) => { return api.getAll().filter((a) => { - return a.data.tags.indexOf("places") != -1; + return a.data.tags && a.data.tags.indexOf("places") != -1; }).sort((a, b) => { return a.data.name.localeCompare(b.data.name); }); @@ -34,8 +34,9 @@ module.exports = function(config) { config.addCollection("place_images", (collection) => placeImages);; config.addPassthroughCopy("places/*/*.jpg"); - config.addPassthroughCopy("robots.txt"); - config.addPassthroughCopy("favicon.ico"); + config.addPassthroughCopy("static/robots.txt"); + config.addPassthroughCopy("static/not_found.html"); + config.addPassthroughCopy("static/favicon.ico"); config.addFilter('where', (array, key, value) => { return (array || []).filter(item => { @@ -65,4 +66,4 @@ module.exports = function(config) { output: "./_site" } }; -}; \ No newline at end of file +}; diff --git a/.eleventy.js.swp b/.eleventy.js.swp deleted file mode 100644 index 28876ea..0000000 Binary files a/.eleventy.js.swp and /dev/null differ diff --git a/.eleventyignore b/.eleventyignore index 5d8df2b..3d74542 100644 --- a/.eleventyignore +++ b/.eleventyignore @@ -1,3 +1,4 @@ LICENSE README.md _deleted_places +static/* diff --git a/favicon.ico b/static/favicon.ico similarity index 100% rename from favicon.ico rename to static/favicon.ico diff --git a/static/not_found.html b/static/not_found.html new file mode 100644 index 0000000..05a530e --- /dev/null +++ b/static/not_found.html @@ -0,0 +1,9 @@ + +
+not found - redirecting to veganprestwich.co.uk.
+ + diff --git a/robots.txt b/static/robots.txt similarity index 100% rename from robots.txt rename to static/robots.txt