From 28579dc25d1cda36afc0c3af7ffb623d4e1223e6 Mon Sep 17 00:00:00 2001 From: Stefan Burke Date: Sun, 27 Nov 2022 23:45:57 +0000 Subject: [PATCH] nearly there --- .build.yml | 19 + .eleventy.js | 49 +- .gitignore | 3 +- _deleted_places/_deleted_places.json | 3 + _filters/11ty_contains.js | 11 - _includes/head.html | 21 +- _includes/header.html | 6 +- .../layouts/{default.html => default.liquid} | 0 _includes/layouts/{home.html => home.liquid} | 4 +- _includes/layouts/page.html | 17 - _includes/layouts/page.liquid | 17 + _includes/layouts/place.html | 43 - _includes/layouts/place.liquid | 45 + _includes/layouts/{tag.html => tag.liquid} | 6 +- _includes/layouts/tags.html | 53 - _includes/layouts/tags.liquid | 54 + _includes/place-meta.html | 48 +- package-lock.json | 1784 +++++++++++++++-- package.json | 24 +- delivery.md => pages/delivery.md | 3 +- index.md => pages/index.md | 0 pages/pages.json | 4 + restaurants.md => pages/restaurants.md | 2 +- shops.md => pages/shops.md | 2 +- tags.md => pages/tags.md | 0 .../vegan-business-advice.md | 1 + {assets/places => places}/aldi/01.jpg | Bin {assets/places => places}/aldi/02.jpg | Bin {assets/places => places}/aldi/03.jpg | Bin {assets/places => places}/aldi/04.jpg | Bin {assets/places => places}/aldi/05.jpg | Bin {assets/places => places}/aldi/06.jpg | Bin {assets/places => places}/aldi/07.jpg | Bin {assets/places => places}/aldi/08.jpg | Bin {assets/places => places}/aldi/09.jpg | Bin {assets/places => places}/aldi/10.jpg | Bin {assets/places => places}/aldi/11.jpg | Bin {assets/places => places}/aldi/12.jpg | Bin .../places => places}/all-the-shapes/01.jpg | Bin .../places => places}/all-the-shapes/02.jpg | Bin .../places => places}/all-the-shapes/03.jpg | Bin .../places => places}/all-the-shapes/04.jpg | Bin .../places => places}/all-the-shapes/05.jpg | Bin .../places => places}/all-the-shapes/06.jpg | Bin {assets/places => places}/barley-cafe/01.jpg | Bin .../places => places}/brunchbox-bros/01.jpg | Bin .../places => places}/brunchbox-bros/02.jpg | Bin {assets/places => places}/campo-blanco/01.jpg | Bin {assets/places => places}/campo-blanco/02.jpg | Bin {assets/places => places}/campo-blanco/03.jpg | Bin .../places => places}/chips-at-no-8/01.jpg | Bin .../places => places}/chips-at-no-8/02.jpg | Bin .../places => places}/codis-kitchen/01.jpg | Bin {assets/places => places}/croma/01.jpg | Bin {assets/places => places}/cuckoo/01.jpg | Bin {assets/places => places}/cuckoo/02.jpg | Bin .../places => places}/dinner-by-ness/01.jpg | Bin .../places => places}/dinner-by-ness/02.jpg | Bin .../places => places}/dinner-by-ness/03.jpg | Bin .../places => places}/dinner-by-ness/04.jpg | Bin .../places => places}/dinner-by-ness/05.jpg | Bin .../places => places}/dinner-by-ness/06.jpg | Bin {assets/places => places}/dokes-pizza/01.jpg | Bin {assets/places => places}/dokes-pizza/02.jpg | Bin {assets/places => places}/farmfoods/01.jpg | Bin {assets/places => places}/farmfoods/02.jpg | Bin {assets/places => places}/farmfoods/03.jpg | Bin {assets/places => places}/farmfoods/04.jpg | Bin {assets/places => places}/farmfoods/05.jpg | Bin .../places => places}/friendship-inn/01.jpg | Bin .../places => places}/friendship-inn/02.jpg | Bin .../places => places}/friendship-inn/03.jpg | Bin .../places => places}/friendship-inn/04.jpg | Bin .../places => places}/friendship-inn/05.jpg | Bin .../places => places}/friendship-inn/06.jpg | Bin {assets/places => places}/goods-in/01.jpg | Bin {assets/places => places}/goods-in/02.jpg | Bin {assets/places => places}/goods-in/03.jpg | Bin {assets/places => places}/goods-in/04.jpg | Bin {assets/places => places}/greggs/01.jpg | Bin {assets/places => places}/greggs/02.jpg | Bin .../heaton-park-cafes/01.jpg | Bin .../heaton-park-cafes/02.jpg | Bin {assets/places => places}/iceland/01.jpg | Bin .../places => places}/istanbul-grill/01.jpg | Bin .../places => places}/istanbul-grill/02.jpg | Bin .../places => places}/istanbul-grill/03.jpg | Bin .../places => places}/istanbul-grill/04.jpg | Bin {assets/places => places}/lime-tree/01.jpg | Bin {assets/places => places}/lime-tree/02.jpg | Bin {assets/places => places}/lime-tree/03.jpg | Bin .../marks-and-spencers/01.jpg | Bin {assets/places => places}/moda/01.jpg | Bin {assets/places => places}/moda/02.jpg | Bin {assets/places => places}/moda/03.jpg | Bin {assets/places => places}/mozzarella/01.jpg | Bin {assets/places => places}/mozzarella/02.jpg | Bin .../nadias-street-food/01.jpg | Bin {assets/places => places}/nonnas/01.jpg | Bin {assets/places => places}/nonnas/02.jpg | Bin .../places => places}/pizza-express/01.jpg | Bin .../places => places}/pizza-express/02.jpg | Bin places/places.json | 4 +- {assets/places => places}/pound-bakery/01.jpg | Bin {assets/places => places}/pound-bakery/02.jpg | Bin {assets/places => places}/pres/01.jpg | Bin {assets/places => places}/pres/02.jpg | Bin {assets/places => places}/pres/03.jpg | Bin {assets/places => places}/pres/04.jpg | Bin {assets/places => places}/pres/05.jpg | Bin {assets/places => places}/pres/06.jpg | Bin {assets/places => places}/pres/07.jpg | Bin {assets/places => places}/pres/08.jpg | Bin .../prestwich-milk-deliveries/01.jpg | Bin .../places => places}/prestwich-social/01.jpg | Bin .../places => places}/prestwich-social/02.jpg | Bin .../places => places}/prestwich-social/03.jpg | Bin .../places => places}/prestwich-social/04.jpg | Bin {assets/places => places}/sainsburys/01.jpg | Bin {assets/places => places}/sallys-bakes/01.jpg | Bin {assets/places => places}/sallys-bakes/02.jpg | Bin {assets/places => places}/sallys-bakes/03.jpg | Bin {assets/places => places}/sallys-bakes/04.jpg | Bin {assets/places => places}/sallys-bakes/05.jpg | Bin {assets/places => places}/sallys-bakes/06.jpg | Bin {assets/places => places}/sallys-bakes/07.jpg | Bin {assets/places => places}/sallys-bakes/08.jpg | Bin {assets/places => places}/sallys-bakes/09.jpg | Bin {assets/places => places}/solita/01.jpg | Bin .../places => places}/sweet-bay-bakery/01.jpg | Bin .../places => places}/taos-restaurant/01.jpg | Bin {assets/places => places}/tesco-small/01.jpg | Bin {assets/places => places}/tgi-fridays/01.jpg | Bin .../places => places}/the-coffee-sack/01.jpg | Bin .../places => places}/the-coffee-sack/02.jpg | Bin .../places => places}/the-coffee-sack/03.jpg | Bin .../places => places}/the-coffee-sack/04.jpg | Bin {assets/places => places}/the-same-yet/01.jpg | Bin {assets/places => places}/time-for-tea/01.jpg | Bin {assets/places => places}/time-for-tea/02.jpg | Bin .../titos-asian-grill/01.jpg | Bin .../titos-asian-grill/02.jpg | Bin .../places => places}/village-greens/01.jpg | Bin .../places => places}/village-greens/02.jpg | Bin .../places => places}/village-greens/03.jpg | Bin .../places => places}/wine-and-wallop/01.jpg | Bin .../places => places}/wine-and-wallop/02.jpg | Bin .../places => places}/wine-and-wallop/03.jpg | Bin .../places => places}/wine-and-wallop/04.jpg | Bin .../places => places}/woodthorpe-hotel/01.jpg | Bin .../places => places}/woodthorpe-hotel/02.jpg | Bin .../places => places}/woodthorpe-hotel/03.jpg | Bin {assets/places => places}/yala-falafel/01.jpg | Bin {assets/places => places}/yala-falafel/02.jpg | Bin {assets/places => places}/yala-falafel/03.jpg | Bin {assets/places => places}/yala-falafel/04.jpg | Bin {assets/places => places}/yala-falafel/05.jpg | Bin {assets/places => places}/yala-falafel/06.jpg | Bin {assets/places => places}/yala-falafel/07.jpg | Bin {_sass => style}/minima/_base.scss | 0 {_sass => style}/minima/_layout.scss | 0 .../minima/_syntax-highlighting.scss | 0 style/minima/auto.scss | 361 ++++ style/minima/custom-styles.scss | 2 + style/minima/custom-variables.scss | 1 + style/minima/dark.scss | 5 + .../minima/initialize.scss | 4 +- _includes/main.scss => style/style.scss | 6 +- {_tags => tags}/pizza.md | 0 {_tags => tags}/supermarket.md | 0 tags/tags.json | 5 + 171 files changed, 2287 insertions(+), 320 deletions(-) create mode 100644 .build.yml create mode 100644 _deleted_places/_deleted_places.json delete mode 100644 _filters/11ty_contains.js rename _includes/layouts/{default.html => default.liquid} (100%) rename _includes/layouts/{home.html => home.liquid} (77%) delete mode 100644 _includes/layouts/page.html create mode 100644 _includes/layouts/page.liquid delete mode 100644 _includes/layouts/place.html create mode 100644 _includes/layouts/place.liquid rename _includes/layouts/{tag.html => tag.liquid} (84%) delete mode 100644 _includes/layouts/tags.html create mode 100644 _includes/layouts/tags.liquid rename delivery.md => pages/delivery.md (89%) rename index.md => pages/index.md (100%) create mode 100644 pages/pages.json rename restaurants.md => pages/restaurants.md (92%) rename shops.md => pages/shops.md (94%) rename tags.md => pages/tags.md (100%) rename vegan-business-advice.md => pages/vegan-business-advice.md (99%) rename {assets/places => places}/aldi/01.jpg (100%) rename {assets/places => places}/aldi/02.jpg (100%) rename {assets/places => places}/aldi/03.jpg (100%) rename {assets/places => places}/aldi/04.jpg (100%) rename {assets/places => places}/aldi/05.jpg (100%) rename {assets/places => places}/aldi/06.jpg (100%) rename {assets/places => places}/aldi/07.jpg (100%) rename {assets/places => places}/aldi/08.jpg (100%) rename {assets/places => places}/aldi/09.jpg (100%) rename {assets/places => places}/aldi/10.jpg (100%) rename {assets/places => places}/aldi/11.jpg (100%) rename {assets/places => places}/aldi/12.jpg (100%) rename {assets/places => places}/all-the-shapes/01.jpg (100%) rename {assets/places => places}/all-the-shapes/02.jpg (100%) rename {assets/places => places}/all-the-shapes/03.jpg (100%) rename {assets/places => places}/all-the-shapes/04.jpg (100%) rename {assets/places => places}/all-the-shapes/05.jpg (100%) rename {assets/places => places}/all-the-shapes/06.jpg (100%) rename {assets/places => places}/barley-cafe/01.jpg (100%) rename {assets/places => places}/brunchbox-bros/01.jpg (100%) rename {assets/places => places}/brunchbox-bros/02.jpg (100%) rename {assets/places => places}/campo-blanco/01.jpg (100%) rename {assets/places => places}/campo-blanco/02.jpg (100%) rename {assets/places => places}/campo-blanco/03.jpg (100%) rename {assets/places => places}/chips-at-no-8/01.jpg (100%) rename {assets/places => places}/chips-at-no-8/02.jpg (100%) rename {assets/places => places}/codis-kitchen/01.jpg (100%) rename {assets/places => places}/croma/01.jpg (100%) rename {assets/places => places}/cuckoo/01.jpg (100%) rename {assets/places => places}/cuckoo/02.jpg (100%) rename {assets/places => places}/dinner-by-ness/01.jpg (100%) rename {assets/places => places}/dinner-by-ness/02.jpg (100%) rename {assets/places => places}/dinner-by-ness/03.jpg (100%) rename {assets/places => places}/dinner-by-ness/04.jpg (100%) rename {assets/places => places}/dinner-by-ness/05.jpg (100%) rename {assets/places => places}/dinner-by-ness/06.jpg (100%) rename {assets/places => places}/dokes-pizza/01.jpg (100%) rename {assets/places => places}/dokes-pizza/02.jpg (100%) rename {assets/places => places}/farmfoods/01.jpg (100%) rename {assets/places => places}/farmfoods/02.jpg (100%) rename {assets/places => places}/farmfoods/03.jpg (100%) rename {assets/places => places}/farmfoods/04.jpg (100%) rename {assets/places => places}/farmfoods/05.jpg (100%) rename {assets/places => places}/friendship-inn/01.jpg (100%) rename {assets/places => places}/friendship-inn/02.jpg (100%) rename {assets/places => places}/friendship-inn/03.jpg (100%) rename {assets/places => places}/friendship-inn/04.jpg (100%) rename {assets/places => places}/friendship-inn/05.jpg (100%) rename {assets/places => places}/friendship-inn/06.jpg (100%) rename {assets/places => places}/goods-in/01.jpg (100%) rename {assets/places => places}/goods-in/02.jpg (100%) rename {assets/places => places}/goods-in/03.jpg (100%) rename {assets/places => places}/goods-in/04.jpg (100%) rename {assets/places => places}/greggs/01.jpg (100%) rename {assets/places => places}/greggs/02.jpg (100%) rename {assets/places => places}/heaton-park-cafes/01.jpg (100%) rename {assets/places => places}/heaton-park-cafes/02.jpg (100%) rename {assets/places => places}/iceland/01.jpg (100%) rename {assets/places => places}/istanbul-grill/01.jpg (100%) rename {assets/places => places}/istanbul-grill/02.jpg (100%) rename {assets/places => places}/istanbul-grill/03.jpg (100%) rename {assets/places => places}/istanbul-grill/04.jpg (100%) rename {assets/places => places}/lime-tree/01.jpg (100%) rename {assets/places => places}/lime-tree/02.jpg (100%) rename {assets/places => places}/lime-tree/03.jpg (100%) rename {assets/places => places}/marks-and-spencers/01.jpg (100%) rename {assets/places => places}/moda/01.jpg (100%) rename {assets/places => places}/moda/02.jpg (100%) rename {assets/places => places}/moda/03.jpg (100%) rename {assets/places => places}/mozzarella/01.jpg (100%) rename {assets/places => places}/mozzarella/02.jpg (100%) rename {assets/places => places}/nadias-street-food/01.jpg (100%) rename {assets/places => places}/nonnas/01.jpg (100%) rename {assets/places => places}/nonnas/02.jpg (100%) rename {assets/places => places}/pizza-express/01.jpg (100%) rename {assets/places => places}/pizza-express/02.jpg (100%) rename {assets/places => places}/pound-bakery/01.jpg (100%) rename {assets/places => places}/pound-bakery/02.jpg (100%) rename {assets/places => places}/pres/01.jpg (100%) rename {assets/places => places}/pres/02.jpg (100%) rename {assets/places => places}/pres/03.jpg (100%) rename {assets/places => places}/pres/04.jpg (100%) rename {assets/places => places}/pres/05.jpg (100%) rename {assets/places => places}/pres/06.jpg (100%) rename {assets/places => places}/pres/07.jpg (100%) rename {assets/places => places}/pres/08.jpg (100%) rename {assets/places => places}/prestwich-milk-deliveries/01.jpg (100%) rename {assets/places => places}/prestwich-social/01.jpg (100%) rename {assets/places => places}/prestwich-social/02.jpg (100%) rename {assets/places => places}/prestwich-social/03.jpg (100%) rename {assets/places => places}/prestwich-social/04.jpg (100%) rename {assets/places => places}/sainsburys/01.jpg (100%) rename {assets/places => places}/sallys-bakes/01.jpg (100%) rename {assets/places => places}/sallys-bakes/02.jpg (100%) rename {assets/places => places}/sallys-bakes/03.jpg (100%) rename {assets/places => places}/sallys-bakes/04.jpg (100%) rename {assets/places => places}/sallys-bakes/05.jpg (100%) rename {assets/places => places}/sallys-bakes/06.jpg (100%) rename {assets/places => places}/sallys-bakes/07.jpg (100%) rename {assets/places => places}/sallys-bakes/08.jpg (100%) rename {assets/places => places}/sallys-bakes/09.jpg (100%) rename {assets/places => places}/solita/01.jpg (100%) rename {assets/places => places}/sweet-bay-bakery/01.jpg (100%) rename {assets/places => places}/taos-restaurant/01.jpg (100%) rename {assets/places => places}/tesco-small/01.jpg (100%) rename {assets/places => places}/tgi-fridays/01.jpg (100%) rename {assets/places => places}/the-coffee-sack/01.jpg (100%) rename {assets/places => places}/the-coffee-sack/02.jpg (100%) rename {assets/places => places}/the-coffee-sack/03.jpg (100%) rename {assets/places => places}/the-coffee-sack/04.jpg (100%) rename {assets/places => places}/the-same-yet/01.jpg (100%) rename {assets/places => places}/time-for-tea/01.jpg (100%) rename {assets/places => places}/time-for-tea/02.jpg (100%) rename {assets/places => places}/titos-asian-grill/01.jpg (100%) rename {assets/places => places}/titos-asian-grill/02.jpg (100%) rename {assets/places => places}/village-greens/01.jpg (100%) rename {assets/places => places}/village-greens/02.jpg (100%) rename {assets/places => places}/village-greens/03.jpg (100%) rename {assets/places => places}/wine-and-wallop/01.jpg (100%) rename {assets/places => places}/wine-and-wallop/02.jpg (100%) rename {assets/places => places}/wine-and-wallop/03.jpg (100%) rename {assets/places => places}/wine-and-wallop/04.jpg (100%) rename {assets/places => places}/woodthorpe-hotel/01.jpg (100%) rename {assets/places => places}/woodthorpe-hotel/02.jpg (100%) rename {assets/places => places}/woodthorpe-hotel/03.jpg (100%) rename {assets/places => places}/yala-falafel/01.jpg (100%) rename {assets/places => places}/yala-falafel/02.jpg (100%) rename {assets/places => places}/yala-falafel/03.jpg (100%) rename {assets/places => places}/yala-falafel/04.jpg (100%) rename {assets/places => places}/yala-falafel/05.jpg (100%) rename {assets/places => places}/yala-falafel/06.jpg (100%) rename {assets/places => places}/yala-falafel/07.jpg (100%) rename {_sass => style}/minima/_base.scss (100%) rename {_sass => style}/minima/_layout.scss (100%) rename {_sass => style}/minima/_syntax-highlighting.scss (100%) create mode 100644 style/minima/auto.scss create mode 100644 style/minima/custom-styles.scss create mode 100644 style/minima/custom-variables.scss create mode 100644 style/minima/dark.scss rename _sass/minima.scss => style/minima/initialize.scss (96%) rename _includes/main.scss => style/style.scss (96%) rename {_tags => tags}/pizza.md (100%) rename {_tags => tags}/supermarket.md (100%) create mode 100644 tags/tags.json diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..ace1441 --- /dev/null +++ b/.build.yml @@ -0,0 +1,19 @@ +image: alpine/edge +packages: + - nodejs +sources: + - https://git.sr.ht/~stfn/vegan-prestwich-11ty +secrets: + - b56325c2-cd2c-4a22-b5e9-8c43db571721 +tasks: + - setup: | + npm install + - build: | + cd vegan-prestwich + npm run build + - deploy: | + cd vegan-prestwich + set +x + export NEOCITIES_API_KEY=$(cat ~/.neocities_api_key) + set -x + neocities push --prune _site diff --git a/.eleventy.js b/.eleventy.js index 02f069f..917b2d4 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,27 +1,38 @@ +const fg = require('fast-glob'); + +const placeImages = fg.sync(['places/*/*.jpg', '!**/_site']); + module.exports = function(config) { - if (process.env.NOWATCH) { - config.setBrowserSyncConfig({ - snippetOptions: { - blacklist: ["**/*.html"], - } - }) + // Aliases are in relation to the _includes folder + config.addLayoutAlias('default', 'layouts/default.liquid'); + config.addLayoutAlias('home', 'layouts/home.liquid'); + config.addLayoutAlias('page', 'layouts/page.liquid'); + config.addLayoutAlias('place', 'layouts/place.liquid'); + config.addLayoutAlias('tag', 'layouts/tag.liquid'); + config.addLayoutAlias('tags', 'layouts/tags.liquid'); + + let getAllSorted = (api) => { + return api.getAll().sort((a, b) => { a.name - b.name }); } - // Aliases are in relation to the _includes folder - config.addLayoutAlias('default', 'layouts/default.html'); - config.addLayoutAlias('home', 'layouts/home.html'); - config.addLayoutAlias('page', 'layouts/page.html'); - config.addLayoutAlias('place', 'layouts/place.html'); - config.addLayoutAlias('tag', 'layouts/tag.html'); - config.addLayoutAlias('tags', 'layouts/tags.html'); + config.addCollection("shops", (api) => + getAllSorted(api).filter((a) => a.data.permalink && a.data.shop)); + + config.addCollection("restaurants", (api) => + getAllSorted(api).filter((a) => a.data.permalink && a.data.restaurant)); + + config.addCollection("deliveries", (api) => + getAllSorted(api).filter((a) => a.data.permalink && a.data.delivery)); + + config.addWatchTarget("./style/style.scss"); + + config.addCollection("place_images", (collection) => placeImages);; + config.addPassthroughCopy("places/*/*.jpg"); - config.addCollection("shops", (api) => api.getAll().filter((a) => a.data.shop)); - config.addCollection("restaurants", (api) => api.getAll().filter((a) => a.data.restaurant)); - config.addCollection("deliveries", (api) => api.getAll().filter((a) => a.data.delivery)); return { dir: { - input: "./", // Equivalent to Jekyll's source property - output: "./_site" // Equivalent to Jekyll's destination property + input: "./", + output: "./_site" } }; -}; +}; \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3b1f009..870740d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,10 @@ .bundle .DS_Store -.jekyll-metadata .sass-cache _site Cache vendor Gemfile.lock -.jekyll-cache +.eleventy.js.swp .neocities node_modules diff --git a/_deleted_places/_deleted_places.json b/_deleted_places/_deleted_places.json new file mode 100644 index 0000000..727d5c2 --- /dev/null +++ b/_deleted_places/_deleted_places.json @@ -0,0 +1,3 @@ +{ + "permalink": false +} \ No newline at end of file diff --git a/_filters/11ty_contains.js b/_filters/11ty_contains.js deleted file mode 100644 index 8adaeeb..0000000 --- a/_filters/11ty_contains.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = function (arr, key, value) { - return arr.filter(item => { - const keys = key.split('.'); - const reduce = keys.reduce((object, key) => { - return object[key]; - }, item); - const str = String(reduce); - return (str.includes(value) ? item : false); - }); -}; - diff --git a/_includes/head.html b/_includes/head.html index 2be6ddf..93d91d4 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -2,17 +2,22 @@ - + {% capture styles %} + {% include "../_site/style/style.css" %} + {% endcapture %} + - {% if page.metaTitle %} - {{ page.metaTitle | escape }} - {% else if page.name %} - {{ page.name | escape }}, Prestwich - {% else if page.title %} - {{page.title | escape }}, Prestwich + {% if metaTitle %} + {{ metaTitle | escape }} + {% else if name %} + {{ name | escape }}, Prestwich + {% else if title %} + {{ title | escape }}, Prestwich {% else %} {{ site.title | escape }} {% endif %} - + diff --git a/_includes/header.html b/_includes/header.html index 89585b9..88670fb 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -16,10 +16,10 @@
- {% assign top-links = site.pages | sort: "order" %} + {% assign top-links = collections.pages | sort: "order" %} {% for link-page in top-links %} - {% if link-page.link-text %} - {{ link-page.link-text | escape }} + {% if link-page.data.link-text %} + {{ link-page.data.link-text | escape }} {% endif %} {% endfor %}
diff --git a/_includes/layouts/default.html b/_includes/layouts/default.liquid similarity index 100% rename from _includes/layouts/default.html rename to _includes/layouts/default.liquid diff --git a/_includes/layouts/home.html b/_includes/layouts/home.liquid similarity index 77% rename from _includes/layouts/home.html rename to _includes/layouts/home.liquid index 9a81678..90cb7cc 100644 --- a/_includes/layouts/home.html +++ b/_includes/layouts/home.liquid @@ -28,9 +28,9 @@ layout: default

Recent updates: - {% assign recently_updated = site.places | sort: "last_modified_at" | reverse | slice: 0, 10 %} + {% assign recently_updated = collections.places | sort: "last_modified_at" | reverse | slice: 0, 10 %} {% for place in recently_updated %} - {{ place.name | escape }}{% unless forloop.last %}, {% endunless %} + {{ place.data.name | escape }}{% unless forloop.last %}, {% endunless %} {% endfor %}

diff --git a/_includes/layouts/page.html b/_includes/layouts/page.html deleted file mode 100644 index 9b0a35f..0000000 --- a/_includes/layouts/page.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -layout: default ---- - -

{{ page.title | escape }}

- -
- {{ content }} - - {% if page.show %} -
- {% include "filtered-places.html", show=page.show, detailed=true %} -
- {% endif %} - - {% include "contribute.html" %} -
diff --git a/_includes/layouts/page.liquid b/_includes/layouts/page.liquid new file mode 100644 index 0000000..63f181b --- /dev/null +++ b/_includes/layouts/page.liquid @@ -0,0 +1,17 @@ +--- +layout: default +--- + +

{{ title | escape }}

+ +
+ {{ content }} + {{ foo | json }} + {% if show %} +
+ {% include "filtered-places", show: collections[show], detailed: true %} +
+ {% endif %} + + {% include "contribute.html" %} +
diff --git a/_includes/layouts/place.html b/_includes/layouts/place.html deleted file mode 100644 index 54fa5ab..0000000 --- a/_includes/layouts/place.html +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: default ---- - -{% include "place-json-ld.html" %} - -

{{ page.name | escape }}

- -
- {% include "place-meta.html" %} - {{ content }} - -

- - Last Updated: {{ page.last_modified_at | date: "%-d %B %Y" }} - -

- -
- {% assign place_images = site.static_files | where: "place_image", true | reverse %} - {% for image in place_images %} - {% assign end_image_index = image.path.size | minus: 22 %} - {% assign search_image = image.path | slice: 15, end_image_index %} - - {% assign end_page_index = page.path.size | minus: 11 %} - {% assign search_page = page.path | slice: 8, end_page_index %} - - {% if search_image == search_page %} - - {% endif %} - {% endfor %} -
- -

- - Tags: - {% assign tags = page.tags | sort %} - {% for tag in tags %}{% unless forloop.first %}, {% endunless %} - {% assign tag_page = site.tags | where: "slug", tag | first %} - {% if tag_page %}{% endif %}{{ tag }}{% if tag_page %}{% endif %}{% endfor %} - -

-
diff --git a/_includes/layouts/place.liquid b/_includes/layouts/place.liquid new file mode 100644 index 0000000..bb670b7 --- /dev/null +++ b/_includes/layouts/place.liquid @@ -0,0 +1,45 @@ +--- +layout: default +--- + +{% include "place-json-ld.html" %} + +

{{ name | escape }}

+ +
+ {% include "place-meta.html" %} + {{ content }} + +

+ + Last Updated: {{ last_modified_at | date: "%-d %B %Y" }} + +

+ + +
+ {% assign place_images = collections.place_images | reverse %} + {% for image in place_images %} + {% capture absolute_url %}/{{image}}{% endcapture %} + {% assign folder_size = absolute_url.size | minus: 6 %} + {% capture absolute_folder %}{{ absolute_url | slice: 0, folder_size }}{% endcapture %} + {% if absolute_folder == page.url %} + + {% endif %} + {% endfor %} +
+ +

+ + Tags: + {% assign tags = tags | sort | remove: "places" %} + {% for tag in tags %}{% unless forloop.first %}, {% endunless %} + {% assign tag_page = site.tags | where: "slug", tag | first %} + {% if tag_page %}{% endif %}{{ tag }}{% if tag_page %}{% endif %}{% endfor %} + +

+
diff --git a/_includes/layouts/tag.html b/_includes/layouts/tag.liquid similarity index 84% rename from _includes/layouts/tag.html rename to _includes/layouts/tag.liquid index ee7efa2..e226091 100644 --- a/_includes/layouts/tag.html +++ b/_includes/layouts/tag.liquid @@ -2,13 +2,13 @@ layout: default --- -

{{ page.title | escape }}

+

{{ title | escape }}

{{ content }} {% if chains.size > 0 %} -

{{ page.non_chain_intro }}

+

{{ non_chain_intro }}

{% endif %}