Skip to content

[add] Enhance PageHead component with Open Graph and Twitter meta tags; [add] robots.txt and sitemap.xml for SEO optimization #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wangrunlin
Copy link
Member

@wangrunlin wangrunlin commented Apr 6, 2025

PR-75 PR-75 PR-75 Powered by Pull Request Badge

Checklist(清单):

  • Labels
  • Assignees
  • Reviewers

…s; [add] robots.txt and sitemap.xml for SEO optimization
Comment on lines 4 to 10
export type PageHeadProps = PropsWithChildren<{
title?: string;
description?: string;
image?: string;
type?: string;
url?: string;
}>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial<Record>

}>;

const Name = process.env.NEXT_PUBLIC_SITE_NAME,
Summary = process.env.NEXT_PUBLIC_SITE_SUMMARY;
Summary = process.env.NEXT_PUBLIC_SITE_SUMMARY,
SiteUrl = 'https://idea2.app';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SiteUrl = 'https://idea2.app';
SiteUrl = `https://${process.env.VERCEL_URL}`;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好选择我们想让用户在搜索引擎里用哪个域名,多个域名是同一个内容爬虫会判定重复内容,而且不利于我们想导向的网站,不过这个可以从 DNS 去做,这里还是可以修改

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好选择我们想让用户在搜索引擎里用哪个域名

不同语言能选不同域名吗?

不过这个可以从 DNS 去做

怎么做配置,重定向吗?

@@ -11,8 +11,23 @@ import { DefaultImage } from './api/Lark/file/[id]';
const siteNameJsonLd = {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'Ameliorate',
name: 'idea2app',
url: 'https://idea2.app/',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

引用组件里导出的变量(下同)

description: 'Industry-wide IT transformation expert',
potentialAction: {
'@type': 'SearchAction',
target: 'https://idea2.app/search?q={search_term_string}',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下一个任务可以做一下搜索页。

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://idea2.app/</loc>
<changefreq>daily</changefreq>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是爬虫来回访的频率吗?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

说明这个网页的更新频率,但其实这个标签已经没啥用了,AI 自动生成上了

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

但其实这个标签已经没啥用了,AI 自动生成上了

没太明白,是因为 AI 爬虫不遵守这个规则吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvements
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

SEO、社交媒体元数据
2 participants