Skip to content

Commit d428c6b

Browse files
committed
More Related to SEO
1 parent d7e7fff commit d428c6b

13 files changed

Lines changed: 279 additions & 376 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@ public
22
/public
33
.DS_Store
44
node_modules
5+
6+
# Hugo generated files
7+
resources/_gen/
8+
.hugo_build.lock
9+
hugo_stats.json

hugo.toml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,24 @@ title = 'CodeFryDev'
66
# No tagged content; skip /tags/ and /categories/ list pages
77
disableKinds = ["taxonomy", "term"]
88

9+
[mediaTypes]
10+
[mediaTypes."text/plain"]
11+
suffixes = ["txt"]
12+
13+
[outputFormats]
14+
[outputFormats.LLMS]
15+
mediaType = "text/plain"
16+
baseName = "llms"
17+
isPlainText = true
18+
notAlternative = true
19+
[outputFormats.LLMSFULL]
20+
mediaType = "text/plain"
21+
baseName = "llms-full"
22+
isPlainText = true
23+
notAlternative = true
24+
925
[outputs]
10-
home = ["HTML", "RSS"]
26+
home = ["HTML", "RSS", "ROBOTS", "LLMS", "LLMSFULL"]
1127

1228
[Author]
1329
name = "CodeFryDev"
@@ -51,3 +67,23 @@ disableKinds = ["taxonomy", "term"]
5167
weight = 1
5268
contentDir = "content"
5369

70+
71+
[module]
72+
[[module.mounts]]
73+
source = "content"
74+
target = "content"
75+
[[module.mounts]]
76+
source = "data"
77+
target = "data"
78+
[[module.mounts]]
79+
source = "layouts"
80+
target = "layouts"
81+
[[module.mounts]]
82+
source = "static"
83+
target = "static"
84+
[[module.mounts]]
85+
source = "assets"
86+
target = "assets"
87+
[[module.mounts]]
88+
source = "static"
89+
target = "assets"

layouts/about/users/single.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
{{- if and $img (not (hasPrefix $img "/")) -}}
1111
{{- $img = printf "/about/users/%s/%s" (.File.ContentBaseName) $img -}}
1212
{{- end -}}
13-
<img class="w-28 h-28 rounded-full object-cover border-4 border-white/30 mx-auto mb-6 shadow-md" src="{{ $img }}" alt="{{ .Title }}" width="112" height="112">
13+
{{- $resPath := strings.TrimPrefix "/" $img -}}
14+
{{- $res := resources.Get $resPath -}}
15+
{{- if $res -}}
16+
{{- $webp := $res.Resize "224x webp" -}}
17+
<img class="w-28 h-28 rounded-full object-cover border-4 border-white/30 mx-auto mb-6 shadow-md" src="{{ $webp.RelPermalink }}" alt="{{ .Title }}" width="{{ $webp.Width }}" height="{{ $webp.Height }}" loading="lazy">
18+
{{- else -}}
19+
<img class="w-28 h-28 rounded-full object-cover border-4 border-white/30 mx-auto mb-6 shadow-md" src="{{ $img }}" alt="{{ .Title }}" width="112" height="112" loading="lazy">
20+
{{- end -}}
1421
<h1 class="text-2xl font-bold text-white m-0 mb-2">{{ .Title }}</h1>
1522
{{- with .Params.subtitle -}}
1623
<p class="text-white/90 text-sm font-medium m-0 mb-8">{{ . }}</p>

layouts/index.llms-full.txt

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# {{ .Site.Title }} - Complete Documentation
2+
3+
## Website Information
4+
- **Name**: {{ .Site.Title }}
5+
- **Base URL**: {{ .Site.BaseURL }}
6+
- **Language**: {{ .Site.LanguageCode | default "en-US" }}
7+
- **Technology**: Hugo static site generator
8+
- **Concise summary**: {{ .Site.BaseURL }}llms.txt
9+
10+
## Description
11+
{{ .Site.Params.description }}
12+
13+
## Detailed Category Breakdown
14+
15+
{{ range hugo.Data.home.categories -}}
16+
### {{ .name }} ({{ .seeAllUrl | default (printf "/browse/%s/" (.slug | default (.name | anchorize))) }})
17+
{{ .subtitle }}
18+
19+
| Tool | URL | Description |
20+
|------|-----|-------------|
21+
{{ range .items -}}
22+
{{- $url := .url -}}
23+
{{- if not (or (hasPrefix $url "http://") (hasPrefix $url "https://")) -}}
24+
{{- if not (hasPrefix $url "/") -}}{{- $url = printf "/%s" $url -}}{{- end -}}
25+
{{- $url = printf "%s%s" $.Site.BaseURL (strings.TrimPrefix "/" $url) -}}
26+
{{- end -}}
27+
| {{ .name }} | {{ $url }} | {{ .description | default "" }} |
28+
{{ end -}}
29+
30+
{{ end -}}
31+
32+
## Data-Driven Sections
33+
34+
### AI Tools
35+
{{ if hugo.Data.ai -}}
36+
{{ if hugo.Data.ai.data -}}
37+
| AI Tool | URL |
38+
|---------|-----|
39+
{{ range hugo.Data.ai.data -}}
40+
{{- $url := .url -}}
41+
{{- if not (or (hasPrefix $url "http://") (hasPrefix $url "https://")) -}}
42+
{{- if not (hasPrefix $url "/") -}}{{- $url = printf "/%s" $url -}}{{- end -}}
43+
{{- $url = printf "%s%s" $.Site.BaseURL (strings.TrimPrefix "/" $url) -}}
44+
{{- end -}}
45+
| {{ .name }} | {{ $url }} |
46+
{{ end -}}
47+
{{ end -}}
48+
{{ end -}}
49+
50+
### Games
51+
{{ if hugo.Data.games -}}
52+
{{ if hugo.Data.games.data -}}
53+
| Game | URL |
54+
|------|-----|
55+
{{ range hugo.Data.games.data -}}
56+
{{- $url := .url -}}
57+
{{- if not (or (hasPrefix $url "http://") (hasPrefix $url "https://")) -}}
58+
{{- if not (hasPrefix $url "/") -}}{{- $url = printf "/%s" $url -}}{{- end -}}
59+
{{- $url = printf "%s%s" $.Site.BaseURL (strings.TrimPrefix "/" $url) -}}
60+
{{- end -}}
61+
| {{ .name }} | {{ $url }} |
62+
{{ end -}}
63+
{{ end -}}
64+
{{ end -}}
65+
66+
### Design Lab
67+
{{ if hugo.Data.designlab -}}
68+
{{ if hugo.Data.designlab.data -}}
69+
| Design Tool | URL |
70+
|-------------|-----|
71+
{{ range hugo.Data.designlab.data -}}
72+
{{- $url := .url -}}
73+
{{- if not (or (hasPrefix $url "http://") (hasPrefix $url "https://")) -}}
74+
{{- if not (hasPrefix $url "/") -}}{{- $url = printf "/%s" $url -}}{{- end -}}
75+
{{- $url = printf "%s%s" $.Site.BaseURL (strings.TrimPrefix "/" $url) -}}
76+
{{- end -}}
77+
| {{ .name }} | {{ $url }} |
78+
{{ end -}}
79+
{{ end -}}
80+
{{ end -}}
81+
82+
## All Pages
83+
84+
| Title | Path |
85+
|-------|------|
86+
{{ range where site.Pages "Kind" "page" -}}
87+
{{ if and (ne .Permalink "") (ne .Draft true) -}}
88+
| {{ .Title }} | {{ .RelPermalink }} |
89+
{{ end -}}
90+
{{ end -}}
91+
92+
Last Updated: {{ now.Format "January 2006" }}

layouts/index.llms.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# {{ .Site.Title }}
2+
3+
> {{ .Site.Params.description }}
4+
5+
## About
6+
{{ .Site.Title }} offers free online tools, games, and AI apps—no signup required. We build productivity apps, AI-powered utilities, engaging games, and creative design resources for developers, designers, and anyone curious to experiment in the browser. Active since 2023.
7+
8+
## Website
9+
- URL: {{ .Site.BaseURL }}
10+
- Built with: Hugo static site generator
11+
- Language: {{ .Site.LanguageCode | default "en-US" }}
12+
- Full documentation: {{ .Site.BaseURL }}llms-full.txt
13+
14+
## Main Sections
15+
{{ range where site.Pages "Kind" "section" -}}
16+
{{ if and (ne .Section "search") (ne .Draft true) -}}
17+
- {{ .Title | default (.Section | title) }} ({{ .RelPermalink }}): {{ .Description | default "..." }}
18+
{{ end -}}
19+
{{ end -}}
20+
21+
## Browse Categories
22+
{{ range $index, $cat := hugo.Data.home.categories -}}
23+
{{ $index | add 1 }}. **{{ $cat.name }}** ({{ $cat.seeAllUrl | default (printf "/browse/%s/" ($cat.slug | default ($cat.name | anchorize))) }}): {{ $cat.subtitle }}
24+
{{ end -}}
25+
26+
## Highlights
27+
- 100% free — most tools need no signup
28+
- Runs in your browser — no install required
29+
- Privacy-focused — most tools process data locally
30+
31+
## Optional
32+
- Sitemap: {{ .Site.BaseURL }}sitemap.xml
33+
- Robots: {{ .Site.BaseURL }}robots.txt
34+
35+
Last Updated: {{ now.Format "January 2006" }}

layouts/partials/enhanced-jsonld.html

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
},
3535
"sameAs": [
3636
"https://github.com/codefrydev",
37-
"https://play.google.com/store/apps/developer?id=CodeFryDev"
37+
"https://play.google.com/store/apps/developer?id=CodeFryDev"{{ with .Site.Params.social.twitter }},
38+
"https://twitter.com/{{ . }}"{{ end }}{{ with .Site.Params.social.youtube }},
39+
"https://youtube.com/@{{ . }}"{{ end }}
3840
],
3941
"contactPoint": {
4042
"@type": "ContactPoint",
@@ -272,6 +274,30 @@
272274
{{- end -}}
273275
{{- end -}}
274276

277+
{{- /* WebPage or Article schema for single content pages */ -}}
278+
{{- if and .IsPage (not .IsHome) -}}
279+
{{- $wpTitle := .Params.seo_title | default .Title -}}
280+
{{- $wpDesc := .Description | default (.Summary | plainify | truncate 160) -}}
281+
{{- $schemaType := "WebPage" -}}
282+
{{- if or (eq .Section "press") (eq .Section "history") -}}
283+
{{- $schemaType = "Article" -}}
284+
{{- end -}}
285+
{{- $webPage := dict
286+
"@type" $schemaType
287+
"@id" (printf "%s#webpage" .Permalink)
288+
"url" .Permalink
289+
"name" $wpTitle
290+
"headline" $wpTitle
291+
"description" $wpDesc
292+
"inLanguage" (.Site.LanguageCode | default "en-US")
293+
"isPartOf" (dict "@id" (print .Site.BaseURL "#website"))
294+
"publisher" (dict "@id" (print .Site.BaseURL "#organization"))
295+
"datePublished" (.Date.Format "2006-01-02")
296+
"dateModified" (.Lastmod.Format "2006-01-02")
297+
-}}
298+
{{- $pageSchema = $pageSchema | append $webPage -}}
299+
{{- end -}}
300+
275301
{{- /* Output page-specific schema */ -}}
276302
{{- if gt (len $pageSchema) 0 -}}
277303
<script type="application/ld+json">

layouts/partials/header.html

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
{{ partial "googlegtag.html" . }}
55

66
{{- /* Page-specific title (single source of truth; do not add <title> in section layouts) */ -}}
7-
{{- $pageTitle := .Title -}}
8-
{{- if .IsHome -}}
7+
{{- /* Priority: 1) seo_title frontmatter 2) section-based defaults 3) page title 4) site title */ -}}
8+
{{- $pageTitle := "" -}}
9+
{{- if .Params.seo_title -}}
10+
{{- $pageTitle = .Params.seo_title -}}
11+
{{- else if .IsHome -}}
912
{{- $pageTitle = "Free Online Tools, Games & AI Apps | CodeFryDev - No Signup Required" -}}
1013
{{- else if eq .Section "ai" -}}
1114
{{- $pageTitle = "Free AI Tools & Generators | CodeFryDev - AI-Powered Utilities" -}}
@@ -17,7 +20,15 @@
1720
{{- $pageTitle = "About Us - CodeFryDev | Free Online Tools & Resources Platform" -}}
1821
{{- else if eq .Section "about" -}}
1922
{{- if strings.Contains .RelPermalink "/about/users/" -}}
20-
{{- $pageTitle = printf "%s - CodeFryDev Team" .Title -}}
23+
{{- if .IsPage -}}
24+
{{- $pageTitle = printf "%s - CodeFryDev Team" .Title -}}
25+
{{- else -}}
26+
{{- $pageTitle = "Devs and Designers - CodeFryDev | Meet Our Team" -}}
27+
{{- end -}}
28+
{{- else if ne .Title "" -}}
29+
{{- $pageTitle = printf "%s | CodeFryDev" .Title -}}
30+
{{- else -}}
31+
{{- $pageTitle = "About | CodeFryDev" -}}
2132
{{- end -}}
2233
{{- else if eq .Section "search" -}}
2334
{{- $pageTitle = "Search - CodeFryDev | Find Tools, Games & Apps" -}}
@@ -33,8 +44,6 @@
3344
{{- end -}}
3445
{{- else if eq .Section "store" -}}
3546
{{- $pageTitle = "Free Mobile Apps | CodeFryDev Store" -}}
36-
{{- else if strings.HasSuffix .RelPermalink "/about/users/" -}}
37-
{{- $pageTitle = "Devs and Designers - CodeFryDev | Meet Our Team" -}}
3847
{{- else if ne .Title "" -}}
3948
{{- $pageTitle = printf "%s | CodeFryDev" .Title -}}
4049
{{- else -}}
@@ -65,6 +74,11 @@
6574
<meta name="robots" content="{{ $robots }}">
6675
<link rel="canonical" href="{{ .Permalink | absURL }}">
6776

77+
{{- /* RSS Auto-Discovery */ -}}
78+
{{- with .OutputFormats.Get "rss" -}}
79+
<link rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }} Feed" href="{{ .Permalink }}">
80+
{{- end -}}
81+
6882
{{- /* Language and locale (BCP 47); single source for og:locale and hreflang */ -}}
6983
{{- $localeRaw := .Site.Language.LanguageCode | default .Site.LanguageCode | default "en-US" -}}
7084
{{- $localeNorm := $localeRaw | replace "_" "-" -}}

layouts/partials/home/category-banner.html

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,30 @@
77

88
<div class="category-banner mb-10 overflow-hidden rounded-xl md:rounded-[1.5rem] border border-gray-200 bg-white shadow-sm">
99
<div class="relative aspect-[16/7] md:aspect-[16/4] w-full bg-slate-100 overflow-hidden">
10-
<img
11-
src="{{ $image }}"
12-
alt="{{ $imageAlt }}"
13-
width="1600"
14-
height="400"
15-
class="absolute inset-0 h-full w-full object-cover"
16-
loading="lazy"
17-
decoding="async"
18-
>
10+
{{- $resPath := strings.TrimPrefix "/" $image -}}
11+
{{- $res := resources.Get $resPath -}}
12+
{{- if $res -}}
13+
{{- $webp := $res.Resize "1600x webp" -}}
14+
<img
15+
src="{{ $webp.RelPermalink }}"
16+
alt="{{ $imageAlt }}"
17+
width="{{ $webp.Width }}"
18+
height="{{ $webp.Height }}"
19+
class="absolute inset-0 h-full w-full object-cover"
20+
loading="lazy"
21+
decoding="async"
22+
>
23+
{{- else -}}
24+
<img
25+
src="{{ $image }}"
26+
alt="{{ $imageAlt }}"
27+
width="1600"
28+
height="400"
29+
class="absolute inset-0 h-full w-full object-cover"
30+
loading="lazy"
31+
decoding="async"
32+
>
33+
{{- end -}}
1934
<div class="absolute inset-0 bg-gradient-to-r from-slate-950/65 via-transparent to-slate-950/10" aria-hidden="true"></div>
2035
<div class="relative z-10 flex h-full flex-col justify-center px-6 py-8 text-white md:px-10 md:py-12">
2136
<h1 class="text-2xl md:text-4xl font-semibold leading-snug md:leading-tight m-0">{{ $title }}</h1>

layouts/partials/home/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
33
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
44
<link rel="stylesheet" href="/css/search.css">
5-
<script src="https://unpkg.com/@phosphor-icons/web"></script>
5+
<script src="https://unpkg.com/@phosphor-icons/web" defer></script>
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ Allow: /
55
Disallow: /test/
66

77
# Sitemap location
8-
Sitemap: https://codefrydev.in/sitemap.xml
8+
Sitemap: {{ .Site.BaseURL }}sitemap.xml
99

1010
# LLM documentation files
1111
# For AI systems to understand the website structure and content
12-
# https://codefrydev.in/llms.txt - Concise summary
13-
# https://codefrydev.in/llms-full.txt - Comprehensive documentation
14-
12+
{{ .Site.BaseURL }}llms.txt - Concise summary
13+
{{ .Site.BaseURL }}llms-full.txt - Comprehensive documentation

0 commit comments

Comments
 (0)