Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit f562a9e

Browse files
authored
Merge pull request #103 from paiindustries/fix/seo
implemented seo recommended updates
2 parents 43c2d6e + e0c4826 commit f562a9e

7 files changed

Lines changed: 82 additions & 61 deletions

File tree

app/views/layout.cfm

Lines changed: 75 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,88 @@
11
<!--- Place HTML here that should be used as the default layout of your application. --->
22
<!--- This condition prevents the content to be wrapped in HTML for the Junit, TXT and JSON formats when they are passed in the URL as "format=json","format=txt" and "format=junit" as these formats shouldn't have html wrapped around them --->
3+
<cfsilent>
4+
<cfset pathInfo = trim(cgi.path_info)>
5+
<cfset isBlog = find("/blog", pathInfo)>
6+
<cfset isApi = find("/api", pathInfo)>
7+
<cfset isLogin = find("/login", pathInfo)>
8+
<cfset isRegister = find("/register", pathInfo)>
9+
<cfset isForgotPassword = find("/forgot-password", pathInfo)>
10+
<cfset isResetPassword = find("/reset-password", pathInfo)>
11+
<cfset isDocs = find("/docs", pathInfo) or isApi>
12+
<cfset isCommunity = find("/community", pathInfo)>
13+
<cfset isNews = find("/news", pathInfo) or isBlog and !find("/blog/create", pathInfo)>
14+
<cfset isAuthPage = (isLogin OR isRegister OR isForgotPassword OR isResetPassword)>
315

4-
<cfset pathInfo = trim(cgi.path_info)>
5-
<cfset isBlog = find("/blog", pathInfo)>
6-
<cfset isApi = find("/api", pathInfo)>
7-
<cfset isLogin = find("/login", pathInfo)>
8-
<cfset isRegister = find("/register", pathInfo)>
9-
<cfset isForgotPassword = find("/forgot-password", pathInfo)>
10-
<cfset isResetPassword = find("/reset-password", pathInfo)>
11-
<cfset isDocs = find("/docs", pathInfo) or isApi>
12-
<cfset isCommunity = find("/community", pathInfo)>
13-
<cfset isNews = find("/news", pathInfo) or isBlog and !find("/blog/create", pathInfo)>
14-
<cfset isAuthPage = (isLogin OR isRegister OR isForgotPassword OR isResetPassword)>
16+
<cfset pageTitle = "Wheels - An open source CFML framework inspired by Ruby on Rails">
17+
<cfset ogTitle = "Wheels - An open source CFML framework inspired by Ruby on Rails">
18+
<cfset metaDescription = "Modern CFML web framework inspired by Rails. Build powerful, fast, and clean web apps with Wheels.dev’s intuitive MVC architecture.">
19+
<cfset ogDescription = "Modern CFML web framework inspired by Rails. Build powerful, fast, and clean web apps with Wheels.dev’s intuitive MVC architecture.">
1520

16-
<cfset pageTitle = "Wheels - an open source CFML framework inspired by Ruby on Rails">
17-
<cfset ogTitle = "Wheels - an open source CFML framework inspired by Ruby on Rails">
18-
<cfset metaDescription = "Build apps quickly with an organized, Ruby on Rails-inspired structure. Get up and running in no time!">
19-
<cfset ogDescription = "Build apps quickly with an organized, Ruby on Rails-inspired structure. Get up and running in no time!">
21+
<cfif isBlog>
22+
<cfset blogSlug = listLast(pathInfo, "/")>
2023

21-
<cfif isBlog>
22-
<cfset blogSlug = listLast(pathInfo, "/")>
24+
<!--- Fetch the blog post by slug --->
25+
<cfset post = model("Blog").findOne(where="slug = '#blogSlug#'")>
2326

24-
<!--- Fetch the blog post by slug --->
25-
<cfset post = model("Blog").findOne(where="slug = '#blogSlug#'")>
27+
<cfif isStruct(post) && structKeyExists(post, "id")>
28+
<cfset metaDescription = this.generateMetaDescription(post.content)>
2629

27-
<cfif isStruct(post) && structKeyExists(post, "id")>
28-
<cfset metaDescription = this.generateMetaDescription(post.content)>
30+
<cfset pageTitle = post.title & " - Wheels">
31+
<cfset ogTitle = post.title>
32+
<cfset ogDescription = metaDescription>
33+
<cfset ogImage = ''>
34+
<cfelse>
35+
<cfset pageTitle = "Blogs - Wheels">
36+
<cfset metaDescription = "Explore our latest blogs on Wheels.">
37+
<cfset ogTitle = pageTitle>
38+
<cfset ogDescription = metaDescription>
39+
</cfif>
40+
</cfif>
2941

30-
<cfset pageTitle = post.title & " - Wheels">
31-
<cfset ogTitle = post.title>
32-
<cfset ogDescription = metaDescription>
33-
<cfset ogImage = ''>
34-
<cfelse>
35-
<cfset pageTitle = "Blogs - Wheels">
36-
<cfset metaDescription = "Explore our latest blogs on Wheels.">
37-
<cfset ogTitle = pageTitle>
38-
<cfset ogDescription = metaDescription>
39-
</cfif>
40-
</cfif>
42+
<cfif isApi>
43+
<cfset apiPath = listLast(pathInfo, "/")>
44+
<cfset pageTitle = apiPath & " - Wheels API ">
45+
</cfif>
4146

42-
<cfif isApi>
43-
<cfset apiPath = listLast(pathInfo, "/")>
44-
<cfset pageTitle = apiPath & " - Wheels API ">
45-
</cfif>
47+
<cfif isDocs>
48+
<cfset docsPath = listLast(pathInfo, "/")>
49+
<cfset docsPath = uCase(left(docsPath, 1)) & mid(docsPath, 2)>
50+
<cfset pageTitle = docsPath & " - Wheels ">
51+
</cfif>
4652

47-
<cfif isDocs>
48-
<cfset docsPath = listLast(pathInfo, "/")>
49-
<cfset docsPath = uCase(left(docsPath, 1)) & mid(docsPath, 2)>
50-
<cfset pageTitle = docsPath & " - Wheels ">
51-
</cfif>
53+
<cfif isCommunity>
54+
<cfset communityPath = listLast(pathInfo, "/")>
55+
<cfset communityPath = uCase(left(communityPath, 1)) & mid(communityPath, 2)>
56+
<cfset pageTitle = communityPath & " - Wheels ">
57+
</cfif>
5258

53-
<cfif isCommunity>
54-
<cfset communityPath = listLast(pathInfo, "/")>
55-
<cfset communityPath = uCase(left(communityPath, 1)) & mid(communityPath, 2)>
56-
<cfset pageTitle = communityPath & " - Wheels ">
57-
</cfif>
59+
<cfif isNews>
60+
<cfset newsPath = listLast(pathInfo, "/")>
61+
<cfset newsPath = uCase(left(newsPath, 1)) & mid(newsPath, 2)>
62+
<cfset pageTitle = newsPath & " - Wheels ">
63+
</cfif>
64+
65+
<cfif isLogin>
66+
<cfset pageTitle = "Login to Your Account | Wheels.dev - CFML Framework Access">
67+
<cfset ogTitle = pageTitle>
68+
<cfset metaDescription = "Access your Wheels.dev account to manage and contribute to the community, and explore documentation. Secure login for developers.">
69+
<cfset ogDescription = metaDescription>
70+
</cfif>
5871

59-
<cfif isNews>
60-
<cfset newsPath = listLast(pathInfo, "/")>
61-
<cfset newsPath = uCase(left(newsPath, 1)) & mid(newsPath, 2)>
62-
<cfset pageTitle = newsPath & " - Wheels ">
63-
</cfif>
72+
<cfif isRegister>
73+
<cfset pageTitle = "Sign Up for Wheels.dev | Free Account for Wheels Community">
74+
<cfset ogTitle = pageTitle>
75+
<cfset metaDescription = "Create your free account on Wheels.dev and start building web applications with our powerful CFML framework. Join the community today!">
76+
<cfset ogDescription = metaDescription>
77+
</cfif>
78+
79+
<cfif isResetPassword or isForgotPassword>
80+
<cfset pageTitle = "Reset Your Password | Wheels.dev - CFML Web Framework">
81+
<cfset ogTitle = pageTitle>
82+
<cfset metaDescription = "Forgot your password? Quickly reset it and regain access to your Wheels.dev account, the modern CFML framework for rapid web development.">
83+
<cfset ogDescription = metaDescription>
84+
</cfif>
85+
</cfsilent>
6486

6587
<cfif application.contentOnly>
6688
<cfoutput>
@@ -86,7 +108,6 @@
86108
<meta property="og:image" content="#ogImage#">
87109
</cfif>
88110
</cfoutput>
89-
<meta property="og:description" content="Build apps quickly with an organized, Ruby on Rails-inspired structure. Get up and running in no time!">
90111
<meta property="og:url" content="https://wheels.dev/">
91112
<meta property="og:site_name" content="Wheels">
92113
<!-- Bootstrap CSS -->
@@ -307,7 +328,7 @@
307328
<ul class="list-unstyled">
308329
<cfif isLoggedInUser()>
309330
<li class="mt-2">
310-
<a href="#" class="text--secondary fs-14 text-decoration-none cursor-pointer">
331+
<a class="text--secondary fs-14 text-decoration-none cursor-pointer">
311332
<cfoutput>
312333
#session.username#
313334
</cfoutput>
@@ -332,7 +353,7 @@
332353
class="text--secondary fs-14 text-decoration-none cursor-pointer">RSS Comments
333354
Feed</a>
334355
</li>
335-
<li class="mt-2"><a href="#"
356+
<li class="mt-2"><a
336357
class="text--secondary fs-14 text-decoration-none cursor-pointer"></a>
337358
</li>
338359
</ul>

app/views/web/ApiController/partials/_definition.cfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
data-function="#lcase(meta.slug)#">
77

88
<div class="d-flex align-items-center gap-2">
9-
<h1 class="text--primary fs-24 fw-bold">#meta.name#()</h1>
9+
<h2 class="text--primary fs-24 fw-bold">#meta.name#()</h2>
1010
<div class="dropdown">
1111
<button class="dropdown-toggle outline-none border-0 no-dropdown-arrow text-center bg-transparent"
1212
type="button" data-bs-toggle="dropdown" aria-expanded="false">

app/views/web/ApiController/partials/_moredefinition.cfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
data-function="#lcase(meta.slug)#">
88

99
<div class="d-flex align-items-center gap-2">
10-
<h1 class="text--primary fs-24 fw-bold">#meta.name#()</h1>
10+
<h2 class="text--primary fs-24 fw-bold">#meta.name#()</h2>
1111
<div class="dropdown">
1212
<button class="dropdown-toggle outline-none border-0 no-dropdown-arrow text-center bg-transparent"
1313
type="button" data-bs-toggle="dropdown" aria-expanded="false">

app/views/web/ApiController/partials/_sectiondefinition.cfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
data-function="#lcase(meta.slug)#">
88

99
<div class="d-flex align-items-center gap-2">
10-
<h1 class="text--primary fs-24 fw-bold">#meta.name#()</h1>
10+
<h2 class="text--primary fs-24 fw-bold">#meta.name#()</h2>
1111
<div class="dropdown">
1212
<button class="dropdown-toggle outline-none border-0 no-dropdown-arrow text-center bg-transparent"
1313
type="button" data-bs-toggle="dropdown" aria-expanded="false">

app/views/web/BlogController/index.cfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="w-100 h-600 h-sm-400 position-relative feature-blog">
44
<div class="position-absolute mx-auto container start-0 end-0 bottom-50px">
55
<p id="featureBlogHeading" class="text-white fs-18 pb-2">Featured</p>
6-
<p id="blogAuthorHeading" class="text-white fw-bold fs-36 pb-3 line-height-100">Wheels The Fast & Fun CFML Framework!</p>
6+
<h1 id="blogAuthorHeading" class="text-white fw-bold fs-36 pb-3 line-height-100">Wheels The Fast & Fun CFML Framework!</h1>
77
<p id="blogAuthorSubheading" class="text-white opacity-50 fs-18">Build apps quickly with an organized, Ruby on Rails-inspired
88
structure. Get up and running in no time!</p>
99
</div>

app/views/web/HomeController/index.cfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
<!-- Latest blogs -->
4646
<div class="pt-5 px-2 blog-main">
47-
<h1 class="text-center fw-bold fs-60">Latest Blog Posts</h1>
47+
<h2 class="text-center fw-bold fs-60">Latest Blog Posts</h2>
4848
<div class="swiper py-5 blogSwiper h-max">
4949
<div class="swiper-wrapper" id="blogs-container" hx-get="/home/loadBlogs" hx-trigger="load"
5050
hx-target="#blogs-container" hx-swap="innerHTML">
@@ -55,7 +55,7 @@
5555

5656
<!-- our guide -->
5757
<div class="gudie-main py-5 d-none">
58-
<h1 class="text-center text-white fs-60 fw-bold">Our Guide</h1>
58+
<h2 class="text-center text-white fs-60 fw-bold">Our Guide</h2>
5959
<div class="container mt-5" id="guides-container" hx-get="/home/loadGuides" hx-trigger="load"
6060
hx-target="#guides-container" hx-swap="innerHTML">
6161
<!-- Guides will be loaded here via HTMX -->

public/stylesheets/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ main.main-bg {
8585
}
8686

8787
.hero-section {
88-
padding: 10rem 0 6rem
88+
padding: 6rem 10rem 2rem 10rem;
8989
}
9090

9191
.hero-section::after,

0 commit comments

Comments
 (0)