mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-11-21 15:43:09 +01:00
refactor: add example for forks in other languages
This commit is contained in:
parent
24c9d45f0d
commit
9021679b53
@ -6,6 +6,11 @@ import { zh } from './zh'
|
||||
|
||||
export default defineConfig({
|
||||
...shared,
|
||||
title: "NixOS & Flakes Book",
|
||||
|
||||
rewrites: {
|
||||
"en/:rest*": ":rest*",
|
||||
},
|
||||
locales: {
|
||||
root: {
|
||||
label: 'English',
|
||||
@ -15,6 +20,31 @@ export default defineConfig({
|
||||
label: '简体中文',
|
||||
...zh
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
// For forks in other languages, here is an example of how to add a new locale:
|
||||
// rewrites: {
|
||||
// "ja/:rest*": ":rest*",
|
||||
// },
|
||||
// // Exclude the original language's markdown files when build dist
|
||||
// // NOTE: You can still preview the original language's pages in dev mode
|
||||
// srcExclude: ['zh/**/*.md', 'en/**/*.md'],
|
||||
// locales: {
|
||||
// // Your language's root configuration
|
||||
// root: {
|
||||
// label: 'Japanese',
|
||||
// ...ja,
|
||||
// },
|
||||
//
|
||||
// // Languages maintained by the original author
|
||||
// en: {
|
||||
// label: 'English',
|
||||
// link: "https://nixos-and-flakes.thiscute.world/",
|
||||
// },
|
||||
// zh: {
|
||||
// label: '简体中文',
|
||||
// link: "https://nixos-and-flakes.thiscute.world/zh/",
|
||||
// },
|
||||
// },
|
||||
})
|
||||
|
||||
|
@ -5,12 +5,6 @@ import { PageData, defineConfig } from "vitepress"
|
||||
const require = createRequire(import.meta.url)
|
||||
|
||||
export const shared = defineConfig({
|
||||
title: "NixOS & Flakes Book",
|
||||
|
||||
rewrites: {
|
||||
"en/:rest*": ":rest*",
|
||||
},
|
||||
|
||||
// Whether to get the last updated timestamp for each page using Git.
|
||||
lastUpdated: true,
|
||||
// remove trailing `.html`
|
||||
|
Loading…
Reference in New Issue
Block a user