-
+
-
+
- {(prev || next) && (
)}
+
+ {
+ (prev || next) && (
+
+ )
+ }
+
-
-
\ No newline at end of file
+
diff --git a/src/pages/en/blog/index.astro b/src/pages/en/blog/index.astro
index 84aa0513ca0..ce4963c031b 100644
--- a/src/pages/en/blog/index.astro
+++ b/src/pages/en/blog/index.astro
@@ -33,6 +33,7 @@ const categoryPosts = BLOG_CATEGORY.map(item => ({
diff --git a/src/pages/en/download/[...slug].astro b/src/pages/en/download/[...slug].astro
index bc726eca927..f94a2b57d9d 100644
--- a/src/pages/en/download/[...slug].astro
+++ b/src/pages/en/download/[...slug].astro
@@ -65,16 +65,18 @@ const next = menus[0].entries[currentIndex + 1]
- {(prev || next) && ()}
+
+ {(prev || next) && (
)}
+
diff --git a/src/pages/en/news/[...slug].astro b/src/pages/en/news/[...slug].astro
new file mode 100644
index 00000000000..76bf102739b
--- /dev/null
+++ b/src/pages/en/news/[...slug].astro
@@ -0,0 +1,72 @@
+---
+import { type CollectionEntry, getCollection } from "astro:content";
+import BlogPost from "@components/markdownSet/MarkdownDetail.astro";
+import TocComponent from "@components/markdownSet/TocComponents/TocComponent.astro";
+import BaseLayout from "@layouts/BaseLayout.astro";
+import SubHeading from "@components/markdownSet/SubHeading.astro";
+import { NEWS_CATEGORY } from "src/consts";
+import { useTranslations } from '@i18n/util';
+const t = useTranslations(Astro);
+
+export async function getStaticPaths() {
+ const posts = await getCollection("blog");
+ return posts.map((post) => ({
+ params: { slug: post.slug },
+ props: post,
+ }));
+}
+type Props = CollectionEntry<"blog">;
+
+const post = Astro.props;
+const { Content, headings } = await post.render();
+---
+
+
+
+
+
+
+
diff --git a/src/pages/en/news/all/[...page].astro b/src/pages/en/news/all/[...page].astro
new file mode 100644
index 00000000000..36ebff0d40e
--- /dev/null
+++ b/src/pages/en/news/all/[...page].astro
@@ -0,0 +1,136 @@
+---
+import type { GetStaticPathsOptions } from "astro";
+import BaseLayout from "@layouts/BaseLayout.astro";
+import { getCollection } from "astro:content";
+import Pagination from "@components/common/Pagination.astro";
+import BlogCard from "@components/markdownSet/Card.astro";
+import { NEWS_CATEGORY } from "src/consts";
+import BlogTop from "@components/markdownSet/BlogTop.astro";
+import BaseContainer from '@components/common/BaseContainer.astro';
+import { useTranslations } from '@i18n/util';
+const t = useTranslations(Astro);
+interface Post {
+ slug: string;
+ body: string;
+ collection: string;
+ data: {
+ title: string;
+ description: string;
+ date: string;
+ keywords?: any[];
+ };
+}
+
+// 分页数据在page参数中传递
+const { page } = Astro.props;
+
+const allPages = [...Array(page.lastPage).keys()].map((num) => {
+ return `/news/all${num === 0 ? "" : `/${String(num + 1)}`}`;
+});
+
+export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
+ const blogCategories = new Set(NEWS_CATEGORY.map((item) => item.type));
+ const posts = await getCollection("blog", (item) =>
+ blogCategories.has(item.data.category),
+ );
+
+ const sortedPosts = posts.sort(
+ (a, b) =>
+ new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf(),
+ );
+ return paginate(sortedPosts, { pageSize: 9 });
+}
+---
+
+
+
+
+
+
+ {
+ page.data.map((post) => (
+
+
+
+ ))
+ }
+
+
+
+
+
+
+
diff --git a/src/pages/en/news/announcement/[...page].astro b/src/pages/en/news/announcement/[...page].astro
new file mode 100644
index 00000000000..4217ffe4250
--- /dev/null
+++ b/src/pages/en/news/announcement/[...page].astro
@@ -0,0 +1,137 @@
+---
+import type { GetStaticPathsOptions } from "astro";
+import BaseLayout from "@layouts/BaseLayout.astro";
+import { getCollection } from "astro:content";
+import Pagination from "@components/common/Pagination.astro";
+import BlogCard from "@components/markdownSet/Card.astro";
+import { NEWS_CATEGORY } from "src/consts";
+import BlogTop from "@components/markdownSet/BlogTop.astro";
+import BaseContainer from '@components/common/BaseContainer.astro';
+import { useTranslations } from '@i18n/util';
+const t = useTranslations(Astro);
+interface Post {
+ slug: string;
+ body: string;
+ collection: string;
+ data: {
+ title: string;
+ description: string;
+ date: string;
+ keywords?: any[];
+ };
+}
+
+// 分页数据在page参数中传递
+const { page } = Astro.props;
+
+const allPages = [...Array(page.lastPage).keys()].map((num) => {
+ return `/news/announcement${num === 0 ? "" : `/${String(num + 1)}`}`;
+});
+
+export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
+ const posts = await getCollection("blog");
+
+ const sortedPosts = posts.sort(
+ (a, b) =>
+ new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf(),
+ );
+
+ const annoucePosts = sortedPosts.filter((post) => {
+ return post.data.category === "announcement";
+ });
+ return paginate(annoucePosts, { pageSize: 9 });
+}
+---
+
+
+
+
+
+
+ {
+ page.data.map((post) => (
+
+
+
+ ))
+ }
+
+
+
+
+
+
+
diff --git a/src/pages/en/news/committer/[...page].astro b/src/pages/en/news/committer/[...page].astro
new file mode 100644
index 00000000000..2f06d9207aa
--- /dev/null
+++ b/src/pages/en/news/committer/[...page].astro
@@ -0,0 +1,138 @@
+---
+import type { GetStaticPathsOptions } from "astro";
+import BaseLayout from "@layouts/BaseLayout.astro";
+import { getCollection } from "astro:content";
+import Pagination from "@components/common/Pagination.astro";
+import BlogCard from "@components/markdownSet/Card.astro";
+import { NEWS_CATEGORY } from "src/consts";
+import BlogTop from "@components/markdownSet/BlogTop.astro";
+import BaseContainer from '@components/common/BaseContainer.astro';
+import { useTranslations } from '@i18n/util';
+const t = useTranslations(Astro);
+interface Post {
+ slug: string;
+ body: string;
+ collection: string;
+ data: {
+ title: string;
+ description: string;
+ date: string;
+ keywords?: any[];
+ };
+}
+
+// 分页数据在page参数中传递
+const { page } = Astro.props;
+
+const posts = await getCollection("blog");
+
+const allPages = [...Array(page.lastPage).keys()].map((num) => {
+ return `/news/committer${num === 0 ? "" : `/${String(num + 1)}`}`;
+});
+
+export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
+ const posts = await getCollection("blog");
+
+ const sortedPosts = posts.sort(
+ (a, b) =>
+ new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf(),
+ );
+
+ const casePosts = sortedPosts.filter((post) => {
+ return post.data.category === "committer";
+ });
+ return paginate(casePosts, { pageSize: 9 });
+}
+---
+
+
+
+
+
+
+ {
+ page.data.map((post) => (
+
+
+
+ ))
+ }
+
+
+
+
+
+
diff --git a/src/pages/en/news/cooperate/[...page].astro b/src/pages/en/news/cooperate/[...page].astro
new file mode 100644
index 00000000000..f8258cc530d
--- /dev/null
+++ b/src/pages/en/news/cooperate/[...page].astro
@@ -0,0 +1,139 @@
+---
+import type { GetStaticPathsOptions } from "astro";
+import BaseLayout from "@layouts/BaseLayout.astro";
+import { getCollection } from "astro:content";
+import Pagination from "@components/common/Pagination.astro";
+import BlogCard from "@components/markdownSet/Card.astro";
+import BlogTop from "@components/markdownSet/BlogTop.astro";
+import { NEWS_CATEGORY } from "src/consts";
+import BaseContainer from '@components/common/BaseContainer.astro';
+import { useTranslations } from '@i18n/util';
+const t = useTranslations(Astro);
+interface Post {
+ slug: string;
+ body: string;
+ collection: string;
+ data: {
+ title: string;
+ description: string;
+ date: string;
+ keywords?: any[];
+ };
+}
+
+// 分页数据在page参数中传递
+const { page } = Astro.props;
+
+const posts = await getCollection("blog");
+
+const allPages = [...Array(page.lastPage).keys()].map((num) => {
+ return `/news/cooperate${num === 0 ? "" : `/${String(num + 1)}`}`;
+});
+
+export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
+ const posts = await getCollection("blog");
+
+ const sortedPosts = posts.sort(
+ (a, b) =>
+ new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf(),
+ );
+
+ const ecosystemPosts = sortedPosts.filter((post) => {
+ return post.data.category === "cooperate";
+ });
+ return paginate(ecosystemPosts, { pageSize: 9 });
+}
+---
+
+
+
+
+
+
+ {
+ page.data.map((post) => (
+
+
+
+ ))
+ }
+
+
+
+
+
+
+
diff --git a/src/pages/en/news/index.astro b/src/pages/en/news/index.astro
new file mode 100644
index 00000000000..1c52bb9cc33
--- /dev/null
+++ b/src/pages/en/news/index.astro
@@ -0,0 +1,42 @@
+---
+import BaseLayout from "@layouts/BaseLayout.astro";
+import { getCollection } from "astro:content";
+import BlogTop from "@components/markdownSet/BlogTop.astro";
+import Footer from "@components/common/Footer.astro";
+import { NEWS_CATEGORY } from "src/consts";
+import BlogContent from "@components/markdownSet/BlogContent.astro"
+import { useTranslations } from '@i18n/util';
+const t = useTranslations(Astro);
+
+const blogCategories = new Set(NEWS_CATEGORY.map(item => item.type));
+const posts = await getCollection("blog", (item) => blogCategories.has(item.data.category));
+
+const sortedPosts = posts.sort(
+ (a, b) => new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf()
+);
+
+
+const categoryPosts = NEWS_CATEGORY.map(item => ({
+ posts: item.type === "all" ? sortedPosts : sortedPosts.filter(post => post.data.category === item.type),
+ ...item,
+}));
+---
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/en/news/release/[...page].astro b/src/pages/en/news/release/[...page].astro
new file mode 100644
index 00000000000..ec82c325792
--- /dev/null
+++ b/src/pages/en/news/release/[...page].astro
@@ -0,0 +1,138 @@
+---
+import type { GetStaticPathsOptions } from "astro";
+import BaseLayout from "@layouts/BaseLayout.astro";
+import { getCollection } from "astro:content";
+import Pagination from "@components/common/Pagination.astro";
+import BlogCard from "@components/markdownSet/Card.astro";
+import BlogTop from "@components/markdownSet/BlogTop.astro";
+import { NEWS_CATEGORY } from "src/consts";
+import BaseContainer from '@components/common/BaseContainer.astro';
+
+interface Post {
+ slug: string;
+ body: string;
+ collection: string;
+ data: {
+ title: string;
+ description: string;
+ date: string;
+ keywords?: any[];
+ };
+}
+
+// 分页数据在page参数中传递
+const { page } = Astro.props;
+
+const posts = await getCollection("blog");
+
+const allPages = [...Array(page.lastPage).keys()].map((num) => {
+ return `/news/release${num === 0 ? "" : `/${String(num + 1)}`}`;
+});
+
+export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
+ const posts = await getCollection("blog");
+
+ const sortedPosts = posts.sort(
+ (a, b) =>
+ new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf(),
+ );
+
+ const articlePosts = sortedPosts.filter((post) => {
+ return post.data.category === "release";
+ });
+ return paginate(articlePosts, { pageSize: 9 });
+}
+---
+
+
+
+
+
+
+ {
+ page.data.map((post) => (
+
+
+
+ ))
+ }
+
+
+
+
+
+
+
diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro
index e72af52f1f3..1c52bb9cc33 100644
--- a/src/pages/news/index.astro
+++ b/src/pages/news/index.astro
@@ -27,7 +27,7 @@ const categoryPosts = NEWS_CATEGORY.map(item => ({
description={t("blog.activity.explore")}
>
-
+
From ce7f2435f9627bf503929e986e5ce0d6d7777860 Mon Sep 17 00:00:00 2001
From: shonen <83808926@qq.com>
Date: Fri, 2 Feb 2024 15:42:00 +0800
Subject: [PATCH 25/66] =?UTF-8?q?fix:(i18n)=20=E4=BF=AE=E6=94=B9=E5=9B=BD?=
=?UTF-8?q?=E9=99=85=E5=8C=96=E8=AF=8D=E6=9D=A1=20(#553)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: 博客添加目录和上一页下一页,版本下载更换目录组件,添加上一页下一页
* fix: 版本下载同步修改en页面
* fix: 修复打包报错
* fix:(blog,news,activity): 添加国际化,修改样式问题
* fix: (blog) 增加国际化字条对应关系
* fix:(i18n) 修改国际化词条
---
src/components/home/ChooseReason.astro | 2 +-
src/i18n/en/ui.ts | 22 +++++++++++-----------
src/i18n/zh-cn/ui.ts | 8 ++++----
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/components/home/ChooseReason.astro b/src/components/home/ChooseReason.astro
index e297062cb68..7d1a27c0bba 100644
--- a/src/components/home/ChooseReason.astro
+++ b/src/components/home/ChooseReason.astro
@@ -59,7 +59,7 @@ const dataSource = [
{title}
- {description}
+
);
})
diff --git a/src/i18n/en/ui.ts b/src/i18n/en/ui.ts
index 807921920e6..85ec9d42445 100644
--- a/src/i18n/en/ui.ts
+++ b/src/i18n/en/ui.ts
@@ -62,24 +62,24 @@ export default {
'home.nacos.edge.about': 'Main features',
'home.introduce.nacos.aim': 'We believe that everything is a service, each service node is conceived as a planet, and each service is a galaxy. Nacos is committed to helping build connections between these services, helping every dream of the stars to fly through the clouds, on the cloud, better link the whole sky.',
'home.nacos.edge.title': 'Continue to enhance open source capabilities',
- 'home.nacos.edge.1.title': 'EASY',
- 'home.nacos.edge.1.description': 'One-stop solution for dynamic service discovery. Configuration management and dynamic DNS service 20+ out-of-the-box features for service-centric architectures Light-weight production-ready console',
- 'home.nacos.edge.2.title': 'ADAPTIVE',
- 'home.nacos.edge.2.description': 'Seamlessly support kubernetes and spring cloud Easier to deploy and run on popular public cloud (for example AliCloud and AWS) Support multi-tenants and multi-environments',
- 'home.nacos.edge.3.title': 'TIME-TESTED',
- 'home.nacos.edge.3.description': 'Originated from time-tested internal products from Alibaba Group. Supports large-scale scenarios with millions of services Open-source product with enterprise-level SLA',
- 'home.nacos.edge.4.title': 'VARIETY',
- 'home.nacos.edge.4.description': 'Supports rate throttling, big promotion plans, and multi-region active-active architectures Supports a variety of relevant internet-based use cases directly or with slight extension Traffic scheduling & service governance',
+ 'home.nacos.edge.1.title': 'Easy to use',
+ 'home.nacos.edge.1.description': 'One-stop solution for dynamic service discovery, configuration management and dynamic DNS service
20+ out-of-the-box features for service-centric architectures
Light-weight production-ready console',
+ 'home.nacos.edge.2.title': 'More adaptive to cloud architectures',
+ 'home.nacos.edge.2.description': 'Seamlessly support kubernetes and spring cloud
Easier to deploy and run on popular public cloud (for example AliCloud and AWS)
Support multi-tenants and multi-environments',
+ 'home.nacos.edge.3.title': 'Production grade',
+ 'home.nacos.edge.3.description': 'Originated from time-tested internal products from Alibaba Group
Supports large-scale scenarios with millions of services
Open-source product with enterprise-level SLA',
+ 'home.nacos.edge.4.title': 'Rich internet application scenarios affinity',
+ 'home.nacos.edge.4.description': 'Supports rate throttling, big promotion plans, and multi-region active-active architectures
Supports a variety of relevant internet-based use cases directly or with slight extension
Traffic scheduling & service governance',
'home.ebook.resource': 'RESOURCES',
'home.ebook.nacos': 'E-Book Nacos',
'home.features.about': 'Core functions',
'home.features.title': 'Explore Our Features',
'home.features.1.summary': 'Dynamic Configuration Service',
- 'home.features.1.explain': 'Dynamic Configuration Service allows you to manage configurations in all environments in a centralized, externalized, and dynamic approach. Dynamic configuration saves you from redeploying your applications and services when configuration is updated. You can implement stateless services and achieve on-demand scaling effortlessly.',
+ 'home.features.1.explain': 'Dynamic Configuration Service allows you to manage configurations in all environments in a centralized, externalized, and dynamic approach. Dynamic configuration saves you from redeploying your applications and services when configuration is updated. You can implement stateless services and achieve on-demand scaling effortlessly.',
'home.features.2.summary': 'Service Discovery and Management',
- 'home.features.2.explain': 'Dynamic Service Discovery is key to service-centric (for example microservice or cloud-native) architectures. Nacos supports both DNS-based and RPC-based (Dubbo, gRPC) service discovery, and provides real-time service health checks to prevent routing requests from being sent to unhealthy hosts or service instances. With Nacos, you can also implement circuit breakers for your services with ease.',
+ 'home.features.2.explain': 'Dynamic Service Discovery is key to service-centric (for example microservice or cloud-native) architectures. Nacos supports both DNS-based and RPC-based (Dubbo, gRPC) service discovery, and provides real-time service health checks to pre vent routing requests from being sent to unhealthy hosts or service instances. With Nacos, you can also implement circuit breakers for your services with ease.',
'home.features.3.summary': 'Dynamic DNS Service',
- 'home.features.3.explain': 'By supporting weighted routing, Dynamic DNS Service helps you implement mid-tier load balancing, more flexible routing, traffic control and DNS resolution services in the production environment within your data center. Dynamic DNS Service also makes it easier for you to implement DNS-based service discovery, which minimizes the risk of coupling to vendor-specific service discovery APIs.',
+ 'home.features.3.explain': 'By supporting weighted routing, Dynamic DNS Service helps you implement mid-tier load balancing, more flexible routing, traffic control and DNS resolution services in the production environment within your data center. Dynamic DNS Service also makes it easier for you to implement DNS-based service discovery, which minimizes the risk of coupling to vendor-specific service discovery APIs.',
'home.use.companies.about': 'SELECTION OF SOME COMPANIES',
'home.solutions.about': 'SOLUTIONS',
'home.solutions.card.1': 'Best Practices for High Availability in MSE Registration Configuration Center',
diff --git a/src/i18n/zh-cn/ui.ts b/src/i18n/zh-cn/ui.ts
index 050a8bf6814..8248b9f9108 100644
--- a/src/i18n/zh-cn/ui.ts
+++ b/src/i18n/zh-cn/ui.ts
@@ -62,13 +62,13 @@ export default {
'home.introduce.nacos.aim': '我们相信一切都是服务,每个服务节点被构想为一个星球,每个服务都是一个星系。Nacos 致力于帮助建立这些服务之间的连接,助力每个面向星辰的梦想能够透过云层,飞在云上,更好的链接整片星空。',
'home.nacos.edge.title': '持续增强开源能力',
'home.nacos.edge.1.title': '简单易用',
- 'home.nacos.edge.1.description': '动态服务发现的一站式解决方案。配置管理和动态 DNS服务。提供 20 多项开箱即用的特性,适用于面向服务的架构。轻量级的生产就绪控制台。',
+ 'home.nacos.edge.1.description': '动态配置管理、服务发现和动态的一站式解决方案
20多种开箱即用的以服务为中心的架构特性
基本符合生产要求的轻量级易用控制台',
'home.nacos.edge.2.title': '更适应云架构',
- 'home.nacos.edge.2.description': '无缝支持 Kubernetes 和 Spring Cloud,更容易在流行的公共云(例如阿里云和 AWS)上部署和运行,支持多租户和多环境。',
+ 'home.nacos.edge.2.description': '无缝支持 Kubernetes 和 Spring Cloud
在主流公共云上更容易部署和运行(例如阿里云和 AWS )
多租户和多环境支持',
'home.nacos.edge.3.title': '生产等级',
- 'home.nacos.edge.3.description': '源自阿里巴巴集团经过时间验证的内部产品。支持具有数百万服务规模的大型场景。开源产品并提供企业级的服务级别协议(SLA)。',
+ 'home.nacos.edge.3.description': '脱胎于历经阿里巴巴10年生产验证的内部产品
支持具有数百万服务的大规模场景
具备企业级SLA的开源产品',
'home.nacos.edge.4.title': '丰富的应用场景',
- 'home.nacos.edge.4.description': '支持速率限制、大规模推广计划和多区域主动-主动架构。直接或稍作扩展支持各种相关的基于互联网的使用案例。流量调度和服务治理。',
+ 'home.nacos.edge.4.description': '支持限流、大促销预案和异地多活
直接支持或稍作扩展即可支持大量有用的互联网应用场景
流量调度和服务治理',
'home.ebook.resource': '资源',
'home.ebook.nacos': 'Nacos 电子书',
'home.features.about': '核心功能',
From 7128aadb24241ba43c0f87a779866b0ebe3377ef Mon Sep 17 00:00:00 2001
From: shonen <83808926@qq.com>
Date: Sun, 4 Feb 2024 11:05:51 +0800
Subject: [PATCH 26/66] =?UTF-8?q?fix:(blog)=E4=BF=AE=E5=A4=8D=E5=8D=9A?=
=?UTF-8?q?=E5=AE=A2=E6=96=87=E7=AB=A0=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=20(#554)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: 博客添加目录和上一页下一页,版本下载更换目录组件,添加上一页下一页
* fix: 版本下载同步修改en页面
* fix: 修复打包报错
* fix:(blog,news,activity): 添加国际化,修改样式问题
* fix: (blog) 增加国际化字条对应关系
* fix:(i18n) 修改国际化词条
* fix:(blog)修复博客文章样式问题
---
src/pages/blog/[...slug].astro | 16 ++++++++++++++++
src/pages/en/blog/[...slug].astro | 8 +++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro
index 2170e030fd9..671968a20e7 100644
--- a/src/pages/blog/[...slug].astro
+++ b/src/pages/blog/[...slug].astro
@@ -80,6 +80,22 @@ const next = articlePosts[0].entries[currentIndex + 1]
+
+ {
+ (prev || next) && (
+
+ )
+ }
+