Apache StreamPark 网站项目使用教程

Apache StreamPark 网站项目使用教程

incubator-streampark-websiteApache streampark Website项目地址:https://gitcode.com/gh_mirrors/in/incubator-streampark-website

1. 项目的目录结构及介绍

Apache StreamPark 网站项目的目录结构如下:

|-- community
|-- docs
|-- src
|   |-- pages
|   |-- styles
|-- static
|   |-- img
|-- docusaurus.config.js
|-- package.json
|-- pnpm-lock.yaml
|-- README.md

目录结构介绍

  • community: 包含社区相关文档和资源。
  • docs: 包含项目的文档文件。
  • src: 包含网站的源代码。
    • pages: 网站的页面文件。
    • styles: 网站的样式文件。
  • static: 静态资源文件夹。
    • img: 图片资源。
  • docusaurus.config.js: Docusaurus 配置文件。
  • package.json: 项目的依赖管理文件。
  • pnpm-lock.yaml: pnpm 的锁定文件。
  • README.md: 项目说明文件。

2. 项目的启动文件介绍

项目的启动文件主要是 package.json 中的脚本命令。以下是一些关键的启动命令:

  • pnpm install: 安装项目依赖。
  • pnpm run start: 启动开发服务器,预览英文版本。
  • pnpm run start-zh: 启动开发服务器,预览中文版本。
  • pnpm run build: 构建静态网站资源文件。

启动文件介绍

  • package.json:
    {
      "scripts": {
        "start": "docusaurus start",
        "build": "docusaurus build",
        "swizzle": "docusaurus swizzle",
        "deploy": "docusaurus deploy",
        "clear": "docusaurus clear",
        "serve": "docusaurus serve",
        "write-translations": "docusaurus write-translations",
        "write-heading-ids": "docusaurus write-heading-ids",
        "start-zh": "docusaurus start --locale zh-Hans"
      }
    }
    

3. 项目的配置文件介绍

项目的配置文件主要是 docusaurus.config.js,它包含了网站的各种配置信息。

配置文件介绍

  • docusaurus.config.js:
    module.exports = {
      title: 'Apache StreamPark',
      tagline: 'A magical framework that makes stream processing easier',
      url: 'https://streampark.apache.org',
      baseUrl: '/',
      onBrokenLinks: 'throw',
      onBrokenMarkdownLinks: 'warn',
      favicon: 'img/favicon.ico',
      organizationName: 'apache',
      projectName: 'incubator-streampark-website',
      themeConfig: {
        navbar: {
          title: 'Apache StreamPark',
          logo: {
            alt: 'Apache StreamPark Logo',
            src: 'img/logo.svg',
          },
          items: [
            {
              to: 'docs/',
              activeBasePath: 'docs',
              label: 'Docs',
              position: 'left',
            },
            {to: 'blog', label: 'Blog', position: 'left'},
            {
              href: 'https://github.com/apache/incubator-streampark-website',
              label: 'GitHub',
              position: 'right',
            },
          ],
        },
        footer: {
          style: 'dark',
          links: [
            {
              title: 'Docs',
              items: [
                {
                  label: 'Style Guide',
                  to: 'docs/',
                },
              ],
            },
            {
              title: 'Community',
              items: [
                {
                  label: 'Stack Overflow',
                  href: 'https://stackoverflow.com/questions/tagged/docusaurus',
                },
                {
                  label: 'Discord',
                  href: 'https://discordapp.com/invite/docusaurus',
                },
                {
                  label: 'Twitter',
                  href: 'https://twitter.com/docusaurus',
                },
    

incubator-streampark-websiteApache streampark Website项目地址:https://gitcode.com/gh_mirrors/in/incubator-streampark-website

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

段琳惟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值