diff --git a/docs/docs/.vitepress/config.ts b/docs/docs/.vitepress/config.ts index 8665cec..c1c6832 100644 --- a/docs/docs/.vitepress/config.ts +++ b/docs/docs/.vitepress/config.ts @@ -30,6 +30,7 @@ const sideBar = [ const links: { url: string; lastmod?: number }[] = []; export default defineConfig({ + base: '/creta', title: 'creta', description: 'Scaffolding to create a react+electron+typescript App.帮您快速搭建基于 React 和 TypeScript 的 electron 应用。', @@ -55,7 +56,7 @@ export default defineConfig({ 'link', { rel: 'icon', - href: 'https://assets.kira.host/image/creta_logo_colored.svg', + href: 'https://kira.host/assets/image/creta_logo_colored.svg', }, ], ], @@ -85,14 +86,18 @@ export default defineConfig({ transformHtml(_code, id, ctx) { if (/[\\/]404\.html$/.test(id)) return; - links.push({ - url: ctx.pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2.html'), + const url = ctx.pageData.relativePath.replace(/((^|\/)index)?\.md$/, `$2.html`); + + const link = { + url: `${ctx.siteConfig.site.base}${url === '.html' ? 'index.html' : url}`, lastmod: ctx.pageData.lastUpdated, - }); + } + + links.push(link); }, buildEnd(siteConfig) { - const { outDir } = siteConfig; - const sitemap = new SitemapStream({ hostname: 'https://creta.kira.host' }); + const { outDir, site: { base } } = siteConfig; + const sitemap = new SitemapStream({ hostname: `https://kira.host${base}` }); const sitemapWriteStream = fs.createWriteStream(path.resolve(outDir, 'sitemap.xml')); sitemap.pipe(sitemapWriteStream); links.forEach((link) => sitemap.write(link)); diff --git a/docs/docs/guide/creta.md b/docs/docs/guide/creta.md index 293682d..1ce3865 100644 --- a/docs/docs/guide/creta.md +++ b/docs/docs/guide/creta.md @@ -1,7 +1,7 @@ # 什么是 creta
- LOGO + LOGO
diff --git a/docs/docs/index.md b/docs/docs/index.md index 0bb866d..5795185 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -9,7 +9,7 @@ hero: text: Create React + Electron + TypeScript App. tagline: 帮您快速搭建基于 React 和 TypeScript 的 electron 应用 image: - src: https://assets.kira.host/image/creta_logo_colored.svg + src: https://kira.host/assets/image/creta_logo_colored.svg alt: Creta actions: - theme: brand diff --git a/readme.md b/readme.md index e1643ad..05337d5 100644 --- a/readme.md +++ b/readme.md @@ -3,7 +3,7 @@ [![npm version](https://badgen.net/npm/v/creta)](https://www.npmjs.com/package/creta) [![npm weekly download](https://badgen.net/npm/dw/creta)](https://www.npmjs.com/package/creta) [![github stars](https://badgen.net/github/stars/ch1ny/creta)](https://github.com/ch1ny/creta/stargazers)
- LOGO + LOGO
## 介绍 - Introduction @@ -12,7 +12,7 @@ ## 使用 - Usage -> 欢迎阅读我们提供的[使用手册](https://creta.kira.host/) +> 欢迎阅读我们提供的[使用手册](https://kira.host/creta/) **creta** 使用起来非常方便,只需一行指令即可搭建出 React+TypeScript+Electron 三合一的应用模板。 使用该脚手架前需要保证在当前机器上已安装有 **NodeJS** 环境,不过我相信绝大多数前端程序员都以具备了这一条前置条件,因此这里我便默认阅读本文的各位已经能够执行后续的操作了。 diff --git a/src/cli/package.json b/src/cli/package.json index 366e48b..378a863 100644 --- a/src/cli/package.json +++ b/src/cli/package.json @@ -23,7 +23,7 @@ "type": "git", "url": "https://github.com/ch1ny/creta.git" }, - "homepage": "https://creta.kira.host/", + "homepage": "https://kira.host/creta/", "bugs": { "url": "https://github.com/ch1ny/creta/issues" }, diff --git a/src/cli/templates/default/README.md b/src/cli/templates/default/README.md index b5e5439..234a39f 100644 --- a/src/cli/templates/default/README.md +++ b/src/cli/templates/default/README.md @@ -2,4 +2,4 @@ This is a electron programme created with `creta`. -You can visit and get help from [here](https://creta.kira.host/) +You can visit and get help from [here](https://kira.host/creta/) diff --git a/src/creta/README.md b/src/creta/README.md index e1643ad..05337d5 100644 --- a/src/creta/README.md +++ b/src/creta/README.md @@ -3,7 +3,7 @@ [![npm version](https://badgen.net/npm/v/creta)](https://www.npmjs.com/package/creta) [![npm weekly download](https://badgen.net/npm/dw/creta)](https://www.npmjs.com/package/creta) [![github stars](https://badgen.net/github/stars/ch1ny/creta)](https://github.com/ch1ny/creta/stargazers)
- LOGO + LOGO
## 介绍 - Introduction @@ -12,7 +12,7 @@ ## 使用 - Usage -> 欢迎阅读我们提供的[使用手册](https://creta.kira.host/) +> 欢迎阅读我们提供的[使用手册](https://kira.host/creta/) **creta** 使用起来非常方便,只需一行指令即可搭建出 React+TypeScript+Electron 三合一的应用模板。 使用该脚手架前需要保证在当前机器上已安装有 **NodeJS** 环境,不过我相信绝大多数前端程序员都以具备了这一条前置条件,因此这里我便默认阅读本文的各位已经能够执行后续的操作了。 diff --git a/src/creta/package.json b/src/creta/package.json index b6720ee..cec737c 100644 --- a/src/creta/package.json +++ b/src/creta/package.json @@ -54,7 +54,7 @@ "type": "git", "url": "https://github.com/ch1ny/creta.git" }, - "homepage": "https://creta.kira.host/", + "homepage": "https://kira.host/creta/", "bugs": { "url": "https://github.com/ch1ny/creta/issues" },