Canonical URLs
This commit is contained in:
@@ -90,6 +90,12 @@ def inject_branding() -> dict:
|
||||
|
||||
return {'branding': brand, 'url': req_domain}
|
||||
|
||||
@app.context_processor
|
||||
def inject_globals():
|
||||
return {
|
||||
'canonical_url': f"https://jakec.tech{request.path}"
|
||||
}
|
||||
|
||||
@app.route('/')
|
||||
def index() -> str:
|
||||
''' Load the homepage '''
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
"@type": "BlogPosting",
|
||||
"headline": {{ metadata.title | tojson }},
|
||||
"datePublished": "{{ metadata.date }}",
|
||||
"image": "https://{{ url }}/image/{{ metadata.image }}",
|
||||
"image": "https://jakec.tech/image/{{ metadata.image }}",
|
||||
"timeRequired": "PT{{ get_readtime_mins(post) }}M",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Jake Charman",
|
||||
"url": "https://{{ url }}/"
|
||||
"url": "https://jakec.tech/"
|
||||
},
|
||||
"mainEntityOfPage": "https://{{ url }}/projects/{{ metadata.id }}"
|
||||
"mainEntityOfPage": "https://jakec.tech/projects/{{ metadata.id }}"
|
||||
}
|
||||
</script>
|
||||
<script type="application/ld+json">
|
||||
@@ -32,8 +32,8 @@
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{"@type": "ListItem", "position": 1, "name": "Projects", "item": "https://{{url}}/projects/"},
|
||||
{"@type": "ListItem", "position": 2, "name": {{ metadata.title | tojson }}, "item": "https://{{url}}/projects/{{ metadata.id }}"}
|
||||
{"@type": "ListItem", "position": 1, "name": "Projects", "item": "https://jakec.tech/projects/"},
|
||||
{"@type": "ListItem", "position": 2, "name": {{ metadata.title | tojson }}, "item": "https://jakec.tech/projects/{{ metadata.id }}"}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<hr />
|
||||
<p>When I'm not at work, I can often be found at <a href="https://santapod.com">Santa Pod Raceway</a> with <a href="https://nitrojunkie.uk">Nitro Junkie Racing</a></p>
|
||||
<p>We run a Top Fuel motorcycle purpose built for drag racing. The engine is loosely based on a Kawasaki Z 1000, but supercharged, and nitromethane injected to produce around 1,000 horsepower.</p>
|
||||
<p>I've also had the opportunity to work on a 10,000 horsepower Top Fuel Dragster. I <a href="https://jakecharman.co.uk/projects/topfuel_dragster">wrote about this on the Nitro Junkie website, and later extended that post here.</a></p>
|
||||
<p>I've also had the opportunity to work on a 10,000 horsepower Top Fuel Dragster. I <a href="/projects/topfuel_dragster">wrote about this on the Nitro Junkie website, and later extended that post here.</a></p>
|
||||
<div class="gallery">
|
||||
<iframe class="yt" src="https://www.youtube.com/embed/Wa-V8mQTXFk?si=W-LzfR3Qj_jgAdkY&clip=UgkxV9lBj4pP1cvnR5seb82RQpWeE7RdnOXB&clipt=EOrWtgsYyqu6Cw&autoplay=1&mute=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
<img alt="Jake working on a Top Fuel Dragster in the pits at Santa Pod Raceway" src="/static/images/jake_tf_1.jpg">
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta property="og:url" content="{{ canonical_url }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{% block description %}Personal website of Jake Charman. A technology professional based in the UK.{% endblock %}">
|
||||
<title>{{ page_title }}{{branding}}</title>
|
||||
<link rel="canonical" href="{{ canonical_url }}">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&family=Tourney:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Orbitron:wght@400..900&family=Tourney:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/static/style/mobile.css" />
|
||||
@@ -49,7 +51,7 @@
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"name": "{{ branding }}",
|
||||
"url": "https://{{ url }}/"
|
||||
"url": "https://jakec.tech/"
|
||||
}
|
||||
</script>
|
||||
{% block head %}{% endblock %}
|
||||
|
||||
@@ -22,22 +22,22 @@
|
||||
{% if metadata.updated %}
|
||||
"dateModified": "{{ metadata.updated }}",
|
||||
{% endif %}
|
||||
"image": "https://{{ url }}/image/{{ metadata.image }}",
|
||||
"image": "https://jakec.tech/image/{{ metadata.image }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Jake Charman",
|
||||
"url": "https://{{ url }}/"
|
||||
"url": "https://jakec.tech/"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Person",
|
||||
"name": "Jake Charman",
|
||||
"url": "https://{{ url }}/"
|
||||
"url": "https://jakec.tech/"
|
||||
},
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "https://{{ url }}/blog/{{ metadata.id }}"
|
||||
"@id": "https://jakec.tech/blog/{{ metadata.id }}"
|
||||
},
|
||||
"url": "https://{{ url }}/blog/{{ metadata.id }}",
|
||||
"url": "https://jakec.tech/blog/{{ metadata.id }}",
|
||||
"inLanguage": "en-GB"
|
||||
}
|
||||
</script>
|
||||
@@ -46,8 +46,8 @@
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{"@type": "ListItem", "position": 1, "name": "Projects", "item": "https://{{url}}/projects/"},
|
||||
{"@type": "ListItem", "position": 2, "name": {{ metadata.title | tojson }}, "item": "https://{{url}}/projects/{{ metadata.id }}"}
|
||||
{"@type": "ListItem", "position": 1, "name": "Projects", "item": "https://jakec.tech/projects/"},
|
||||
{"@type": "ListItem", "position": 2, "name": {{ metadata.title | tojson }}, "item": "https://jakec.tech/projects/{{ metadata.id }}"}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user