Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ const config = {
url: 'https://doris.apache.org',
baseUrl: '/',
onBrokenLinks: 'ignore',
onBrokenMarkdownLinks: 'ignore',
// onBrokenMarkdownLinks: 'ignore', // handled in markdown config below
favicon: 'images/favicon.ico',
organizationName: 'Apache',
markdown: {
format: 'detect',
hooks: {
onBrokenMarkdownLinks: 'ignore',
},
},
trailingSlash: true,
i18n: {
Expand Down Expand Up @@ -97,6 +100,7 @@ const config = {
projectName: 'apache/doris-website', // Usually your repo name.
customFields: {},
future: {
v4: true,
experimental_faster: true,
},
plugins: [
Expand Down
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,40 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.6.3",
"@docusaurus/faster": "^3.6.3",
"@docusaurus/plugin-client-redirects": "3.6.3",
"@docusaurus/plugin-pwa": "3.6.3",
"@docusaurus/preset-classic": "3.6.3",
"@docusaurus/core": "^3.9.2",
"@docusaurus/faster": "^3.9.2",
"@docusaurus/plugin-client-redirects": "^3.9.2",
"@docusaurus/plugin-pwa": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@emotion/css": "^11.13.5",
"@mdx-js/react": "^3.0.0",
"@mdx-js/react": "3.1.1",
"@yang1666204/docusaurus-search-local": "0.0.7",
"antd": "^5.12.2",
"autoprefixer": "^10.4.16",
"clsx": "^1.1.1",
"copy-to-clipboard": "^3.3.3",
"docusaurus-plugin-matomo": "^0.0.8",
"docusaurus-plugin-sass": "^0.2.3",
"postcss": "^8.4.32",
"postcss": "8.5.6",
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-github-button": "^0.1.11",
"rehype-katex": "7",
"remark-math": "6",
"sass": "^1.63.2",
"sass-migrator": "^2.2.1",
"swiper": "^9.0.5",
"sass": "1.97.1",
"sass-migrator": "2.5.6",
"semver": "7.7.3",
"swiper": "^12.0.3",
"tailwindcss": "^3.3.6",
"unist-util-visit": "^5.0.0",
"vitpress-generate-pdf": "^1.1.4"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.6.3",
"@docusaurus/module-type-aliases": "^3.9.2",
"@docusaurus/types": "^3.9.2",
"@tsconfig/docusaurus": "2.0.3",
"@types/react": "^18",
"typescript": "^5.2.2"
},
"resolutions": {
Expand Down
16 changes: 9 additions & 7 deletions src/components/PageBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,28 @@ export default function PageBanner(props: PageBannerProps): JSX.Element {
<section className={clsx('banner-section', className)}>
<div className="banner-container container">
<div className="banner-info mb-10 lg:mb-20">
{ event }
{event}
<div className="banner-title-wrap">
<div className="banner-title">{title}</div>
<div className="banner-sub-title">{subTitle}</div>
</div>
<div className="banner-buttons">
{buttons.map((btn, index) =>
typeof btn.link === 'string' ? (
{buttons.map(btn => {
const buttonKey = typeof btn.link === 'string' ? btn.link : `${btn.type}-${String(btn.label)}`;

return typeof btn.link === 'string' ? (
<Link
className={clsx('button button--secondary button--lg', btn.type)}
to={btn.link}
key={index}
key={buttonKey}
>
{btn.label}
</Link>
) : (
<div
onClick={btn.link}
className={clsx('button button--secondary button--lg', btn.type)}
key={index}
key={buttonKey}
>
{btn.label}
<svg
Expand All @@ -72,8 +74,8 @@ export default function PageBanner(props: PageBannerProps): JSX.Element {
/>
</svg>
</div>
),
)}
);
})}
</div>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/components/get-started/get-started.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ export default function GetStarted() {
</h2>
{data?.description && <div className="mt-4 text-center text-white">{data.description}</div>}
<div className="relative z-[1] mt-12 flex justify-center space-x-4 lg:space-x-10">
{data.buttons.map((item, index) => {
{data.buttons.map(item => {
const buttonKey = item.link ?? item.text;

return (
<ExternalLink
label={item.text}
key={index}
key={buttonKey}
{...item}
linkIcon={<ExternalLinkArrowIcon />}
/>
Expand Down
5 changes: 4 additions & 1 deletion src/components/newsletter-swiper/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Pagination } from 'swiper';
import React, { useCallback, useRef, useState } from 'react';
import usePhone from '../../hooks/use-phone';
import { Swiper, SwiperClass, SwiperSlide } from 'swiper/react';
import { Pagination } from 'swiper/modules';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import { NEWSLETTER_DATA } from '../../constant/newsletter.data';
import ReadMore from '../../components/ReadMore';
import { useAnimationFrame } from '../../hooks/use-animation-frame';
Expand Down
2 changes: 1 addition & 1 deletion src/components/user-swiper/user-swiper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import usePhone from '@site/src/hooks/use-phone';
import { Pagination } from 'swiper';
import React, { useCallback, useState } from 'react';
import { Swiper, SwiperClass, SwiperSlide } from 'swiper/react';
import { Pagination } from 'swiper/modules';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
Expand Down
12 changes: 6 additions & 6 deletions src/pages/_download/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ export default function Download(): JSX.Element {
</tr>
</thead>
<tbody>
{ALL_RELEASE.map((item, index) => (
<tr key={index}>
{ALL_RELEASE.map(item => (
<tr key={item.version}>
<td>{item.version}</td>
<td>{item.date}</td>
<td>
Expand Down Expand Up @@ -432,8 +432,8 @@ export default function Download(): JSX.Element {
</tr>
</thead>
<tbody>
{FLINK_CONNECTOR.map((item, index) => (
<tr key={index}>
{FLINK_CONNECTOR.map(item => (
<tr key={`${item.version}-${item.scala}`}>
<td>{item.version}</td>
<td>{item.date}</td>
<td>{item.flink}</td>
Expand Down Expand Up @@ -508,8 +508,8 @@ export default function Download(): JSX.Element {
</tr>
</thead>
<tbody>
{SPARK_CONNECTOR.map((item, index) => (
<tr key={index}>
{SPARK_CONNECTOR.map(item => (
<tr key={`${item.version}-${item.scala}`}>
<td>{item.version}</td>
<td>{item.date}</td>
<td>{item.spark}</td>
Expand Down
12 changes: 6 additions & 6 deletions src/pages/events/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const EVENTS_PAGE_DATA = {
),
isCover: true,
link: 'https://www.selectdb.com/resources/events/doris-webinar-20251204',
},{
}, {
cardTitle: '',
cardDate: '',
tag: '',
Expand All @@ -239,7 +239,7 @@ const EVENTS_PAGE_DATA = {
),
isCover: true,
link: 'https://www.selectdb.com/resources/events/doris-webinar-20251127',
},{
}, {
cardTitle: '',
cardDate: '',
tag: '',
Expand Down Expand Up @@ -968,14 +968,14 @@ export default function Events() {
className={`flex flex-wrap gap-x-[1.5rem] gap-y-[5rem] ${!showMore ? 'mb-[2.5rem]' : 'mb-[5rem]'
} `}
>
{eventList.slice(0, 9).map((event: Event, index) => (
<EventCard data={event} key={index} />
{eventList.slice(0, 9).map((event: Event) => (
<EventCard data={event} key={event.link} />
))}
</div>
{showMore ? (
<div className="flex flex-wrap gap-x-[1.5rem] gap-y-[5rem] mb-[2.5rem] ">
{eventList.slice(9).map((event: Event, index) => (
<EventCard data={event} key={index} />
{eventList.slice(9).map((event: Event) => (
<EventCard data={event} key={event.link} />
))}
</div>
) : null}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ export default function Home(): JSX.Element {
>
<div className="communitys">
<div className="row">
{communitys.map((item, index) => (
<div className={clsx('col', isPhone ? 'col--6' : 'col--4')} key={index}>
{communitys.map(item => (
<div className={clsx('col', isPhone ? 'col--6' : 'col--4')} key={item.title ?? item.href}>
<Link to={item.href} className="community-item">
{item.img}
<div className="community-title">{item.title}</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/learning/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ export default function Learning(): JSX.Element {
}
>
<div className="sitemap-list row">
{sitemapList.map((item, index) => (
<div className="sitemap-item" key={index}>
{sitemapList.map(item => (
<div className="sitemap-item" key={item.title}>
<div className="sitemap-title">{item.title}</div>
<div className="sitemap-icon">
<img src={item.icon} alt="" />
Expand Down
8 changes: 3 additions & 5 deletions src/pages/users/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { translate } from '@docusaurus/Translate';
import './index.scss';
import userCasesEn from '@site/userCases/en_US.json';
import { Swiper, SwiperClass, SwiperSlide } from 'swiper/react';

import { Pagination } from 'swiper';
import { Pagination } from 'swiper/modules';
import usePhone from '@site/src/hooks/use-phone';
import PageHeader from '@site/src/components/PageHeader';
import { USER_STORIES, USER_STORIES_CATEGORIES } from '@site/src/constant/user.data';
Expand Down Expand Up @@ -91,9 +90,8 @@ export default function Users(): JSX.Element {
{USER_STORIES_CATEGORIES.map((item: any) => (
<li className="py-px" key={item} onClick={() => changeCategory(item)}>
<span
className={`block cursor-pointer whitespace-nowrap rounded-[2.5rem] px-4 py-2 text-sm shadow-[0px_1px_4px_0px_rgba(49,77,136,0.10)] hover:bg-primary hover:text-white lg:px-6 lg:py-3 lg:text-base ${
active === item && 'bg-primary text-white'
}`}
className={`block cursor-pointer whitespace-nowrap rounded-[2.5rem] px-4 py-2 text-sm shadow-[0px_1px_4px_0px_rgba(49,77,136,0.10)] hover:bg-primary hover:text-white lg:px-6 lg:py-3 lg:text-base ${active === item && 'bg-primary text-white'
}`}
>
{item}
</span>
Expand Down
15 changes: 7 additions & 8 deletions src/theme/BlogListPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function BlogListPageContent(props) {
const [blogs, setBlogs] = useState([]);
const blogCategories = getBlogCategories(props);
const ALL_BLOG = blogCategories.find(item => item.label === allText).values;

const { siteConfig } = useDocusaurusContext();
const isCN = siteConfig.baseUrl.indexOf('zh-CN') > -1;
const [active, setActive] = useState(() => {
Expand Down Expand Up @@ -132,22 +132,21 @@ function BlogListPageContent(props) {
<HeadBlogs blogs={ALL_BLOG} />
<div className="flex flex-col lg:max-w-7xl">
<ul className="scrollbar-none w-[100%] mt-6 custom-scrollbar m-auto flex gap-3 overflow-auto text-[#4C576C] lg:mt-[5.5rem] lg:justify-center lg:gap-6">
{blogCategories.map((item: any, index) => (
<li className=" py-px" key={index} onClick={() => changeCategory(item.label)}>
{blogCategories.map((item: any) => (
<li className=" py-px" key={item.label} onClick={() => changeCategory(item.label)}>
<span
className={`block cursor-pointer whitespace-nowrap rounded-[2.5rem] px-4 py-2 text-sm shadow-[0px_1px_4px_0px_rgba(49,77,136,0.10)] hover:bg-[#444FD9] hover:text-white lg:px-6 lg:py-3 lg:text-base ${
active === item.label && 'bg-[#444FD9] text-white'
}`}
className={`block cursor-pointer whitespace-nowrap rounded-[2.5rem] px-4 py-2 text-sm shadow-[0px_1px_4px_0px_rgba(49,77,136,0.10)] hover:bg-[#444FD9] hover:text-white lg:px-6 lg:py-3 lg:text-base ${active === item.label && 'bg-[#444FD9] text-white'
}`}
>
{item.label}
</span>
</li>
))}
</ul>
<ul className="mt-6 grid gap-6 lg:mt-10 lg:grid-cols-3 m-auto">
{currentBlogs.map((BlogPostContent, i) => (
{currentBlogs.map(BlogPostContent => (
<BlogListItem
key={BlogPostContent.metadata.permalink + i}
key={BlogPostContent.metadata.permalink}
frontMatter={BlogPostContent.frontMatter}
assets={BlogPostContent.assets}
metadata={BlogPostContent.metadata}
Expand Down
15 changes: 14 additions & 1 deletion src/theme/DocSidebarItems/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,23 @@ import type { Props } from '@theme/DocSidebarItems';

function DocSidebarItems({ items, ...props }: Props): JSX.Element {
const visibleItems = useVisibleSidebarItems(items, props.activePath);
const getItemKey = (item: Props['items'][number]) => {
if ('docId' in item && item.docId) return item.docId;
if ('href' in item && item.href) return item.href;
if ('label' in item && item.label) return item.label;
return item.type;
};

return (
<DocSidebarItemsExpandedStateProvider>
{visibleItems.map((item, index) => (
<DocSidebarItem key={index} item={item} length={visibleItems.length} index={index} {...props} />
<DocSidebarItem
key={getItemKey(item)}
item={item}
length={visibleItems.length}
index={index}
{...props}
/>
))}
</DocSidebarItemsExpandedStateProvider>
);
Expand Down
Loading