Skip to content

Commit 5b619ad

Browse files
Seo jsonld+
1 parent 37f43ae commit 5b619ad

File tree

5 files changed

+344
-124
lines changed

5 files changed

+344
-124
lines changed

layouts/partials/header.html

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
1-
<!-- Google Tag Manager -->
2-
<!-- Google tag (gtag.js) -->
3-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VM01Q3R43D"></script>
4-
<script>
5-
window.dataLayer = window.dataLayer || [];
6-
function gtag(){dataLayer.push(arguments);}
7-
gtag('js', new Date());
8-
gtag('config', 'G-VM01Q3R43D');
9-
</script>
101
<meta charset="UTF-8">
112
<meta name="viewport" content="width=device-width, initial-scale=1.0">
12-
<meta name="msapplication-TileColor" content="#e5e9f4">
13-
<meta name="theme-color" content="#e5e9f4">
14-
<meta name="keywords" content="Codefrydev,CFD,NET,Tutorials,Design,Games,unity,c#,godot">
15-
<meta name="description" content="CodeFryDev is your ultimate destination for diverse digital content and tools. Enjoy our extensive game collection, innovative productivity apps, and micro applications for quick solutions. Access educational materials, interactive courses, and comprehensive tutorials for all skill levels. Fuel your creativity with design resources and versatile tools for efficient project completion. Visit CodeFryDev today and explore all we have to offer!">
3+
<title>CodeFryDev | Games, Apps, Tutorials, and Design Tools</title>
4+
5+
<meta name="description" content="CodeFryDev is your ultimate destination for diverse digital content and tools. Enjoy our extensive game collection, innovative productivity apps, and comprehensive tutorials.">
166
<meta name="author" content="CodeFryDev">
7+
<meta name="keywords" content="Codefrydev,CFD,NET,Tutorials,Design,Games,unity,c#,godot">
8+
<meta name="robots" content="index, follow">
9+
<link rel="canonical" href="https://www.codefrydev.in/">
10+
11+
<meta property="og:title" content="CodeFryDev | Games, Apps, Tutorials, and Design Tools">
12+
<meta property="og:description" content="Your ultimate destination for diverse digital content, including games, productivity apps, educational tutorials, and design resources.">
13+
<meta property="og:image" content="https://www.codefrydev.in/og-image.png"> <meta property="og:url" content="https://www.codefrydev.in/">
14+
<meta property="og:type" content="website">
1715

16+
<meta name="twitter:card" content="summary_large_image">
17+
<meta name="twitter:title" content="CodeFryDev | Games, Apps, Tutorials, and Design Tools">
18+
<meta name="twitter:description" content="Your ultimate destination for diverse digital content, including games, productivity apps, educational tutorials, and design resources.">
19+
<meta name="twitter:image" content="https://www.codefrydev.in/mstile-310x310.png">
1820
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
1921
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
20-
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
22+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
23+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VM01Q3R43D"></script>
2124
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#e5e9f4">
25+
<script>
26+
window.dataLayer = window.dataLayer || [];
27+
function gtag() { dataLayer.push(arguments); }
28+
gtag('js', new Date());
29+
gtag('config', 'G-VM01Q3R43D');
30+
</script>
2231

2332
<title>{{ .Title }}</title>
33+
<meta name="msapplication-TileColor" content="#e5e9f4">
34+
<meta name="theme-color" content="#e5e9f4">
2435
{{ partial "site_schema.html" . }}
2536

2637
<!--

layouts/partials/site_schema.html

Lines changed: 45 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
{{- /*
2+
Define a list of data files to include in the schema.
3+
These are the base names of the files in your /data/ directory (without .yaml).
4+
You can easily add or remove items here, e.g., "history", "ai", etc.
5+
*/ -}}
6+
{{ $dataFilesToInclude := slice "designlab" "games" "ai" "home" }}
7+
8+
{{- /* Create an empty list to hold all items from the files */ -}}
9+
{{ $allItems := slice }}
10+
{{- range $fileKey := $dataFilesToInclude -}}
11+
{{- /* Check if the data file exists and has content */ -}}
12+
{{- /* FIX: Use $.Site.Data instead of .Site.Data.
13+
'$' refers to the top-level context, while '.' refers to the current item in the loop.
14+
*/ -}}
15+
{{- with index $.Site.Data $fileKey -}}
16+
{{- /* Check if the file has a "data" key with a list of items */ -}}
17+
{{- with .data -}}
18+
{{- /* Add the items from this file to our master list */ -}}
19+
{{ $allItems = $allItems | append . }}
20+
{{- end -}}
21+
{{- end -}}
22+
{{- end -}}
23+
24+
125
{{ if .IsHome -}}
226
<script type="application/ld+json">
327
{
@@ -7,12 +31,25 @@
731
"url": "{{ .Site.BaseURL }}",
832
"description": "{{ .Site.Params.description }}",
933
"thumbnailUrl": "{{ .Site.Params.Logo | absURL }}",
10-
"license": "{{ .Site.Params.Copyright }}"
34+
"license": "{{ .Site.Params.Copyright }}"{{ if $allItems }},
35+
"hasPart": [
36+
{{- /* Loop through the combined list of all items */ -}}
37+
{{- range $index, $item := $allItems -}}
38+
{{ if $index }},{{ end }}
39+
{
40+
"@type": "CreativeWork",
41+
"name": "{{ $item.name }}",
42+
"url": "{{ $item.url | absURL }}"
43+
}
44+
{{- end -}}
45+
]
46+
{{- end }}
1147
}
1248
</script>
13-
{{ else if .IsPage }}
14-
{{ $author := or (.Params.author) (.Site.Author.name) }}
15-
{{ $org_name := .Site.Title }}
49+
{{ else -}}
50+
{{- /* This block for all other pages remains the same */ -}}
51+
{{ $author := or (.Params.author) (.Site.Author.name) }}
52+
{{ $org_name := .Site.Title }}
1653
<script type="application/ld+json">
1754
{
1855
"@context": "http://schema.org",
@@ -21,7 +58,7 @@
2158
"name": "{{ .Title | safeJS }}",
2259
"headline": "{{ .Title | safeJS }}",
2360
"alternativeHeadline": "{{ .Params.lead }}",
24-
"description": "{{ if .Description }}{{ .Description | safeJS }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}",
61+
"description": "{{ if .Description }}{{ .Description | safeJS }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}",
2562
"inLanguage": {{ .Site.LanguageCode | default "en-us" }},
2663
"isFamilyFriendly": "true",
2764
"mainEntityOfPage": {
@@ -56,64 +93,12 @@
5693
"height":"32"
5794
}
5895
},
59-
"image": {{ if .Params.images }}[{{ range $i, $e := .Params.images }}{{ if $i }}, {{ end }}{{ $e | absURL }}{{ end }}]{{ else}}{{.Site.Params.logo | absURL }}{{ end }},
96+
"image": {{ if .Params.images }}[{{ range $i, $e := .Params.images }}{{ if $i }}, {{ end }}"{{ $e | absURL }}"{{ end }}]{{ else }}"{{.Site.Params.logo | absURL }}"{{ end }},
6097
"url" : "{{ .Permalink }}",
6198
"wordCount" : "{{ .WordCount }}",
6299
"genre" : [ {{ range $index, $tag := .Params.tags }}{{ if $index }}, {{ end }}"{{ $tag }}" {{ end }}],
63100
"keywords" : [ {{ range $index, $keyword := .Params.keywords }}{{ if $index }}, {{ end }}"{{ $keyword }}" {{ end }}]
64101
}
65102
</script>
66-
{{ else }}
67-
{{ $author := or (.Params.author) (.Site.Author.name) }}
68-
{{ $org_name := .Site.Title }}
69-
<script type="application/ld+json">
70-
{
71-
"@context": "http://schema.org",
72-
"@type": "BlogPosting",
73-
"articleSection": "{{ .Section }}",
74-
"name": "{{ .Title | safeJS }}",
75-
"headline": "{{ .Title | safeJS }}",
76-
"alternativeHeadline": "{{ .Params.lead }}",
77-
"description": "{{ if .Description }}{{ .Description | safeJS }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}",
78-
"inLanguage": {{ .Site.LanguageCode | default "en-us" }},
79-
"isFamilyFriendly": "true",
80-
"mainEntityOfPage": {
81-
"@type": "WebPage",
82-
"@id": "{{ .Permalink }}"
83-
},
84-
"author" : {
85-
"@type": "Person",
86-
"name": "{{ $author }}"
87-
},
88-
"creator" : {
89-
"@type": "Person",
90-
"name": "{{ $author }}"
91-
},
92-
"accountablePerson" : {
93-
"@type": "Person",
94-
"name": "{{ $author }}"
95-
},
96-
"copyrightHolder" : "{{ $org_name }}",
97-
"copyrightYear" : "{{ .Date.Format "2006" }}",
98-
"dateCreated": "{{ .Date.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
99-
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
100-
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
101-
"publisher":{
102-
"@type":"Organization",
103-
"name": {{ $org_name }},
104-
"url": {{ .Site.BaseURL }},
105-
"logo": {
106-
"@type": "ImageObject",
107-
"url": "{{ .Site.Params.logo | absURL }}",
108-
"width":"32",
109-
"height":"32"
110-
}
111-
},
112-
"image": {{ if .Params.images }}[{{ range $i, $e := .Params.images }}{{ if $i }}, {{ end }}{{ $e | absURL }}{{ end }}]{{ else}}{{.Site.Params.logo | absURL }}{{ end }},
113-
"url" : "{{ .Permalink }}",
114-
"wordCount" : "{{ .WordCount }}",
115-
"genre" : [ {{ range $index, $tag := .Params.tags }}{{ if $index }}, {{ end }}"{{ $tag }}" {{ end }}],
116-
"keywords" : [ {{ range $index, $keyword := .Params.keywords }}{{ if $index }}, {{ end }}"{{ $keyword }}" {{ end }}]
117-
}
118-
</script>
119-
{{ end }}
103+
104+
{{ end -}}

public/games/index.html

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,40 @@
22
<html lang="en">
33

44
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
5-
6-
7-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VM01Q3R43D"></script>
8-
<script>
9-
window.dataLayer = window.dataLayer || [];
10-
function gtag(){dataLayer.push(arguments);}
11-
gtag('js', new Date());
12-
gtag('config', 'G-VM01Q3R43D');
13-
</script>
14-
<meta charset="UTF-8">
5+
<meta charset="UTF-8">
156
<meta name="viewport" content="width=device-width, initial-scale=1.0">
16-
<meta name="msapplication-TileColor" content="#e5e9f4">
17-
<meta name="theme-color" content="#e5e9f4">
18-
<meta name="keywords" content="Codefrydev,CFD,NET,Tutorials,Design,Games,unity,c#,godot">
19-
<meta name="description" content="CodeFryDev is your ultimate destination for diverse digital content and tools. Enjoy our extensive game collection, innovative productivity apps, and micro applications for quick solutions. Access educational materials, interactive courses, and comprehensive tutorials for all skill levels. Fuel your creativity with design resources and versatile tools for efficient project completion. Visit CodeFryDev today and explore all we have to offer!">
7+
<title>CodeFryDev | Games, Apps, Tutorials, and Design Tools</title>
8+
9+
<meta name="description" content="CodeFryDev is your ultimate destination for diverse digital content and tools. Enjoy our extensive game collection, innovative productivity apps, and comprehensive tutorials.">
2010
<meta name="author" content="CodeFryDev">
11+
<meta name="keywords" content="Codefrydev,CFD,NET,Tutorials,Design,Games,unity,c#,godot">
12+
<meta name="robots" content="index, follow">
13+
<link rel="canonical" href="https://www.codefrydev.in/">
14+
15+
<meta property="og:title" content="CodeFryDev | Games, Apps, Tutorials, and Design Tools">
16+
<meta property="og:description" content="Your ultimate destination for diverse digital content, including games, productivity apps, educational tutorials, and design resources.">
17+
<meta property="og:image" content="https://www.codefrydev.in/og-image.png"> <meta property="og:url" content="https://www.codefrydev.in/">
18+
<meta property="og:type" content="website">
2119

20+
<meta name="twitter:card" content="summary_large_image">
21+
<meta name="twitter:title" content="CodeFryDev | Games, Apps, Tutorials, and Design Tools">
22+
<meta name="twitter:description" content="Your ultimate destination for diverse digital content, including games, productivity apps, educational tutorials, and design resources.">
23+
<meta name="twitter:image" content="https://www.codefrydev.in/mstile-310x310.png">
2224
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
2325
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
24-
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
26+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
27+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VM01Q3R43D"></script>
2528
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#e5e9f4">
29+
<script>
30+
window.dataLayer = window.dataLayer || [];
31+
function gtag() { dataLayer.push(arguments); }
32+
gtag('js', new Date());
33+
gtag('config', 'G-VM01Q3R43D');
34+
</script>
2635

2736
<title>Games</title>
28-
37+
<meta name="msapplication-TileColor" content="#e5e9f4">
38+
<meta name="theme-color" content="#e5e9f4">
2939

3040

3141
<script type="application/ld+json">
@@ -71,7 +81,7 @@
7181
"height":"32"
7282
}
7383
},
74-
"image": "http://localhost:1313/favicon-32x32.png",
84+
"image": "http:\/\/localhost:1313\/favicon-32x32.png",
7585
"url" : "http:\/\/localhost:1313\/games\/",
7686
"wordCount" : "10",
7787
"genre" : [ ],
@@ -80,6 +90,7 @@
8090
</script>
8191

8292

93+
8394
<meta property="og:title" content="Games" />
8495
<meta property="og:description" content="CodeFryDev is your ultimate destination for diverse digital content and tools. Enjoy our extensive game collection, innovative productivity apps, and micro applications for quick solutions. Access educational materials, interactive courses, and comprehensive tutorials for all skill levels. Fuel your creativity with design resources and versatile tools for efficient project completion. Visit CodeFryDev today and explore all we have to offer!" />
8596
<meta property="og:type" content="website" />

public/history/index.html

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
4-
5-
6-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VM01Q3R43D"></script>
7-
<script>
8-
window.dataLayer = window.dataLayer || [];
9-
function gtag(){dataLayer.push(arguments);}
10-
gtag('js', new Date());
11-
gtag('config', 'G-VM01Q3R43D');
12-
</script>
13-
<meta charset="UTF-8">
4+
<meta charset="UTF-8">
145
<meta name="viewport" content="width=device-width, initial-scale=1.0">
15-
<meta name="msapplication-TileColor" content="#e5e9f4">
16-
<meta name="theme-color" content="#e5e9f4">
17-
<meta name="keywords" content="Codefrydev,CFD,NET,Tutorials,Design,Games,unity,c#,godot">
18-
<meta name="description" content="CodeFryDev is your ultimate destination for diverse digital content and tools. Enjoy our extensive game collection, innovative productivity apps, and micro applications for quick solutions. Access educational materials, interactive courses, and comprehensive tutorials for all skill levels. Fuel your creativity with design resources and versatile tools for efficient project completion. Visit CodeFryDev today and explore all we have to offer!">
6+
<title>CodeFryDev | Games, Apps, Tutorials, and Design Tools</title>
7+
8+
<meta name="description" content="CodeFryDev is your ultimate destination for diverse digital content and tools. Enjoy our extensive game collection, innovative productivity apps, and comprehensive tutorials.">
199
<meta name="author" content="CodeFryDev">
10+
<meta name="keywords" content="Codefrydev,CFD,NET,Tutorials,Design,Games,unity,c#,godot">
11+
<meta name="robots" content="index, follow">
12+
<link rel="canonical" href="https://www.codefrydev.in/">
13+
14+
<meta property="og:title" content="CodeFryDev | Games, Apps, Tutorials, and Design Tools">
15+
<meta property="og:description" content="Your ultimate destination for diverse digital content, including games, productivity apps, educational tutorials, and design resources.">
16+
<meta property="og:image" content="https://www.codefrydev.in/og-image.png"> <meta property="og:url" content="https://www.codefrydev.in/">
17+
<meta property="og:type" content="website">
2018

19+
<meta name="twitter:card" content="summary_large_image">
20+
<meta name="twitter:title" content="CodeFryDev | Games, Apps, Tutorials, and Design Tools">
21+
<meta name="twitter:description" content="Your ultimate destination for diverse digital content, including games, productivity apps, educational tutorials, and design resources.">
22+
<meta name="twitter:image" content="https://www.codefrydev.in/mstile-310x310.png">
2123
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
2224
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
23-
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
25+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
26+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VM01Q3R43D"></script>
2427
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#e5e9f4">
28+
<script>
29+
window.dataLayer = window.dataLayer || [];
30+
function gtag() { dataLayer.push(arguments); }
31+
gtag('js', new Date());
32+
gtag('config', 'G-VM01Q3R43D');
33+
</script>
2534

2635
<title>History</title>
27-
36+
<meta name="msapplication-TileColor" content="#e5e9f4">
37+
<meta name="theme-color" content="#e5e9f4">
2838

2939

3040
<script type="application/ld+json">
@@ -70,7 +80,7 @@
7080
"height":"32"
7181
}
7282
},
73-
"image": "http://localhost:1313/favicon-32x32.png",
83+
"image": "http:\/\/localhost:1313\/favicon-32x32.png",
7484
"url" : "http:\/\/localhost:1313\/history\/",
7585
"wordCount" : "0",
7686
"genre" : [ ],
@@ -79,6 +89,7 @@
7989
</script>
8090

8191

92+
8293
<meta property="og:title" content="History" />
8394
<meta property="og:description" content="CodeFryDev is your ultimate destination for diverse digital content and tools. Enjoy our extensive game collection, innovative productivity apps, and micro applications for quick solutions. Access educational materials, interactive courses, and comprehensive tutorials for all skill levels. Fuel your creativity with design resources and versatile tools for efficient project completion. Visit CodeFryDev today and explore all we have to offer!" />
8495
<meta property="og:type" content="website" />

0 commit comments

Comments
 (0)