Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
jiazengp committed Jul 9, 2023
1 parent 88b06d8 commit 709fd4f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
8 changes: 3 additions & 5 deletions .vitepress/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { jaConfig } from './ja'
import { krConfig } from './kr'

export const links: any[] = []
export const base = process.env.BASE || '/docs/'
export const isProd = process.env.NODE_ENV === 'production'
export const commitRef = process.env.COMMIT_REF?.slice(0, 8) || 'dev'
export const productionHead: HeadConfig[] = [
Expand Down Expand Up @@ -51,7 +50,6 @@ export const productionHead: HeadConfig[] = [
]

export default defineConfig({
base: base,
lastUpdated: true,
srcDir: 'src',
srcExclude: [],
Expand Down Expand Up @@ -189,7 +187,7 @@ export default defineConfig({
'link',
{
rel: 'icon',
href: `${base}/imgs/favicon-32x32.png`,
href: `https://yuanshen.site/docs/imgs/favicon-32x32.png`,
type: 'image/png',
},
],
Expand All @@ -204,15 +202,15 @@ export default defineConfig({
'link',
{
rel: 'alternate',
href: `${base}/feed.rss`,
href: `https://yuanshen.site/docs/feed.rss`,
type: 'application/rss',
},
],
[
'link',
{
rel: 'alternate',
href: `${base}/imgs/favicon.ico`,
href: `https://yuanshen.site/docs/imgs/favicon.ico`,
type: 'image/x-icon',
},
],
Expand Down
1 change: 0 additions & 1 deletion .vitepress/config/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import path from 'path'
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
import type { CustomConfig } from './types'

const base = process.env.BASE || '/docs/'
export const META_URL = 'https://yuanshen.site/docs/ja/'
export const META_TITLE = '原神地図'
export const META_KEYWORDS =
Expand Down
11 changes: 8 additions & 3 deletions .vitepress/config/kr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import path from 'path'
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
import type { CustomConfig } from './types'

const base = process.env.BASE || '/docs/'
export const META_URL = 'https://yuanshen.site/docs/kr/'
export const META_TITLE = 'Genshin Interactive Map'
export const META_KEYWORDS =
Expand Down Expand Up @@ -346,12 +345,18 @@ export const krConfig: LocaleSpecificConfig<
['meta', { property: 'twitter:description', content: META_DESCRIPTION }],
['meta', { property: 'og:site_name', content: META_TITLE }],
['meta', { property: 'og:locale', content: 'en-US' }],
['meta', { property: 'og:image', content: `${base}/imgs/cover.jpg` }],
[
'meta',
{
property: 'og:image',
content: `https://yuanshen.site/docs/imgs/cover.jpg`,
},
],
[
'meta',
{
name: 'twitter:image',
content: `${base}/imgs/cover.jpg`,
content: `https://yuanshen.site/docs/imgs/cover.jpg`,
},
],
],
Expand Down
11 changes: 8 additions & 3 deletions .vitepress/config/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import path from 'path'
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
import type { CustomConfig } from './types'

const base = process.env.BASE || '/docs'
export const META_URL = 'https://yuanshen.site/docs/'
export const META_TITLE = '原神地图'
export const META_DESCRIPTION = '空荧酒馆制作的原神全资源攻略地图。'
Expand All @@ -24,12 +23,18 @@ export const zhConfig: LocaleSpecificConfig<
['meta', { property: 'og:site_name', content: META_TITLE }],
['meta', { property: 'twitter:description', content: META_DESCRIPTION }],
['meta', { property: 'og:locale', content: 'zh-CN' }],
['meta', { property: 'og:image', content: `${base}/imgs/cover.jpg` }],
[
'meta',
{
property: 'og:image',
content: `https://yuanshen.site/docs/imgs/cover.jpg`,
},
],
[
'meta',
{
name: 'twitter:image',
content: `${base}/imgs/cover.jpg`,
content: `https://yuanshen.site/docs/imgs/cover.jpg`,
},
],
],
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"license": "MIT",
"type": "module",
"scripts": {
"build": "vitepress build",
"build-mpa": "vitepress build --mpa",
"build": "vitepress build --base /docs/",
"build-mpa": "vitepress build --mpa --base /docs/",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"commit": "git-cz",
"dev": "vitepress",
"dev": "vitepress --base /docs/",
"postinstall": "husky install",
"lint": "prettier --write . && eslint --fix --ext .js,.ts,.vue",
"lint:check": "pnpm lint:prettier && pnpm lint:eslint && pnpm lint:zh",
"lint:eslint": "eslint . --ext .js,.ts,.vue",
"lint:md": "markdownlint **/*.md && lint:zh",
"lint:prettier": "prettier --check .",
"lint:zh": "zhlint 'docs/**/*.md'",
"serve": "vitepress serve"
"serve": "vitepress serve --base /docs/"
},
"lint-staged": {
"*.{js,ts,vue}": [
Expand Down

0 comments on commit 709fd4f

Please sign in to comment.