Apache Paimon 项目使用教程
paimon-websiteApache Paimon Website项目地址:https://gitcode.com/gh_mirrors/pa/paimon-website
1. 项目的目录结构及介绍
Apache Paimon 项目的目录结构如下:
paimon-website/
├── docs/
│ ├── en/
│ └── zh/
├── src/
│ ├── pages/
│ └── styles/
├── static/
│ ├── images/
│ └── favicon.ico
├── .gitignore
├── README.md
├── package.json
└── docusaurus.config.js
目录结构介绍
- docs/: 存放文档文件,包括英文(en)和中文(zh)文档。
- src/: 存放源代码文件,包括页面(pages)和样式(styles)。
- static/: 存放静态资源,如图片(images)和网站图标(favicon.ico)。
- .gitignore: Git 忽略文件列表。
- README.md: 项目说明文档。
- package.json: 项目依赖和脚本配置文件。
- docusaurus.config.js: Docusaurus 配置文件。
2. 项目的启动文件介绍
项目的启动文件主要是 package.json
中的脚本配置。以下是一些常用的启动命令:
{
"scripts": {
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy"
}
}
启动命令介绍
- start: 启动开发服务器。
- build: 构建生产环境版本。
- swizzle: 自定义主题组件。
- deploy: 部署网站。
3. 项目的配置文件介绍
项目的配置文件主要是 docusaurus.config.js
,它包含了网站的基本配置信息。以下是一些关键配置项:
module.exports = {
title: 'Apache Paimon',
tagline: 'A lake format that enables building a Realtime Lakehouse Architecture',
url: 'https://paimon.apache.org',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'static/favicon.ico',
organizationName: 'apache',
projectName: 'paimon-website',
themeConfig: {
navbar: {
title: 'Apache Paimon',
logo: {
alt: 'Apache Paimon Logo',
src: 'static/images/logo.svg',
},
items: [
{to: 'docs/introduction', label: '文档', position: 'left'},
{to: 'blog', label: '博客', position: 'left'},
{href: 'https://github.com/apache/paimon-website', label: 'GitHub', position: 'right'},
],
},
footer: {
style: 'dark',
links: [
{
title: '文档',
items: [
{label: '介绍', to: 'docs/introduction'},
],
},
{
title: '社区',
items: [
{label: 'GitHub', href: 'https://github.com/apache/paimon-website'},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} The Apache Software Foundation.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
},
blog: {
showReadingTime: true,
},
theme: {
customCss: require.resolve('./src/styles/custom.css'),
},
},
],
],
};
配置文件介绍
- title: 网站标题。
- tagline: 网站标语。
- url: 网站的 URL。
- baseUrl: 网站的基本路径。
- favicon: 网站图标路径。
- organizationName: 组织名称。
- projectName: 项目名称。
- themeConfig: 主题配置,包括导航栏
paimon-websiteApache Paimon Website项目地址:https://gitcode.com/gh_mirrors/pa/paimon-website