Skip to content

Commit

Permalink
update: seo
Browse files Browse the repository at this point in the history
  • Loading branch information
521xueweihan committed Sep 11, 2024
1 parent 88b3102 commit 6cfe031
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion public/locales/en/article.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Articles",
"description": "Here you'll find original and high-quality articles focused on open source projects.",
"description": "Dive into the Excitement of the Open Source World: Original and Quality Articles Focused on Open Source Projects, Offering Selections and Practical Guides.",
"bottom_text_login": "You've reached the end.",
"bottom_text_nologin": "End of content! Login to see more.",
"nav": {
Expand Down
2 changes: 1 addition & 1 deletion public/locales/en/claim.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Wear HelloGitHub Badge",
"description": "Showcase the recognition of your open-source project and help promote and operate it",
"description": "Enhance the impact of open-source projects, showcase their brilliance, and support the promotion and operation of open-source initiatives.",
"navbar": "HelloGitHub Badge",
"top_h2": "Join the HelloGitHub Badge Program",
"top_text": "This is a program to claim your open-source project. By claiming a project and wearing the HelloGitHub badge, you can showcase the community recognition and recommendation your project has received, <strong>highlighting the honor of your open-source project</strong>. At the same time, <strong>claim your open-source project</strong> to enjoy more recommendations and benefits from the community.",
Expand Down
2 changes: 1 addition & 1 deletion public/locales/en/home.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Home",
"description": "Sharing interesting and beginner-friendly open-source projects on GitHub",
"description": "HelloGitHub is an open-source community dedicated to uncovering and sharing engaging, entry-level open-source projects. Here, delve into open-source technology solutions, savor the joy of open-source, and nominate or recommend projects to embark on your open-source adventure.",
"bottom_text_login": "You have reached the bottom of the page",
"bottom_text_nologin": "End of the page! Sign in to read more",
"nav": {
Expand Down
2 changes: 1 addition & 1 deletion public/locales/en/periodical.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "HelloGitHub Monthly",
"description": "Here you will find development tools, open source books, tutorials, and enterprise-level projects, helping you enjoying programming and fall in love with open source.",
"description": "Discover interesting and beginner-friendly open-source projects on GitHub, with fresh content published on the 28th of each month. Covering development tools, open-source books, tutorials, and enterprise-grade projects, we aim to make you fall in love with open source.",
"nav": "HelloGitHub Monthly",
"p_text": "<strong>“HelloGitHub Monthly”</strong> shares interesting and beginner-friendly open source projects on GitHub. Published on the 28th of each month, it includes development tools, open source books, tutorials, and enterprise-level projects, helping you enjoying programming and fall in love with open source!",
"read_button": "Read",
Expand Down
2 changes: 1 addition & 1 deletion public/locales/zh/article.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "文章",
"description": "这里有一些专注于开源项目的原创和优质文章",
"description": "探索开源世界的精彩:专注于开源项目的原创和优质文章,提供开源项目精选与实践指南。",
"bottom_text_login": "你不经意间触碰到了底线",
"bottom_text_nologin": "到底啦!登录可查看更多内容",
"nav": {
Expand Down
2 changes: 1 addition & 1 deletion public/locales/zh/claim.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "佩戴 HelloGitHub 徽章",
"description": "彰显开源项目荣耀,帮助推广和运营开源项目",
"description": "提升开源项目影响力,彰显开源项目荣耀,助力推广和运营开源项目。",
"navbar": "HelloGitHub 徽章",
"top_h2": "加入 HelloGitHub 徽章计划",
"top_text": "这是一个开源项目的认领计划,认领后通过佩戴 HelloGitHub 徽章,向世界展示项目得到的社区认可和推荐,<strong>彰显开源项目荣耀</strong>。同时,<strong>认领你的开源项目</strong>,享受社区带来的更多推荐和权益。",
Expand Down
2 changes: 1 addition & 1 deletion public/locales/zh/home.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "首页",
"description": "分享 GitHub 上有趣、入门级的开源项目",
"description": "HelloGitHub 是一个开源社区,专注于发现和分享有趣、入门级的开源项目。在这里,探索开源技术解决方案,体验开源的乐趣,自荐或推荐开源项目,开启你的开源之旅。",
"bottom_text_login": "你不经意间触碰到了底线",
"bottom_text_nologin": "到底啦!登录可查看更多内容",
"nav": {
Expand Down
2 changes: 1 addition & 1 deletion public/locales/zh/periodical.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "HelloGitHub 月刊",
"description": "这里有开发利器、开源书籍、教程、企业级的开源项目,让发现编程的乐趣你爱上开源",
"description": "探索 GitHub 上有趣的入门级开源项目,每月 28 日发布最新内容。涵盖开发工具、开源书籍、教程及企业级的开源项目,让你爱上开源。",
"nav": "HelloGitHub 月刊",
"p_text": "<strong>「HelloGitHub 月刊」</strong>分享 GitHub 上有趣、入门级的开源项目,每月 28 号发布最新一期。内容包括开发利器、开源书籍、教程、企业级项目等,让你发现编程的乐趣、爱上开源!",
"read_button": "查看",
Expand Down
7 changes: 3 additions & 4 deletions src/components/Seo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import { useRouter } from 'next/router';
const defaultMeta = {
title: 'HelloGitHub',
siteName: 'HelloGitHub',
description: '分享 GitHub 上有趣入门级的开源项目,找开源项目就上 HelloGitHub',
description:
'分享 GitHub 上有趣和入门级的开源项目,找开源项目就上 HelloGitHub',
/** Without additional '/' on the end, e.g. https://theodorusclarence.com */
url: 'https://hellogithub.com',
type: 'website',
robots: 'follow, index',
image: 'https://img.hellogithub.com/logo/logo.png',
image: 'https://img.hellogithub.com/logo/meta.jpg',
content: 'text/html;charset=utf-8',
};

Expand Down Expand Up @@ -112,8 +113,6 @@ export default function Seo(props: SeoProps) {
? `${props.templateTitle} | ${meta.siteName}`
: meta.title;

meta['image'] = 'https://img.hellogithub.com/logo/logo.png';

return (
<Head>
<title>{`${meta.title} - HelloGitHub`}</title>
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Footer = ({ t, isLite }: FooterProps) => {

<FooterLink
className='mt-2'
href='https://www.ucloud.cn/site/active/kuaijiesale.html?utm_term=logo&utm_campaign=hellogithub&utm_source=otherdsp&utm_medium=display&ytag=logo_hellogithub_otherdsp_display#wulanchabu'
href='https://www.ucloud.cn/site/active/gpu.html?utm_term=logo&utm_campaign=hellogithub&utm_source=otherdsp&utm_medium=display&ytag=logo_hellogithub_otherdsp_display'
>
<span>{t('footer.server_sponsor')}</span>
<span className='mx-0.5 align-[1px]'>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/article/[aid].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ArticlePage: NextPage<ArticleProps> = ({ article }) => {

return (
<>
<Seo title={article.title} />
<Seo title={article.title} description={article.desc} />
<Navbar middleText={article.title} endText={t('nav.title')} />
<div className='mt-2 bg-white py-0.5 px-5 dark:bg-gray-800 md:rounded-lg'>
<article className='relative'>
Expand Down
1 change: 1 addition & 0 deletions src/pages/repository/[rid]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const RepositoryPage: NextPage<Props> = ({ repo }) => {
repo.title
)}`}
description={getLocalizedField(repo.summary_en, repo.summary)}
image={repo.image_url ? repo.image_url : repo.author_avatar}
/>
<RepoDetailNavbar
avatar={repo.share_user.avatar}
Expand Down
1 change: 1 addition & 0 deletions src/types/article.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface ArticleItem {
export interface ArticleContent {
aid: string;
content: string;
desc: string;
title: string;
}

Expand Down

0 comments on commit 6cfe031

Please sign in to comment.