summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Song <4605384+chipbuster@users.noreply.github.com>2022-01-20 02:32:09 -0600
committerGitHub <noreply@github.com>2022-01-20 11:32:09 +0300
commit0965667807e4af5606a1412c14435482c5b7d2b7 (patch)
tree0785bbc3ae64f3feacdf2dd5ad4dc26da0fd0a1a
parent9a4c1b5cdb5971d6992eecdf4c221dd7d6102322 (diff)
ci: Use `dprint` to format documentation + TOML files (#3426)
Adds Rust-based standardized markdown formatting and a CI step to catch unformatted files.
-rw-r--r--.cargo/audit.toml24
-rw-r--r--.dprint.json43
-rw-r--r--.github/workflows/format-workflow.yml17
-rw-r--r--CODE_OF_CONDUCT.md27
-rw-r--r--CONTRIBUTING.md19
-rw-r--r--Cargo.toml84
-rw-r--r--README.md6
-rw-r--r--clippy.toml8
-rw-r--r--docs/.vuepress/config.js682
-rw-r--r--docs/README.md6
-rw-r--r--docs/advanced-config/README.md38
-rw-r--r--docs/config/README.md761
-rw-r--r--docs/faq/README.md3
-rw-r--r--docs/installing/README.md2
-rw-r--r--docs/migrating-to-0.45.0/README.md2
-rw-r--r--starship_module_config_derive/Cargo.toml14
16 files changed, 903 insertions, 833 deletions
diff --git a/.cargo/audit.toml b/.cargo/audit.toml
index 62d130215..4c8efaa15 100644
--- a/.cargo/audit.toml
+++ b/.cargo/audit.toml
@@ -1,14 +1,14 @@
[advisories]
ignore = [
- # Out-of-bounds write in nix::unistd::getgrouplist
- # Tracked in #3140
- "RUSTSEC-2021-0119",
- # Potential segfault in the time crate
- # chrono dependency, but vulnerable function is never called
- # Tacked in #3163
- "RUSTSEC-2020-0071",
- # chrono: Potential segfault in localtime_r invocations
- # starship avoids setting any environment variables to avoid this issue
- # Tracked in #3166
- "RUSTSEC-2020-0159",
-] \ No newline at end of file
+ # Out-of-bounds write in nix::unistd::getgrouplist
+ # Tracked in #3140
+ "RUSTSEC-2021-0119",
+ # Potential segfault in the time crate
+ # chrono dependency, but vulnerable function is never called
+ # Tacked in #3163
+ "RUSTSEC-2020-0071",
+ # chrono: Potential segfault in localtime_r invocations
+ # starship avoids setting any environment variables to avoid this issue
+ # Tracked in #3166
+ "RUSTSEC-2020-0159",
+]
diff --git a/.dprint.json b/.dprint.json
new file mode 100644
index 000000000..3e2606307
--- /dev/null
+++ b/.dprint.json
@@ -0,0 +1,43 @@
+{
+ "incremental": true,
+ "typescript": {},
+ "json": {},
+ "markdown": {
+ "lineWidth": 100
+ },
+ "toml": {},
+ "includes": [
+ "docs/**/*.{ts,js,cjs,mjs}",
+ "**/*.{md,toml,json}"
+ ],
+ "excludes": [
+ "**/node_modules",
+ "**/*-lock.json",
+ ".github/*",
+ "docs/ar-SA/**",
+ "docs/ckb-IR/**",
+ "docs/de-DE/**",
+ "docs/es-ES/**",
+ "docs/fr-FR/**",
+ "docs/id-ID/**",
+ "docs/it-IT/**",
+ "docs/ja-JP/**",
+ "docs/ko-KR/**",
+ "docs/nl-NL/**",
+ "docs/pl-PL/**",
+ "docs/pt-BR/**",
+ "docs/pt-PT/**",
+ "docs/ru-RU/**",
+ "docs/tr-TR/**",
+ "docs/vi-VN/**",
+ "docs/zh-CN/**",
+ "docs/zh-TW/**",
+ "target/"
+ ],
+ "plugins": [
+ "https://plugins.dprint.dev/typescript-0.62.0.wasm",
+ "https://plugins.dprint.dev/json-0.14.0.wasm",
+ "https://plugins.dprint.dev/markdown-0.12.0.wasm",
+ "https://plugins.dprint.dev/toml-0.5.3.wasm"
+ ]
+}
diff --git a/.github/workflows/format-workflow.yml b/.github/workflows/format-workflow.yml
new file mode 100644
index 000000000..08336e12e
--- /dev/null
+++ b/.github/workflows/format-workflow.yml
@@ -0,0 +1,17 @@
+name: Format + Docs Workflow
+on:
+ push:
+ paths: ["docs/**","**.md","**.toml","**.js","**.json","**.ts"]
+ pull_request:
+ paths: ["docs/**","**.md","**.toml","**.js","**.json","**.ts"]
+
+jobs:
+ # Run the dprint code formatter for documentation
+ dprint:
+ name: Dprint [Docs Formatter]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Setup | Checkout
+ uses: actions/checkout@v2.4.0
+ - name: Docs | Format
+ uses: dprint/check@v2.0 \ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 69646459f..0fc30f1ab 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,4 +1,3 @@
-
# Contributor Covenant Code of Conduct
## Our Pledge
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:
-* Demonstrating empathy and kindness toward other people
-* Being respectful of differing opinions, viewpoints, and experiences
-* Giving and gracefully accepting constructive feedback
-* Accepting responsibility and apologizing to those affected by our mistakes,
+- Demonstrating empathy and kindness toward other people
+- Being respectful of differing opinions, viewpoints, and experiences
+- Giving and gracefully accepting constructive feedback
+- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
-* Focusing on what is best not just for us as individuals, but for the
+- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
-* The use of sexualized language or imagery, and sexual attention or
+- The use of sexualized language or imagery, and sexual attention or
advances of any kind
-* Trolling, insulting or derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or email
+- Trolling, insulting or derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or email
address, without their explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
+- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
@@ -107,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
-standards, including sustained inappropriate behavior, harassment of an
+standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
@@ -119,11 +118,11 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
-Community Impact Guidelines were inspired by
+Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
-[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
+[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1873ccfa2..710342e1a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -95,13 +95,24 @@ cargo clippy --all-targets --all-features
## Formatting
-Starship source files are formatted with [rustfmt](https://crates.io/crates/rustfmt-nightly), using the default configuration. Rustfmt will be ran as part of CI. Unformatted code will fail a build, so it is suggested that you run rustfmt locally:
+Starship source files are formatted with [rustfmt](https://crates.io/crates/rustfmt-nightly). Markdown and TOML files (among others) are formatted with [dprint](https://github.com/dprint/dprint). Unformatted code will fail the CI, so it is suggested that you run these tools locally.
+
+For rustfmt:
```sh
rustup component add rustfmt
cargo fmt
```
+For dprint:
+
+```sh
+cargo install dprint
+dprint fmt
+```
+
+Editor plugins/functionality may help you run these automatically so that you don't accidentally create a PR that fails.
+
## Testing
Testing is critical to making sure starship works as intended on systems big and small. Starship interfaces with many applications and system APIs when generating the prompt, so there's a lot of room for bugs to slip in.
@@ -233,10 +244,10 @@ writing new modules low, starship provides a lot of functionality for a module,
which requires quite a few things be done. These are listed here to help
everyone remember what they are. Don't worry: most of them are quite simple!
-- [ ] Add a section to `docs/config/README.md` describing the module, and
+- [ ] Add a section to `docs/config/README.md` describing the module, and
its configuration options/variables (more documentation is often
appropriate--this is a bare minimum).
-- [ ] Add the variable to the appropriate location in the "Default Prompt
+- [ ] Add the variable to the appropriate location in the "Default Prompt
Format" section of the documentation
- [ ] Add an appropriate choice of options to each preset in `docs/presets/README.md`
- [ ] Create configs structs/traits in `src/configs/<module>.rs` and add the
@@ -250,4 +261,4 @@ everyone remember what they are. Don't worry: most of them are quite simple!
Finally, you should make sure to write your module's code in `src/modules`
and add any commands that need to be mocked when testing in `src/utils.rs`.
-Command output can also be mocked in test by using `ModuleRenderer::cmd`. \ No newline at end of file
+Command output can also be mocked in test by using `ModuleRenderer::cmd`.
diff --git a/Cargo.toml b/Cargo.toml
index 05eb8ab2a..9e9b2b930 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,21 +1,21 @@
[package]
name = "starship"
version = "1.2.1"
-edition = "2021"
authors = ["Starship Contributors"]
-homepage = "https://starship.rs"
+build = "build.rs"
+categories = ["command-line-utilities"]
documentation = "https://starship.rs/guide/"
-repository = "https://github.com/starship/starship"
-readme = "README.md"
-license = "ISC"
+edition = "2021"
+homepage = "https://starship.rs"
+# Keep `/` in front of `README.md` to exclude localized readmes
+include = ["src/**/*", "build.rs", "Cross.toml", "LICENSE", "README.md"]
keywords = ["prompt", "shell", "bash", "fish", "zsh"]
-categories = ["command-line-utilities"]
-build = "build.rs"
+license = "ISC"
+readme = "README.md"
+repository = "https://github.com/starship/starship"
description = """
The minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️
"""
-# Keep `/` in front of `README.md` to exclude localized readmes
-include = ["src/**/*", "build.rs", "Cross.toml", "LICENSE", "README.md"]
[badges]
is-it-maintained-issue-resolution = { repository = "starship/starship" }
@@ -27,61 +27,55 @@ default = ["battery"]
battery = ["starship-battery"]
[dependencies]
+ansi_term = "0.12.1"
+byte-unit = "4.0.13"
+chrono = "0.4.19"
clap = { version = "3.0.10", features = ["derive", "cargo", "unicode"] }
clap_complete = "3.0.4"
-ansi_term = "0.12.1"
directories-next = "2.0.0"
+gethostname = "0.2.2"
git2 = { version = "0.13.25", default-features = false }
-toml = { version = "0.5.8", features = ["preserve_order"] }
-rust-ini = "0.17.0"
-serde_json = "1.0.75"
-rayon = "1.5.1"
+indexmap = { version = "1.8.0", features = ["serde"] }
log = { version = "0.4.14", features = ["std"] }
-# battery is optional (on by default) because the crate doesn't currently build for Termux
-# see: https://github.com/svartalf/rust-battery/issues/33
-starship-battery = { version = "0.7.9", optional = true }
-path-slash = "0.1.4"
-unicode-segmentation = "1.8.0"
-gethostname = "0.2.2"
+notify-rust = { version = "4.5.5", optional = true }
once_cell = "1.9.0"
-chrono = "0.4.19"
-sys-info = "0.9.1"
-byte-unit = "4.0.13"
-starship_module_config_derive = { version = "0.2.1", path = "starship_module_config_derive" }
-yaml-rust = "0.4.5"
+open = "2.0.2"
+os_info = "3.1.0"
+path-slash = "0.1.4"
pest = "2.1.3"
pest_derive = "2.1.0"
-regex = "1.5.4"
-os_info = "3.1.0"
-urlencoding = "2.1.0"
-open = "2.0.2"
-unicode-width = "0.1.9"
-terminal_size = "0.1.17"
quick-xml = "0.22.0"
rand = "0.8.4"
-serde = { version = "1.0.133", features = ["derive"] }
-indexmap = { version ="1.8.0", features = ["serde"] }
-notify-rust = { version = "4.5.5", optional = true }
+rayon = "1.5.1"
+regex = "1.5.4"
+rust-ini = "0.17.0"
semver = "1.0.4"
-which = "4.2.2"
+serde = { version = "1.0.133", features = ["derive"] }
+serde_json = "1.0.75"
+sha-1 = "0.10.0"
shadow-rs = "0.8.1"
-versions = "4.0.0"
+# battery is optional (on by default) because the crate doesn't currently build for Termux
+# see: https://github.com/svartalf/rust-battery/issues/33
+starship-battery = { version = "0.7.9", optional = true }
+starship_module_config_derive = { version = "0.2.1", path = "starship_module_config_derive" }
strsim = "0.10.0"
-sha-1 = "0.10.0"
+sys-info = "0.9.1"
+terminal_size = "0.1.17"
+toml = { version = "0.5.8", features = ["preserve_order"] }
toml_edit = "0.13.0"
+unicode-segmentation = "1.8.0"
+unicode-width = "0.1.9"
+urlencoding = "2.1.0"
+versions = "4.0.0"
+which = "4.2.2"
+yaml-rust = "0.4.5"
process_control = { version = "3.2.1", features = ["crossbeam-channel"] }
shell-words = "1.0.0"
[target.'cfg(windows)'.dependencies]
-winapi = { version = "0.3.9", features = [
- "winuser",
- "securitybaseapi",
- "processthreadsapi",
- "handleapi",
- "impl-default",
-] }
+winapi = { version = "0.3.9", features = ["winuser", "securitybaseapi", "processthreadsapi", "handleapi", "impl-default"] }
[target.'cfg(not(windows))'.dependencies]
nix = "0.23.1"
@@ -90,8 +84,8 @@ nix = "0.23.1"
shadow-rs = "0.8.1"
[dev-dependencies]
-tempfile = "3.2.0"
mockall = "0.11"
+tempfile = "3.2.0"
[profile.release]
codegen-units = 1
diff --git a/README.md b/README.md
index 63f2e15d8..5f8f302d9 100644
--- a/README.md
+++ b/README.md
@@ -328,9 +328,9 @@ Add the following to the end of your Nushell configuration (find it by running `
```toml
startup = [
- "mkdir ~/.cache/starship",
- "starship init nu | save ~/.cache/starship/init.nu",
- "source ~/.cache/starship/init.nu"
+ "mkdir ~/.cache/starship",
+ "starship init nu | save ~/.cache/starship/init.nu",
+ "source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
```
diff --git a/clippy.toml b/clippy.toml
index 26551a251..394d9b4c1 100644
--- a/clippy.toml
+++ b/clippy.toml
@@ -1,6 +1,6 @@
disallowed-methods = [
- # std::process::Command::new may inadvertly run executables from the current working directory
- "std::process::Command::new",
- # Setting environment variables can cause issues with non-rust code
- "std::env::set_var"
+ # std::process::Command::new may inadvertly run executables from the current working directory
+ "std::process::Command::new",
+ # Setting environment variables can cause issues with non-rust code
+ "std::env::set_var",
]
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index cddbd3bd0..0dfc5e9c3 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -1,342 +1,352 @@
module.exports = {
- locales: {
- "/": {
- lang: "en-US",
- title: "Starship",
- description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!"
- },
- "/de-DE/": {
- lang: "de-DE",
- title: "Starship",
- description: "Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!"
- },
- "/es-ES/": {
- lang: "es-ES",
- title: "Starship",
- description: "¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!"
- },
- "/fr-FR/": {
- lang: "fr-FR",
- title: "Starship",
- description: "L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !"
- },
- "/id-ID/": {
- lang: "id-ID",
- title: "Starship",
- description: "Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!"
- },
- "/it-IT/": {
- lang: "it-IT",
- title: "Starship",
- description: "Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!"
- },
- "/ja-JP/": {
- lang: "ja-JP",
- title: "Starship",
- description: "シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!"
- },
- "/pt-BR/": {
- lang: "pt-BR",
- title: "Starship",
- description: "O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!"
- },
- "/ru-RU/": {
- lang: "ru-RU",
- title: "Starship",
- description: "Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!"
- },
- "/vi-VN/": {
- lang: "vi-VN",
- title: "Starship",
- description: "Nhỏ gọn, cực nhanh, và khả năng tuỳ chỉnh vô hạn prompt cho bất kì shell nào!"
- },
- "/zh-CN/": {
- lang: "zh-CN",
- title: "Starship",
- description: "轻量级、反应迅速,可定制的高颜值终端!"
- },
- "/zh-TW/": {
- lang: "zh-TW",
- title: "Starship",
- description: "適合任何 shell 的最小、極速、無限客製化的提示字元!"
- }
- },
- // prettier-ignore
- head: [
- ["link", { rel: "icon", href: "/icon.png" }],
- ["meta", { property: "og:title", content: "Starship: Cross-Shell Prompt" }],
- ["meta", { property: "og:description", content: "Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and Powershell."}],
- ["meta", { property: "og:type", content: "website" }],
- ["meta", { property: "og:url", content: "https://starship.rs/" }],
- ["meta", { property: "og:image", content: "https://starship.rs/icon.png" }],
- ["meta", { name: "twitter:card", content: "summary"}],
- ["meta", { name: "twitter:title", content: "Starship: Cross-Shell Prompt"}],
- ["meta", { name: "twitter:description", content: "Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and Powershell."}],
- ["meta", { name: "twitter:image", content: "https://starship.rs/icon.png"}],
- ["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt"}],
- ],
- theme: "default-prefers-color-scheme",
- themeConfig: {
- logo: "/icon.png",
- // the GitHub repo path
- repo: "starship/starship",
- // the label linking to the repo
- repoLabel: "GitHub",
- // if your docs are not at the root of the repo:
- docsDir: "docs",
- // defaults to false, set to true to enable
- editLinks: true,
- // enables Algolia DocSearch
- algolia: {
- apiKey: "44118471f56286dcda7db941a043370d",
- indexName: "starship",
- appId: "M3XUO3SQOR"
- },
locales: {
- "/": {
- // text for the language dropdown
- selectText: "Languages",
- // label for this locale in the language dropdown
- label: "English",
- // Custom text for edit link. Defaults to "Edit this page"
- editLinkText: "Edit this page on GitHub",
- // Custom navbar values
- nav: [{ text: "Configuration", link: "/config/" }],
- // Custom sidebar values
- sidebar: [
- "/",
- ["/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/": {
- // text for the language dropdown
- selectText: "Sprachen",
- // label for this locale in the language dropdown
- label: "Deutsch",
- // Custom text for edit link. Defaults to "Edit this page"
- editLinkText: "Bearbeite diese Seite auf GitHub",
- // Custom navbar values
- nav: [{ text: "Konfiguration", link: "/config/" }],
- // Custom sidebar values
- sidebar: [
- "/de-DE/",
- ["/de-DE/guide/", "Anleitung"],
- ["/de-DE/config/", "Konfiguration"],
- ["/de-DE/advanced-config/", "Erweiterte Konfiguration"],
- ["/de-DE/faq/", "Häufig gestellte Fragen"],
- ["/de-DE/presets/", "Konfigurations-Beispiele"]
- ]
- },
- "/es-ES/": {
- // text for the language dropdown
- selectText: "Idiomas",
- // label for this locale in the language dropdown
- label: "Español",
- // Custom text for edit link. Defaults to "Edit this page"
- editLinkText: "Edita esta página en GitHub",
- // Custom navbar values
- nav: [{ text: "Configuración", link: "/es-ES/config/" }],
- // Custom sidebar values
- sidebar: [
- "/es-ES/",
- ["/es-ES/guide/", "Guía"],
- ["/es-ES/config/", "Configuración"],
- ["/es-ES/advanced-config/", "Configuración Avanzada"],
- ["/es-ES/faq/", "Preguntas frecuentes"],
- ["/es-ES/presets/", "Ajustes predeterminados"]
- ]
- },
- "/fr-FR/": {
- // text for the language dropdown
- selectText: "Langues",
- // label for this locale in the language dropdown
- label: "Français",
- // Custom text for edit link. Defaults to "Edit this page"
- editLinkText: "Éditez cette page sur GitHub",
- // Custom navbar values
- nav: [{ text: "Configuration", link: "/fr-FR/config/" }],
- // Custom sidebar values
- sidebar: [
- "/fr-FR/",
- ["/fr-FR/guide/", "Guide"],
- ["/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/": {
- // text for the language dropdown
- selectText: "Languages",
- // label for this locale in the language dropdown
- label: "Bahasa Indonesia",
- // Custom text for edit link. Defaults to "Edit this page"
- editLinkText: "Sunting halaman ini di Github",
- // Custom navbar values
- nav: [{ text: "Konfigurasi", link: "/id-ID/config/" }],
- // Custom sidebar values
- sidebar: [
- "/id-ID/",
- ["/id-ID/guide/", "Petunjuk"],
- ["/id-ID/config/", "Konfigurasi"],
- ["/id-ID/advanced-config/", "Konfigurasi Lanjutan"],
- ["/id-ID/faq/", "Pertanyaan Umum"],
- ["/id-ID/presets/", "Prasetel"]
- ]
- },
- "/it-IT/": {
- // text for the language dropdown
- selectText: "Languages",
- // label for this locale in the language dropdown
- label: "Italiano",
- // Custom text for edit link. Defaults to "Edit this page"
- editLinkText: "Modifica questa pagina in Github",
- // Custom navbar values
- nav: [{ text: "Configuration", link: "/it-IT/config/" }],
- // Custom sidebar values
- sidebar: [
- "/it-IT/",
- ["/it-IT/guide/", "Guide"],
- ["/it-IT/config/", "Configurazione"],
- ["/it-IT/advanced-config/", "Configurazione Avanzata"],
- ["/it-IT/faq/", "FAQ"],
- ["/it-IT/presets/", "Preset"]
- ]
- },
- "/ja-JP/": {
- // 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: "/ja-JP/config/" }],
- // Custom sidebar values
- sidebar: [
- "/ja-JP/",
- ["/ja-JP/guide/", "ガイド"],
- ["/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/": {
- // text for the language dropdown
- selectText: "Languages",
- // label for this locale in the language dropdown
- label: "Português do Brasil",
- // Custom text for edit link. Defaults to "Edit this page"
- editLinkText: "Edite esta página no Github",
- // Custom navbar values
- nav: [{ text: "Configuração", link: "/pt-BR/config/" }],
- // Custom sidebar values
- sidebar: [
- "/pt-BR/",
- ["/pt-BR/guide/", "Guia"],
- ["/pt-BR/config/", "Configuração"],
- ["/pt-BR/advanced-config/", "Configuração avançada"],
- ["/pt-BR/faq/", "Perguntas frequentes"],
- ["/pt-BR/presets/", "Predefinições"]
- ]
- },
- "/ru-RU/": {
- // 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: "/ru-RU/config/" }],
- // Custom sidebar values
- sidebar: [
- "/ru-RU/",
- ["/ru-RU/guide/", "Руководство"],
- ["/ru-RU/config/", "Настройка"],
- ["/ru-RU/advanced-config/", "Расширенная Настройка"],
- ["/ru-RU/faq/", "Часто Задаваемые Вопросы"],
- ["/ru-RU/presets/", "Предустановки"]
- ]
- },
- "/vi-VN/": {
- // text for the language dropdown
- selectText: "Ngôn ngữ",
- // label for this locale in the language dropdown
- label: "Tiếng Việt",
- // Custom text for edit link. Defaults to "Edit this page"
- editLinkText: "Chỉnh sửa trang này trên GitHub",
- // Custom navbar values
- nav: [{ text: "Cấu hình", link: "/vi-VN/config/" }],
- // Custom sidebar values
- sidebar: [
- "/vi-VN/",
- ["/vi-VN/guide/", "Hướng dẫn"],
- ["/vi-VN/config/", "Cấu hình"],
- ["/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: [
- "/zh-TW/",
- ["/zh-TW/guide/", "指引"],
- ["/zh-TW/config/", "設定"],
- ["/zh-TW/advanced-config/", "進階設定"]
- ]
+ "/": {
+ lang: "en-US",
+ title: "Starship",
+ description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!",
+ },
+ "/de-DE/": {
+ lang: "de-DE",
+ title: "Starship",
+ description: "Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!",
+ },
+ "/es-ES/": {
+ lang: "es-ES",
+ title: "Starship",
+ description:
+ "¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!",
+ },
+ "/fr-FR/": {
+ lang: "fr-FR",
+ title: "Starship",
+ description: "L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !",
+ },
+ "/id-ID/": {
+ lang: "id-ID",
+ title: "Starship",
+ description: "Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!",
+ },
+ "/it-IT/": {
+ lang: "it-IT",
+ title: "Starship",
+ description: "Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!",
+ },
+ "/ja-JP/": {
+ lang: "ja-JP",
+ title: "Starship",
+ description: "シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!",
+ },
+ "/pt-BR/": {
+ lang: "pt-BR",
+ title: "Starship",
+ description:
+ "O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!",
+ },
+ "/ru-RU/": {
+ lang: "ru-RU",
+ title: "Starship",
+ description: "Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!",
+ },
+ "/vi-VN/": {
+ lang: "vi-VN",
+ title: "Starship",
+ description: "Nhỏ gọn, cực nhanh, và khả năng tuỳ chỉnh vô hạn prompt cho bất kì shell nào!",
+ },
+ "/zh-CN/": {
+ lang: "zh-CN",
+ title: "Starship",
+ description: "轻量级、反应迅速,可定制的高颜值终端!",
+ },
+ "/zh-TW/": {
+ lang: "zh-TW",
+ title: "Starship",
+ description: "適合任何 shell 的最小、極速、無限客製化的提示字元!",
+ },
},
- "/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: [
- [
- "@vuepress/google-analytics",
- {
- ga: "UA-71160903-4"
- }
+ // prettier-ignore
+ head: [
+ ["link", { rel: "icon", href: "/icon.png" }],
+ ["meta", { property: "og:title", content: "Starship: Cross-Shell Prompt" }],
+ ["meta", {
+ property: "og:description",
+ content:
+ "Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and Powershell.",
+ }],
+ ["meta", { property: "og:type", content: "website" }],
+ ["meta", { property: "og:url", content: "https://starship.rs/" }],
+ ["meta", { property: "og:image", content: "https://starship.rs/icon.png" }],
+ ["meta", { name: "twitter:card", content: "summary" }],
+ ["meta", { name: "twitter:title", content: "Starship: Cross-Shell Prompt" }],
+ ["meta", {
+ name: "twitter:description",
+ content:
+ "Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and Powershell.",
+ }],
+ ["meta", { name: "twitter:image", content: "https://starship.rs/icon.png" }],
+ ["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt" }],
],
- [
- "sitemap",
- {
- hostname: "https://starship.rs"
- }
+ theme: "default-prefers-color-scheme",
+ themeConfig: {
+ logo: "/icon.png",
+ // the GitHub repo path
+ repo: "starship/starship",
+ // the label linking to the repo
+ repoLabel: "GitHub",
+ // if your docs are not at the root of the repo:
+ docsDir: "docs",
+ // defaults to false, set to true to enable
+ editLinks: true,
+ // enables Algolia DocSearch
+ algolia: {
+ apiKey: "44118471f56286dcda7db941a043370d",
+ indexName: "starship",
+ appId: "M3XUO3SQOR",
+ },
+ locales: {
+ "/": {
+ // text for the language dropdown
+ selectText: "Languages",
+ // label for this locale in the language dropdown
+ label: "English",
+ // Custom text for edit link. Defaults to "Edit this page"
+ editLinkText: "Edit this page on GitHub",
+ // Custom navbar values
+ nav: [{ text: "Configuration", link: "/config/" }],
+ // Custom sidebar values
+ sidebar: [
+ "/",
+ ["/guide/", "Guide"],
+ ["/installing/", "Advanced Installation"],
+ ["/config/", "Configuration"],
+ ["/advanced-config/", "Advanced Configuration"],
+