mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-01 01:04:00 +00:00
fix(docs): fix and cleanup VuePress config (#3738)
* Use relative links * Remove migrating link * Fix zh-* config * Adjust how sidebar is generated * Enable evergreen * Format * Update docs/.vuepress/config.js Co-authored-by: David Knaack <davidkna@users.noreply.github.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
parent
4fbab4e389
commit
7cdc230100
@ -1,3 +1,28 @@
|
|||||||
|
const sidebar = (lang, override = {}) =>
|
||||||
|
[
|
||||||
|
"", // "Home", which should always have a override
|
||||||
|
"guide", // README, which should always have a override
|
||||||
|
// Overrides for any page below is an inconsistency between the sidebar title and page title
|
||||||
|
"installing",
|
||||||
|
"config",
|
||||||
|
"advanced-config",
|
||||||
|
"faq",
|
||||||
|
"presets",
|
||||||
|
].map(page => {
|
||||||
|
let path = "/";
|
||||||
|
|
||||||
|
if (lang) {
|
||||||
|
path += `${lang}/`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (page) {
|
||||||
|
path += `${page}/`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If no override is set for current page, let VuePress fallback to page title
|
||||||
|
return page in override ? [path, override[page]] : path;
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
locales: {
|
locales: {
|
||||||
"/": {
|
"/": {
|
||||||
@ -85,6 +110,7 @@ module.exports = {
|
|||||||
["meta", { name: "twitter:image", content: "https://starship.rs/icon.png" }],
|
["meta", { name: "twitter:image", content: "https://starship.rs/icon.png" }],
|
||||||
["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt" }],
|
["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt" }],
|
||||||
],
|
],
|
||||||
|
evergreen: true,
|
||||||
theme: "default-prefers-color-scheme",
|
theme: "default-prefers-color-scheme",
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
logo: "/icon.png",
|
logo: "/icon.png",
|
||||||
@ -113,16 +139,9 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Configuration", link: "/config/" }],
|
nav: [{ text: "Configuration", link: "/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("", {
|
||||||
"/",
|
guide: "Guide",
|
||||||
["/guide/", "Guide"],
|
}),
|
||||||
["/installing/", "Advanced Installation"],
|
|
||||||
["/config/", "Configuration"],
|
|
||||||
["/advanced-config/", "Advanced Configuration"],
|
|
||||||
["/faq/", "Frequently Asked Questions"],
|
|
||||||
["/presets/", "Presets"],
|
|
||||||
["/migrating-to-0.45.0/", "Migrating to v0.45.0"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/de-DE/": {
|
"/de-DE/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -132,16 +151,14 @@ module.exports = {
|
|||||||
// Custom text for edit link. Defaults to "Edit this page"
|
// Custom text for edit link. Defaults to "Edit this page"
|
||||||
editLinkText: "Bearbeite diese Seite auf GitHub",
|
editLinkText: "Bearbeite diese Seite auf GitHub",
|
||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Konfiguration", link: "/config/" }],
|
nav: [{ text: "Konfiguration", link: "/de-DE/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("de-DE", {
|
||||||
"/de-DE/",
|
guide: "Anleitung",
|
||||||
["/de-DE/guide/", "Anleitung"],
|
installing: "Erweiterte Installation",
|
||||||
["/de-DE/config/", "Konfiguration"],
|
faq: "Häufig gestellte Fragen",
|
||||||
["/de-DE/advanced-config/", "Erweiterte Konfiguration"],
|
presets: "Konfigurations-Beispiele",
|
||||||
["/de-DE/faq/", "Häufig gestellte Fragen"],
|
}),
|
||||||
["/de-DE/presets/", "Konfigurations-Beispiele"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/es-ES/": {
|
"/es-ES/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -153,14 +170,12 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Configuración", link: "/es-ES/config/" }],
|
nav: [{ text: "Configuración", link: "/es-ES/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("es-ES", {
|
||||||
"/es-ES/",
|
guide: "Guía",
|
||||||
["/es-ES/guide/", "Guía"],
|
installing: "Instalación avanzada",
|
||||||
["/es-ES/config/", "Configuración"],
|
faq: "Preguntas frecuentes",
|
||||||
["/es-ES/advanced-config/", "Configuración Avanzada"],
|
presets: "Ajustes predeterminados",
|
||||||
["/es-ES/faq/", "Preguntas frecuentes"],
|
}),
|
||||||
["/es-ES/presets/", "Ajustes predeterminados"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/fr-FR/": {
|
"/fr-FR/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -172,14 +187,10 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Configuration", link: "/fr-FR/config/" }],
|
nav: [{ text: "Configuration", link: "/fr-FR/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("fr-FR", {
|
||||||
"/fr-FR/",
|
guide: "Guide",
|
||||||
["/fr-FR/guide/", "Guide"],
|
installing: "Installation avancée",
|
||||||
["/fr-FR/config/", "Configuration"],
|
}),
|
||||||
["/fr-FR/advanced-config/", "Configuration avancée"],
|
|
||||||
["/fr-FR/faq/", "Foire aux questions"],
|
|
||||||
["/fr-FR/presets/", "Paramètres par défaut"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/id-ID/": {
|
"/id-ID/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -191,14 +202,12 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Konfigurasi", link: "/id-ID/config/" }],
|
nav: [{ text: "Konfigurasi", link: "/id-ID/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("id-ID", {
|
||||||
"/id-ID/",
|
guide: "Petunjuk",
|
||||||
["/id-ID/guide/", "Petunjuk"],
|
installing: "Advanced Installation",
|
||||||
["/id-ID/config/", "Konfigurasi"],
|
faq: "Pertanyaan Umum",
|
||||||
["/id-ID/advanced-config/", "Konfigurasi Lanjutan"],
|
presets: "Prasetel",
|
||||||
["/id-ID/faq/", "Pertanyaan Umum"],
|
}),
|
||||||
["/id-ID/presets/", "Prasetel"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/it-IT/": {
|
"/it-IT/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -210,14 +219,10 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Configuration", link: "/it-IT/config/" }],
|
nav: [{ text: "Configuration", link: "/it-IT/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("it-IT", {
|
||||||
"/it-IT/",
|
guide: "Guide",
|
||||||
["/it-IT/guide/", "Guide"],
|
installing: "Installazione Avanzata",
|
||||||
["/it-IT/config/", "Configurazione"],
|
}),
|
||||||
["/it-IT/advanced-config/", "Configurazione Avanzata"],
|
|
||||||
["/it-IT/faq/", "FAQ"],
|
|
||||||
["/it-IT/presets/", "Preset"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/ja-JP/": {
|
"/ja-JP/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -229,15 +234,10 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "設定", link: "/ja-JP/config/" }],
|
nav: [{ text: "設定", link: "/ja-JP/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("ja-JP", {
|
||||||
"/ja-JP/",
|
guide: "ガイド",
|
||||||
["/ja-JP/guide/", "ガイド"],
|
installing: "高度なインストール",
|
||||||
["/ja-JP/config/", "設定"],
|
}),
|
||||||
["/ja-JP/advanced-config/", "高度な設定"],
|
|
||||||
["/ja-JP/faq/", "FAQ"],
|
|
||||||
["/ja-JP/presets/", "準備するもの"],
|
|
||||||
["/ja-JP/migrating-to-0.45.0/", "v0.45への移行"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/pt-BR/": {
|
"/pt-BR/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -249,14 +249,12 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Configuração", link: "/pt-BR/config/" }],
|
nav: [{ text: "Configuração", link: "/pt-BR/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("pt-BR", {
|
||||||
"/pt-BR/",
|
guide: "Guia",
|
||||||
["/pt-BR/guide/", "Guia"],
|
installing: "Instalação avançada",
|
||||||
["/pt-BR/config/", "Configuração"],
|
faq: "Perguntas frequentes",
|
||||||
["/pt-BR/advanced-config/", "Configuração avançada"],
|
presets: "Predefinições",
|
||||||
["/pt-BR/faq/", "Perguntas frequentes"],
|
}),
|
||||||
["/pt-BR/presets/", "Predefinições"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/ru-RU/": {
|
"/ru-RU/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -268,14 +266,13 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Настройка", link: "/ru-RU/config/" }],
|
nav: [{ text: "Настройка", link: "/ru-RU/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("ru-RU", {
|
||||||
"/ru-RU/",
|
guide: "Руководство",
|
||||||
["/ru-RU/guide/", "Руководство"],
|
installing: "Advanced Installation",
|
||||||
["/ru-RU/config/", "Настройка"],
|
config: "Настройка",
|
||||||
["/ru-RU/advanced-config/", "Расширенная Настройка"],
|
"advanced-config": "Расширенная Настройка",
|
||||||
["/ru-RU/faq/", "Часто Задаваемые Вопросы"],
|
faq: "Часто Задаваемые Вопросы",
|
||||||
["/ru-RU/presets/", "Предустановки"],
|
}),
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"/vi-VN/": {
|
"/vi-VN/": {
|
||||||
// text for the language dropdown
|
// text for the language dropdown
|
||||||
@ -287,51 +284,43 @@ module.exports = {
|
|||||||
// Custom navbar values
|
// Custom navbar values
|
||||||
nav: [{ text: "Cấu hình", link: "/vi-VN/config/" }],
|
nav: [{ text: "Cấu hình", link: "/vi-VN/config/" }],
|
||||||
// Custom sidebar values
|
// Custom sidebar values
|
||||||
sidebar: [
|
sidebar: sidebar("vi-VN", {
|
||||||
"/vi-VN/",
|
guide: "Hướng dẫn",
|
||||||
["/vi-VN/guide/", "Hướng dẫn"],
|
installing: "Cài đặt nâng cao",
|
||||||
["/vi-VN/config/", "Cấu hình"],
|
faq: "Các hỏi thường gặp",
|
||||||
["/vi-VN/advanced-config/", "Cấu hình nâng cao"],
|
}),
|
||||||
["/vi-VN/faq/", "Các hỏi thường gặp"],
|
},
|
||||||
["/vi-VN/presets/", "Mẫu thiết lập"],
|
"/zh-TW/": {
|
||||||
],
|
// text for the language dropdown
|
||||||
|
selectText: "語言",
|
||||||
|
// label for this locale in the language dropdown
|
||||||
|
label: "繁體中文",
|
||||||
|
// Custom text for edit link. Defaults to "Edit this page"
|
||||||
|
editLinkText: "在 GitHub 上修改此頁面",
|
||||||
|
// Custom navbar values
|
||||||
|
nav: [{ text: "設定", link: "/zh-TW/config/" }],
|
||||||
|
// Custom sidebar values
|
||||||
|
sidebar: sidebar("zh-TW", {
|
||||||
|
guide: "指引",
|
||||||
|
installing: "進階安裝",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
"/zh-CN/": {
|
||||||
|
// text for the language dropdown
|
||||||
|
selectText: "语言",
|
||||||
|
// label for this locale in the language dropdown
|
||||||
|
label: "简体中文",
|
||||||
|
// Custom text for edit link. Defaults to "Edit this page"
|
||||||
|
editLinkText: "在 GitHub 上修改此页",
|
||||||
|
// Custom navbar values
|
||||||
|
nav: [{ text: "配置", link: "/zh-CN/config/" }],
|
||||||
|
// Custom sidebar values
|
||||||
|
sidebar: sidebar("zh-CN", {
|
||||||
|
guide: "指南",
|
||||||
|
installing: "高级安装",
|
||||||
|
presets: "社区配置分享",
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
},
|
|
||||||
"/zh-TW/": {
|
|
||||||
// text for the language dropdown
|
|
||||||
selectText: "語言",
|
|
||||||
// label for this locale in the language dropdown
|
|
||||||
label: "繁體中文",
|
|
||||||
// Custom text for edit link. Defaults to "Edit this page"
|
|
||||||
editLinkText: "在 GitHub 上修改此頁面",
|
|
||||||
// Custom navbar values
|
|
||||||
nav: [{ text: "設定", link: "/zh-TW/config/" }],
|
|
||||||
// Custom sidebar values
|
|
||||||
sidebar: [
|
|
||||||
"/zh-TW/",
|
|
||||||
["/zh-TW/guide/", "指引"],
|
|
||||||
["/zh-TW/config/", "設定"],
|
|
||||||
["/zh-TW/advanced-config/", "進階設定"],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
"/zh-CN/": {
|
|
||||||
// text for the language dropdown
|
|
||||||
selectText: "语言",
|
|
||||||
// label for this locale in the language dropdown
|
|
||||||
label: "简体中文",
|
|
||||||
// Custom text for edit link. Defaults to "Edit this page"
|
|
||||||
editLinkText: "在 GitHub 上修改此页",
|
|
||||||
// Custom navbar values
|
|
||||||
nav: [{ text: "配置", link: "/zh-CN/config/" }],
|
|
||||||
// Custom sidebar values
|
|
||||||
sidebar: [
|
|
||||||
"/zh-CN/",
|
|
||||||
["/zh-CN/guide/", "指南"],
|
|
||||||
["/zh-CN/config/", "配置"],
|
|
||||||
["/zh-CN/advanced-config/", "高级配置"],
|
|
||||||
["/zh-CN/faq/", "常见问题"],
|
|
||||||
["/zh-CN/presets/", "社区配置分享"],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# FAQ
|
# Frequently Asked Questions
|
||||||
|
|
||||||
## What is the configuration used in the demo GIF?
|
## What is the configuration used in the demo GIF?
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# 🚀 Advanced Installation
|
# Advanced Installation
|
||||||
|
|
||||||
To install starship, you need to do two things:
|
To install starship, you need to do two things:
|
||||||
|
|
||||||
|
@ -5,33 +5,33 @@ If you have a preset to share, please [submit a PR](https://github.com/starship/
|
|||||||
|
|
||||||
To get details on how to use a preset, simply click on the image.
|
To get details on how to use a preset, simply click on the image.
|
||||||
|
|
||||||
## [Nerd Font Symbols](./nerd-font)
|
## [Nerd Font Symbols](./nerd-font.md)
|
||||||
|
|
||||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||||
|
|
||||||
[![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font)
|
[![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font)
|
||||||
|
|
||||||
## [Bracketed Segments](./bracketed-segments)
|
## [Bracketed Segments](./bracketed-segments.md)
|
||||||
|
|
||||||
This preset changes the format of all the built-in modules to show their segment
|
This preset changes the format of all the built-in modules to show their segment
|
||||||
in brackets instead of using the default Starship wording ("via", "on", etc.).
|
in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||||
|
|
||||||
[![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments)
|
[![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments)
|
||||||
|
|
||||||
## [Plain Text Symbols](./plain-text)
|
## [Plain Text Symbols](./plain-text.md)
|
||||||
|
|
||||||
This preset changes the symbols for each module into plain text. Great if you
|
This preset changes the symbols for each module into plain text. Great if you
|
||||||
don't have access to Unicode.
|
don't have access to Unicode.
|
||||||
|
|
||||||
[![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png "Click to view Plain Text Symbols preset")](./plain-text)
|
[![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png "Click to view Plain Text Symbols preset")](./plain-text)
|
||||||
|
|
||||||
## [No Runtime Versions](./no-runtimes)
|
## [No Runtime Versions](./no-runtimes.md)
|
||||||
|
|
||||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||||
|
|
||||||
[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes)
|
[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes)
|
||||||
|
|
||||||
## [Pure Prompt](./pure-preset)
|
## [Pure Prompt](./pure-preset.md)
|
||||||
|
|
||||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[Return to Presets](/presets/#bracketed-segments)
|
[Return to Presets](./README.md#bracketed-segments)
|
||||||
|
|
||||||
# Bracketed Segments Preset
|
# Bracketed Segments Preset
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[Return to Presets](/presets/#nerd-font-symbols)
|
[Return to Presets](./README.md#nerd-font-symbols)
|
||||||
|
|
||||||
# Nerd Font Symbols Preset
|
# Nerd Font Symbols Preset
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[Return to Presets](/presets/#no-runtime-versions)
|
[Return to Presets](./README.md#no-runtime-versions)
|
||||||
|
|
||||||
# No Runtime Versions Preset
|
# No Runtime Versions Preset
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[Return to Presets](/presets/#plain-text-symbols)
|
[Return to Presets](./README.md#plain-text-symbols)
|
||||||
|
|
||||||
## Plain Text Symbols Preset
|
## Plain Text Symbols Preset
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[Return to Presets](/presets/#pure)
|
[Return to Presets](./README.md#pure)
|
||||||
|
|
||||||
# Pure Preset
|
# Pure Preset
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user