make 'static' dir, add not_found.html

This commit is contained in:
user 2022-11-28 02:35:02 +00:00
parent 8143da2ca4
commit 8239b2b02f
6 changed files with 15 additions and 4 deletions

View file

@ -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"
}
};
};
};

Binary file not shown.

View file

@ -1,3 +1,4 @@
LICENSE
README.md
_deleted_places
static/*

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

9
static/not_found.html Normal file
View file

@ -0,0 +1,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>not found</title>
<meta http-equiv="refresh" content="0;URL='https://veganprestwich.co.uk/'" />
</head>
<body>
<p>not found - redirecting to <a href="https://veganprestwich.co.uk">veganprestwich.co.uk</a>.</p>
</body>
</html>