From f9dca9e20fb1c10cda9dbb76181759c45bd2f777 Mon Sep 17 00:00:00 2001 From: majiajue Date: Sun, 19 Jan 2025 15:38:29 +0800 Subject: [PATCH] feat: enhance website SEO and add structured data (#49) * feat(seo): enhance website SEO and add structured data - Add comprehensive meta tags for SEO and social sharing - Implement Schema.org structured data for news articles - Create sitemap.xml for better search engine indexing - Add og-image.svg for social media sharing - Update footer with categorized news sources - Remove redundant source links from news items - Add Google Analytics placeholder Meta tags: - Add SEO meta tags (description, keywords, robots) - Add Open Graph and Twitter Card meta tags - Update website domain to newsnow.majiajue.com Footer: - Organize news sources into categories - Add responsive grid layout - Improve accessibility with proper link attributes - Add dark mode support * chore: update domain and deployment configuration - Change domain from newsnow.majiajue.com to shishixinwen.news - Update Google Analytics tracking ID - Fix Windows deployment issues with cross-env - Add build output directory to wrangler commands Changes: - Update meta tags and structured data with new domain - Update sitemap.xml with new domain - Add cross-env for cross-platform compatibility - Update preview and deploy scripts with correct output path - Configure Google Analytics with actual tracking ID --- index.html | 48 +++++++++++++++++- package.json | 9 +++- public/og-image.svg | 6 +++ public/sitemap.xml | 16 ++++++ src/components/column/card.tsx | 68 +++++++++++++++++-------- src/components/footer.tsx | 93 ++++++++++++++++++++++++++++++---- 6 files changed, 205 insertions(+), 35 deletions(-) create mode 100644 public/og-image.svg create mode 100644 public/sitemap.xml diff --git a/index.html b/index.html index 0094823..272d61b 100644 --- a/index.html +++ b/index.html @@ -1,14 +1,58 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + {items?.map(item => ( +
  1. + + - + + {(item.pubDate || item?.extra?.date) && } + + + + - - - - - - {item.title} - -
  2. - ))} -
+ + {item.title} + + + ))} + + ) } diff --git a/src/components/footer.tsx b/src/components/footer.tsx index 98aa926..f2b8603 100644 --- a/src/components/footer.tsx +++ b/src/components/footer.tsx @@ -1,13 +1,88 @@ export function Footer() { + const sources = [ + { + category: "科技资讯", + links: [ + { name: "Hacker News", url: "https://news.ycombinator.com" }, + { name: "Product Hunt", url: "https://www.producthunt.com" }, + { name: "GitHub", url: "https://github.com/trending" }, + { name: "IT之家", url: "https://www.ithome.com" }, + { name: "V2EX", url: "https://v2ex.com" }, + { name: "Linux中国", url: "https://linux.cn" }, + { name: "Solidot", url: "https://www.solidot.org" }, + ], + }, + { + category: "社交媒体", + links: [ + { name: "微博", url: "https://weibo.com" }, + { name: "知乎", url: "https://zhihu.com" }, + { name: "哔哩哔哩", url: "https://bilibili.com" }, + { name: "抖音", url: "https://douyin.com" }, + { name: "快手", url: "https://kuaishou.com" }, + { name: "贴吧", url: "https://tieba.baidu.com" }, + { name: "酷安", url: "https://coolapk.com" }, + ], + }, + { + category: "新闻资讯", + links: [ + { name: "36氪", url: "https://36kr.com" }, + { name: "澎湃新闻", url: "https://thepaper.cn" }, + { name: "今日头条", url: "https://toutiao.com" }, + { name: "参考消息", url: "http://www.cankaoxiaoxi.com" }, + { name: "联合早报", url: "https://www.zaobao.com" }, + { name: "卫星通讯社", url: "http://sputniknews.cn" }, + ], + }, + { + category: "财经资讯", + links: [ + { name: "华尔街见闻", url: "https://wallstreetcn.com" }, + { name: "雪球", url: "https://xueqiu.com" }, + { name: "格隆汇", url: "https://gelonghui.com" }, + { name: "金十数据", url: "https://jin10.com" }, + { name: "FastBull", url: "https://fastbull.cn" }, + ], + }, + ] + return ( - <> - MIT LICENCE - - NewsNow © 2024 By - - {Author.name} - - - + ) }