ccb3f5e39a
mirror-to-gitee / mirror (push) Successful in 4s
用户反馈首页缺产品功能、核心能力与界面预览,且没有官方文档入口。 新增区块 - 产品功能:三条产品线(iotLCM / 秀杰 DTU / XiuAdmin), 每条列 6 项能力,卡片底部直达详情页 - 核心能力:8 张带标签的卡片,讲工程层面的硬指标 (部署、接入、开放、治理、韧性、交付、数据、维护), 与"产品功能"区分开:前者是做什么,后者是凭什么能用住 - 界面预览:ScreenshotPreview 组件,Web 管理端 / 小程序端两组标签切换, 首屏大图 + 缩略图条,带浏览器窗口装饰 - 官方文档:6 个入口卡片(文档中心、Web 手册、小程序手册、部署手册、 OpenAPI 合同、门户部署说明),外链自动加 target=_blank 界面预览的占位机制 - previewShots 里 file 留空时渲染带图注的占位框,不报错、不影响构建 - 补图只改 file 字段,组件无需改动 - 新增 pages/public/screenshots/README.md 写清命名、尺寸、脱敏要求 导航 - 增加产品功能、核心能力、界面预览、官方文档四个锚点项 - 窄屏(≤860px)隐藏中间三个锚点项,避免挤压 验证 - 构建 13 页,208 条引用 0 失效 - 浏览器实测:7 个导航项、5 个 section 锚点齐全 - 移动端 390px 无横向溢出 - 文档站 5 个外链地址均实测 200 可达
79 lines
2.2 KiB
TypeScript
79 lines
2.2 KiB
TypeScript
import { defineConfig } from 'vitepress'
|
|
import { projects } from '../data/projects'
|
|
|
|
/**
|
|
* 门户站构建配置
|
|
*
|
|
* SITE_BASE 由构建参数注入:
|
|
* - /www/ 过渡形态:挂在已有网关的 /www/ 路径下(没有独立域名时用)
|
|
* - / 独立域名形态:站点独占域名根路径
|
|
* 两者内容完全同源,只有资源前缀与路由前缀不同,所以用构建参数而不是改代码。
|
|
*/
|
|
const SITE_BASE = process.env.SITE_BASE ?? '/www/'
|
|
|
|
/** 代码仓组织(雪羊科技企业仓) */
|
|
const ORG_URL = process.env.ORG_URL ?? 'https://gitee.com/snowgoat'
|
|
|
|
/** 各项目的文档站地址(按项目 id 覆盖) */
|
|
const DOCS_URL: Record<string, string> = {
|
|
iotlcm: 'http://open.5iot.com:5051/docs/',
|
|
}
|
|
|
|
export default defineConfig({
|
|
srcDir: './pages',
|
|
base: SITE_BASE,
|
|
title: '雪羊科技开源',
|
|
description: '雪羊科技开源项目门户:物联网卡管理、DTU 设备管理、中后台开发框架',
|
|
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: '/#core' },
|
|
{ text: '界面预览', link: '/#preview' },
|
|
{ text: '项目', link: '/projects/' },
|
|
{ text: '官方文档', link: '/#docs' },
|
|
{ text: '关于', link: '/about' },
|
|
],
|
|
sidebar: {
|
|
'/projects/': [
|
|
{
|
|
text: '项目',
|
|
collapsed: false,
|
|
items: projects.map((p) => ({ text: p.name, link: p.page })),
|
|
},
|
|
],
|
|
'/guide/': [
|
|
{
|
|
text: '门户',
|
|
collapsed: false,
|
|
items: [{ text: '门户部署', link: '/guide/portal-deploy' }],
|
|
},
|
|
],
|
|
},
|
|
socialLinks: [
|
|
{ icon: 'github', link: ORG_URL },
|
|
],
|
|
footer: {
|
|
message: '雪羊科技开源 · Apache-2.0',
|
|
copyright: 'Copyright © 雪羊科技',
|
|
},
|
|
search: {
|
|
provider: 'local',
|
|
},
|
|
outline: {
|
|
level: [2, 3],
|
|
label: '本页目录',
|
|
},
|
|
docFooter: {
|
|
prev: '上一页',
|
|
next: '下一页',
|
|
},
|
|
},
|
|
})
|