feat: 新增开源版官网骨架 website/,并接入部署编排与网关路由

- website/:VitePress 官网工程(首页/功能/对比/快速开始/部署运维/教程/社区),与文档站同构
- 两种形态由 SITE_BASE 决定:/www/ 子路径(过渡)与 / 根路径(独立域名),内容同源
- deploy/:新增 with-website profile、网关 /www/ 路由、多域名 website vhost 段
- Makefile:新增 website 镜像条目与 make website 目标
- 教程页给出部署/使用两支视频的元数据与录制要求,官网留有教程入口
This commit is contained in:
技小云
2026-11-04 10:41:05 +08:00
committed by MiFaZhan
parent e98f8561f7
commit d78379486c
23 changed files with 3293 additions and 1 deletions
+80
View File
@@ -0,0 +1,80 @@
import { defineConfig } from 'vitepress'
/**
* 官网(开源版门户站)构建配置
*
* SITE_BASE 由构建参数注入:
* - /www/ 过渡形态:挂在统一网关的 /www/ 路径下(没有独立域名时用)
* - / 独立域名形态:站点独占域名根路径
* 两者内容完全同源,差别只有资源前缀与路由前缀,所以用构建参数而不是改代码。
*/
const SITE_BASE = process.env.SITE_BASE ?? '/www/'
/**
* 仓库地址。开源版代码只发 git.5iot.com/iotlcm-public,
* 若后续确认了公开镜像站,改这一处即可(页面里统一引用常量,不重复硬编码)。
*/
const REPO_URL = process.env.REPO_URL ?? 'https://git.5iot.com/iotlcm-public/iotlcm'
/**
* 文档站地址。文档站与官网是两个容器:
* - 过渡形态:文档站挂在网关的 /docs/ 下
* - 独立域名形态:文档站通常独占 docs.<域名> 或同域 /docs/
* 独立部署时用 DOCS_URL 覆盖。
*/
const DOCS_URL = process.env.DOCS_URL ?? '/docs/'
export default defineConfig({
srcDir: './pages',
base: SITE_BASE,
title: 'iotLCM',
description: 'iotLCM 物联网卡全生命周期管理平台(开源版)',
lang: 'zh-CN',
cleanUrls: true,
lastUpdated: false,
head: [
['link', { rel: 'icon', type: 'image/svg+xml', href: `${SITE_BASE}favicon.svg` }],
],
themeConfig: {
nav: [
{ text: '首页', link: '/' },
{ text: '功能', link: '/features' },
{ text: '方案对比', link: '/compare' },
{ text: '快速开始', link: '/guide/quickstart' },
{ text: '教程', link: '/guide/tutorial' },
{ text: '社区', link: '/community' },
{ text: '文档中心', link: DOCS_URL },
],
sidebar: {
'/guide/': [
{
text: '指南',
collapsed: false,
items: [
{ text: '快速开始', link: '/guide/quickstart' },
{ text: '部署与运维', link: '/guide/deploy' },
{ text: '教程视频', link: '/guide/tutorial' },
],
},
],
},
socialLinks: [
{ icon: 'github', link: REPO_URL },
],
footer: {
message: 'iotLCM 开源版 · Apache-2.0',
copyright: 'Copyright © iotLCM',
},
search: {
provider: 'local',
},
outline: {
level: [2, 3],
label: '本页目录',
},
docFooter: {
prev: '上一页',
next: '下一页',
},
},
})
+6
View File
@@ -0,0 +1,6 @@
import DefaultTheme from 'vitepress/theme'
import type { Theme } from 'vitepress'
export default {
extends: DefaultTheme,
} satisfies Theme