Give every public route its own description, and keep canonicals and structured data on the host that serves the page.
Decorative images on the marketing pages stay quiet, and every dialog close button is named Close. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0b6e8b00dd
commit
c180e79c38
52 files changed
+363
-209
No files matched your search
@@ -8,7 +8,9 @@ import {
|
||||
getRelatedBlogPosts,
|
||||
} from "../../../../lib/content";
|
||||
import { logger } from "../../../../lib/logger";
|
||||
import { getRequestSiteOrigin } from "../../../../lib/requestSiteOrigin";
|
||||
import {
|
||||
absoluteSiteUrl,
|
||||
articleShareImages,
|
||||
routeMetadata,
|
||||
} from "../../../../lib/siteMetadata";
|
||||
@@ -130,6 +132,8 @@ export default async function BlogPostPage({ params }: PageProps) {
|
||||
3,
|
||||
);
|
||||
|
||||
const origin = await getRequestSiteOrigin();
|
||||
|
||||
// Generate structured data for search engines
|
||||
const structuredData = {
|
||||
"@context": "https://schema.org",
|
||||
@@ -143,19 +147,19 @@ export default async function BlogPostPage({ params }: PageProps) {
|
||||
publisher: {
|
||||
"@type": "Organization",
|
||||
name: "CommunityRule",
|
||||
url: "https://communityrule.com",
|
||||
url: absoluteSiteUrl("/", origin),
|
||||
logo: {
|
||||
"@type": "ImageObject",
|
||||
url: "https://communityrule.com/assets/logos/community-rule.svg",
|
||||
url: absoluteSiteUrl("/assets/logos/community-rule.svg", origin),
|
||||
},
|
||||
},
|
||||
datePublished: post.frontmatter.date,
|
||||
dateModified: post.frontmatter.date,
|
||||
mainEntityOfPage: {
|
||||
"@type": "WebPage",
|
||||
"@id": `https://communityrule.com/blog/${post.slug}`,
|
||||
"@id": absoluteSiteUrl(`/blog/${post.slug}`, origin),
|
||||
},
|
||||
url: `https://communityrule.com/blog/${post.slug}`,
|
||||
url: absoluteSiteUrl(`/blog/${post.slug}`, origin),
|
||||
articleSection: "Community Building",
|
||||
keywords: ["community", "governance", "decision making", "collaboration"],
|
||||
};
|
||||
@@ -169,19 +173,19 @@ export default async function BlogPostPage({ params }: PageProps) {
|
||||
"@type": "ListItem",
|
||||
position: 1,
|
||||
name: "Home",
|
||||
item: "https://communityrule.com",
|
||||
item: absoluteSiteUrl("/", origin),
|
||||
},
|
||||
{
|
||||
"@type": "ListItem",
|
||||
position: 2,
|
||||
name: "Blog",
|
||||
item: "https://communityrule.com/blog",
|
||||
item: absoluteSiteUrl("/blog", origin),
|
||||
},
|
||||
{
|
||||
"@type": "ListItem",
|
||||
position: 3,
|
||||
name: post.frontmatter.title,
|
||||
item: `https://communityrule.com/blog/${post.slug}`,
|
||||
item: absoluteSiteUrl(`/blog/${post.slug}`, origin),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user