Add canonical tag for the www version
This commit is contained in:
parent
de1b3b8d13
commit
db6eda37a4
10
.eleventy.js
10
.eleventy.js
|
@ -9,11 +9,13 @@ const placeImages = fg.sync([
|
|||
const Image = require("@11ty/eleventy-img");
|
||||
|
||||
module.exports = function (config) {
|
||||
config.addGlobalData("siteUrl", "https://www.veganprestwich.co.uk");
|
||||
|
||||
config.addShortcode("image", async (src, alt, sizes) => {
|
||||
let metadata = await Image(src, {
|
||||
widths: [150, 300],
|
||||
formats: ["webp", "jpeg"],
|
||||
outputDir: "./_site/img/"
|
||||
outputDir: "./_site/img/",
|
||||
});
|
||||
|
||||
let imageAttributes = {
|
||||
|
@ -49,15 +51,15 @@ module.exports = function (config) {
|
|||
config.addCollection("sorted_places", (api) => sortedPlaces(api));
|
||||
|
||||
config.addCollection("shops", (api) =>
|
||||
sortedPlaces(api).filter((a) => a.data.permalink && a.data.shop)
|
||||
sortedPlaces(api).filter((a) => a.data.permalink && a.data.shop),
|
||||
);
|
||||
|
||||
config.addCollection("restaurants", (api) =>
|
||||
sortedPlaces(api).filter((a) => a.data.permalink && a.data.restaurant)
|
||||
sortedPlaces(api).filter((a) => a.data.permalink && a.data.restaurant),
|
||||
);
|
||||
|
||||
config.addCollection("deliveries", (api) =>
|
||||
sortedPlaces(api).filter((a) => a.data.permalink && a.data.delivery)
|
||||
sortedPlaces(api).filter((a) => a.data.permalink && a.data.delivery),
|
||||
);
|
||||
|
||||
config.addWatchTarget("./style/style.scss");
|
||||
|
|
|
@ -1,26 +1,25 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="max-image-preview:large">
|
||||
<meta name="generator" content="Eleventy">
|
||||
{% capture styles %}
|
||||
{% include "../_site/style/style.css" %}
|
||||
{% endcapture %}
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="robots" content="max-image-preview:large" />
|
||||
<meta name="generator" content="Eleventy" />
|
||||
{% capture styles %} {% include "../_site/style/style.css" %} {% endcapture %}
|
||||
<style>
|
||||
{{ styles }}
|
||||
</style>
|
||||
<title>
|
||||
{%- if metaTitle %}
|
||||
{{ metaTitle | escape }}
|
||||
{%- elsif name %}
|
||||
{{ name | escape }}, Prestwich
|
||||
{%- elsif title %}
|
||||
{{ title | escape }}, Prestwich
|
||||
{%- else %}
|
||||
{{ site.title | escape }}
|
||||
{%- endif %}
|
||||
{%- if metaTitle %} {{ metaTitle | escape }} {%- elsif name %} {{ name |
|
||||
escape }}, Prestwich {%- elsif title %} {{ title | escape }}, Prestwich {%-
|
||||
else %} {{ site.title | escape }} {%- endif %}
|
||||
</title>
|
||||
<meta name="description" content="{{ excerpt | default: site.description | strip_html | truncate: 160 | escape }}">
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>💚</text></svg>" />
|
||||
<meta
|
||||
name="description"
|
||||
content="{{ excerpt | default: site.description | strip_html | truncate: 160 | escape }}"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>💚</text></svg>"
|
||||
/>
|
||||
<link rel="canonical" href="{{ siteUrl }}{{ page.url }}" />
|
||||
</head>
|
||||
|
|
1
package.json
Symbolic link
1
package.json
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/jxdir18sxqlflsgf5xva89hwgdxyj610-package.json
|
Loading…
Reference in a new issue