SEO improvements
This commit is contained in:
parent
b629ccf003
commit
453daa9319
30
package-lock.json
generated
30
package-lock.json
generated
@ -2014,6 +2014,16 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
"bindings": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"requires": {
|
||||||
|
"file-uri-to-path": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"bl": {
|
"bl": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
|
||||||
@ -3411,6 +3421,13 @@
|
|||||||
"integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==",
|
"integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"file-uri-to-path": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
"fill-range": {
|
"fill-range": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
||||||
@ -4723,6 +4740,13 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||||
},
|
},
|
||||||
|
"nan": {
|
||||||
|
"version": "2.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
|
||||||
|
"integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
"nanomatch": {
|
"nanomatch": {
|
||||||
"version": "1.2.13",
|
"version": "1.2.13",
|
||||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||||
@ -6889,7 +6913,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true,
|
||||||
|
"requires": {
|
||||||
|
"bindings": "^1.5.0",
|
||||||
|
"nan": "^2.12.1"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"glob-parent": {
|
"glob-parent": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
|
@ -3,7 +3,12 @@
|
|||||||
// the `slug` parameter is available because
|
// the `slug` parameter is available because
|
||||||
// this file is called [slug].svelte
|
// this file is called [slug].svelte
|
||||||
const articleRes = await this.fetch(`a/${params.slug}.json`);
|
const articleRes = await this.fetch(`a/${params.slug}.json`);
|
||||||
const article = await articleRes.json();
|
let article = await articleRes.json();
|
||||||
|
|
||||||
|
// parse article steps from numbered list
|
||||||
|
article.steps = [...article.html.matchAll(/>\d+\. ([^<]+)</g)]
|
||||||
|
.map(i => i[1])
|
||||||
|
.map(i => ({ "@type": "HowToStep", text: i }));
|
||||||
|
|
||||||
const commentsRes = await this.fetch(`a/${params.slug}/comments`);
|
const commentsRes = await this.fetch(`a/${params.slug}/comments`);
|
||||||
const comments = await commentsRes.json();
|
const comments = await commentsRes.json();
|
||||||
@ -166,6 +171,37 @@
|
|||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{article.title} | HOWFEED.BIZ</title>
|
<title>{article.title} | HOWFEED.BIZ</title>
|
||||||
|
<meta name="author" content={article.author.realname}>
|
||||||
|
{@html `<script type="application/ld+json">{
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "BreadcrumbList",
|
||||||
|
"itemListElement": [{
|
||||||
|
"@type": "ListItem",
|
||||||
|
"position": 1,
|
||||||
|
"name": "HowFeed.biz",
|
||||||
|
"item": "https://howfeed.biz"
|
||||||
|
},{
|
||||||
|
"@type": "ListItem",
|
||||||
|
"position": 2,
|
||||||
|
"name": "${article.category.name}",
|
||||||
|
"item": "https://howfeed.biz/c/${article.category.slug}"
|
||||||
|
},{
|
||||||
|
"@type": "ListItem",
|
||||||
|
"position": 3,
|
||||||
|
"name": "${article.title}",
|
||||||
|
"item": "https://howfeed.biz/a/${article.slug}"
|
||||||
|
}]
|
||||||
|
}</script>`}
|
||||||
|
{@html `<script type="application/ld+json">{
|
||||||
|
"@context": "http://schema.org",
|
||||||
|
"@type": "HowTo",
|
||||||
|
"image": {
|
||||||
|
"@type": "ImageObject",
|
||||||
|
"url": "https://howfeed.biz/a/${article.image}"
|
||||||
|
},
|
||||||
|
"name": ${JSON.stringify(article.title)},
|
||||||
|
"step": ${JSON.stringify(article.steps)}
|
||||||
|
}</script>`}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -19,6 +19,24 @@
|
|||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{category.name} Articles | HOWFEED.BIZ</title>
|
<title>{category.name} Articles | HOWFEED.BIZ</title>
|
||||||
|
<meta name="description" content={`Read our articles about ${category.name} on HowFeed.biz.`}>
|
||||||
|
<script type="application/ld+json">{`
|
||||||
|
{
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "BreadcrumbList",
|
||||||
|
"itemListElement": [{
|
||||||
|
"@type": "ListItem",
|
||||||
|
"position": 1,
|
||||||
|
"name": "HowFeed.biz",
|
||||||
|
"item": "https://howfeed.biz"
|
||||||
|
},{
|
||||||
|
"@type": "ListItem",
|
||||||
|
"position": 2,
|
||||||
|
"name": "${article.category.name}",
|
||||||
|
"item": "https://howfeed.biz/c/${article.category.slug}"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
`}</script>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>HOWFEED.BIZ</title>
|
<title>HOWFEED.BIZ</title>
|
||||||
|
<meta name="description" content="HOWFEED.BIZ: Helping you to navigate a modern world.">
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="background"></div>
|
<div class="background"></div>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset='utf-8'>
|
<meta charset='utf-8'>
|
||||||
<meta name='viewport' content='width=device-width,initial-scale=1.0'>
|
<meta name='viewport' content='width=device-width,initial-scale=1.0'>
|
||||||
<meta name='description' content='HOWFEED.BIZ: Helping you to navigate a modern world.'>
|
|
||||||
<meta name='keywords' content='news, satire, blog'>
|
<meta name='keywords' content='news, satire, blog'>
|
||||||
<meta name='theme-color' content='#508FC3'>
|
<meta name='theme-color' content='#508FC3'>
|
||||||
%sapper.base%
|
%sapper.base%
|
||||||
|
Loading…
x
Reference in New Issue
Block a user