docs: add all supported config formats

This commit is contained in:
Jan De Dobbeleer 2023-03-31 20:55:36 +02:00 committed by Jan De Dobbeleer
parent ea19410f23
commit 4ff2dd233e
82 changed files with 448 additions and 559 deletions

View file

@ -4,6 +4,6 @@ title: Segment Authentication
sidebar_label: Authentication
---
import CodeBlock from '../src/components/Auth.js';
import CodeBlock from '@site/src/components/Auth.js';
<CodeBlock/>

View file

@ -4,66 +4,21 @@ title: Block
sidebar_label: Block
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
Let's take a closer look at what defines a block.
<Tabs
defaultValue="json"
groupId="sample"
values={[
{ label: 'json', value: 'json', },
{ label: 'yaml', value: 'yaml', },
{ label: 'toml', value: 'toml', },
]
}>
<TabItem value="json">
import Config from '@site/src/components/Config.js';
```json
{
<Config data={{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
...
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
...
]
}
]
}
```
</TabItem>
<TabItem value="yaml">
```yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
---
blocks:
- type: prompt
alignment: left
segments: [...]
```
</TabItem>
<TabItem value="toml">
```toml
"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json"
[[blocks]]
type = "prompt"
alignment = "left"
segments = [
...
]
```
</TabItem>
</Tabs>
}}/>
## Properties

View file

@ -4,22 +4,9 @@ title: Sample
sidebar_label: Sample
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem"
import Config from '@site/src/components/Config.js';
<Tabs
defaultValue="json"
groupId="sample"
values={[
{ label: 'json', value: 'json', },
{ label: 'yaml', value: 'yaml', },
{ label: 'toml', value: 'toml', },
]
}>
<TabItem value="json">
```json
{
<Config data={{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
@ -104,152 +91,5 @@ import TabItem from "@theme/TabItem"
],
"final_space": true,
"version": 2
}
```
</TabItem>
<TabItem value="yaml">
```yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
blocks:
- type: rprompt
segments:
- foreground: "#007ACC"
template: " {{ .CurrentDate | date .Format }} "
properties:
time_format: '15:04:05'
style: plain
type: time
- alignment: left
newline: true
segments:
- background: "#ffb300"
foreground: "#ffffff"
leading_diamond: "\ue0b6"
template: " {{ .UserName }} "
style: diamond
trailing_diamond: "\ue0b0"
type: session
- background: "#61AFEF"
foreground: "#ffffff"
powerline_symbol: "\ue0b0"
template: " {{ .Path }} "
properties:
exclude_folders:
- "/super/secret/project"
style: folder
style: powerline
type: path
- background: "#2e9599"
background_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}#f36943{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#a8216b{{ end }}"
- "{{ if gt .Ahead 0 }}#35b5ff{{ end }}"
- "{{ if gt .Behind 0 }}#f89cfa{{ end }}"
foreground: "#193549"
foreground_templates:
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}"
powerline_symbol: "\ue0b0"
template: " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} "
properties:
branch_max_length: 25
fetch_status: true
style: powerline
type: git
- background: "#00897b"
background_templates:
- "{{ if gt .Code 0 }}#e91e63{{ end }}"
foreground: "#ffffff"
template: "<parentBackground>\ue0b0</> \ue23a "
properties:
always_enabled: true
style: diamond
trailing_diamond: "\ue0b4"
type: exit
type: prompt
final_space: true
version: 2
```
</TabItem>
<TabItem value="toml">
```toml
"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json"
final_space = true
version = 2
[[blocks]]
type = "rprompt"
[[blocks.segments]]
foreground = "#007ACC"
template = " {{ .CurrentDate | date .Format }} "
style = "plain"
type = "time"
[blocks.segments.properties]
time_format = "15:04:05"
[[blocks]]
alignment = "left"
newline = true
type = "prompt"
[[blocks.segments]]
background = "#ffb300"
foreground = "#ffffff"
leading_diamond = "\ue0b6"
template = " {{ .UserName }} "
style = "diamond"
trailing_diamond = "\ue0b0"
type = "session"
[[blocks.segments]]
background = "#61AFEF"
foreground = "#ffffff"
powerline_symbol = "\ue0b0"
template = " {{ .Path }} "
style = "powerline"
type = "path"
[blocks.segments.properties]
exclude_folders = [ "/super/secret/project" ]
style = "folder"
[[blocks.segments]]
background = "#2e9599"
background_templates = [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#f36943{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#a8216b{{ end }}",
"{{ if gt .Ahead 0 }}#35b5ff{{ end }}",
"{{ if gt .Behind 0 }}#f89cfa{{ end }}"
]
foreground = "#193549"
foreground_templates = [ "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ffffff{{ end }}" ]
powerline_symbol = "\ue0b0"
template = " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }} "
style = "powerline"
type = "git"
[blocks.segments.properties]
branch_max_length = 25
fetch_status = true
[[blocks.segments]]
background = "#00897b"
background_templates = [ "{{ if gt .Code 0 }}#e91e63{{ end }}" ]
foreground = "#ffffff"
template = "<parentBackground>\ue0b0</> \ue23a "
style = "diamond"
trailing_diamond = "\ue0b4"
type = "exit"
[blocks.segments.properties]
always_enabled = true
```
</TabItem>
</Tabs>
}}/>

View file

@ -4,9 +4,6 @@ title: Tooltips
sidebar_label: Tooltips
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
Due to limitations (or not having found a way just yet), this feature only works in `fish`, `zsh`, `powershell`
(`ConstrainedLanguage` mode unsupported) and `cmd` (as of [Clink][clink] v1.2.46+) for the time being.
@ -24,12 +21,10 @@ the segment should be rendered.
You need to extend or create a custom theme with your tooltips. For example:
```json
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
...
],
import Config from '@site/src/components/Config.js';
<Config data={{
"blocks": [],
"tooltips": [
{
"type": "git",
@ -46,8 +41,7 @@ You need to extend or create a custom theme with your tooltips. For example:
}
}
]
}
```
}}/>
This configuration will render a right-aligned git segment when you type `git` or `g` followed by a space.
A tip should not include any leading or trailing space but an interpolated one can be used, e.g., `g s`.

View file

@ -101,8 +101,9 @@ Display something new.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "new",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -111,8 +112,7 @@ Display something new.
"properties": {
"newprop": "\uEFF1"
}
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active [Angular CLI][angular-cli-docs] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "angular",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#1976d2",
"template": " \uE753 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active AWS profile and region.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "aws",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#FFA400",
"template": " \uE7AD {{.Profile}}{{if .Region}}@{{.Region}}{{end}}"
}
```
}}/>
## Properties

View file

@ -16,16 +16,16 @@ initializing Oh My Posh.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "az",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#9ec3f0",
"template": " \uFD03 {{ .EnvironmentName }}"
}
```
}}/>
## Properties

View file

@ -10,8 +10,9 @@ Display the currently active [Azure Functions CLI][az-func-core-tools] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "azfunc",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -22,8 +23,7 @@ Display the currently active [Azure Functions CLI][az-func-core-tools] version.
"fetch_version": true,
"display_mode": "files"
}
}
```
}}/>
## Properties

View file

@ -14,8 +14,9 @@ Battery displays the remaining power percentage for your battery.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "battery",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -32,8 +33,7 @@ Battery displays the remaining power percentage for your battery.
"charging_icon": "\uE234 ",
"charged_icon": "\uE22F "
}
}
```
}}/>
## Properties

View file

@ -19,10 +19,13 @@ This example uses the default segment template to show a rendition of detail app
Additionally, the background of the segment will turn red if the latest reading is over 4 hours old - possibly helping indicate
an issue if, for example there is a Tilt or similar device that is supposed to be logging to Brewfather every 15 minutes.
NOTE: Temperature units are in degrees C and specific gravity is expressed as `X.XXX` values.
:::info
Temperature units are in degrees C and specific gravity is expressed as `X.XXX` values.
:::
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type":"brewfather",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -36,8 +39,7 @@ NOTE: Temperature units are in degrees C and specific gravity is expressed as `X
"api_key":"qrstuvw78910",
"batch_id":"hijklmno098765",
}
},
```
}}/>
## Properties

View file

@ -10,14 +10,14 @@ Display the currently active [Buf CLI][buf-docs] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "buf",
"style": "plain",
"foreground": "#1000D6",
"template": " 🐃 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the active [CDS CLI][sap-cap-cds] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"background": "#a7cae1",
"foreground": "#100e23",
"powerline_symbol": "\ue0b0",
"template": " \ue311 cds {{ .Full }} ",
"style": "powerline",
"type": "cds"
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the active [Cloud Foundry CLI][cloud-foundry] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"background": "#a7cae1",
"foreground": "#100e23",
"powerline_symbol": "\ue0b0",
"template": " \uf40a cf {{ .Full }} ",
"style": "powerline",
"type": "cf"
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the details of the logged [Cloud Foundry endpoint][cf-target] (`cf targe
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"background": "#a7cae1",
"foreground": "#100e23",
"powerline_symbol": "\ue0b0",
"template": " \uf40a {{ .Org }}/{{ .Space }} ",
"style": "powerline",
"type": "cftarget"
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active [Cmake][cmake-github] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "cmake",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#E8EAEE",
"background": "#1E9748",
"template": " \ue61e \ue61d cmake {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -22,8 +22,9 @@ error). The `&&` functionality will join the output of the commands when success
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "prompt",
"alignment": "right",
"segments": [
@ -37,8 +38,7 @@ error). The `&&` functionality will join the output of the commands when success
}
}
]
}
```
}}/>
## Properties

View file

@ -14,15 +14,15 @@ Currently only supports Windows. Pull requests for Darwin and Linux support are
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "connection",
"style": "powerline",
"background": "#8822ee",
"foreground": "#222222",
"powerline_symbol": "\uE0B0"
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active crystal version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "crystal",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#4063D8",
"template": " \uE370 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active dart version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "dart",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#06A4CE",
"template": " \uE798 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,14 +10,14 @@ Display the currently active [Deno CLI][deno-docs] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "deno",
"style": "plain",
"foreground": "#3C82F6",
"template": " \ufbe4 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the current Docker context. Will not be active when using the default co
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "docker",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#0B59E7",
"template": " \uf308 {{ .Context }} "
}
```
}}/>
## Template ([info][templates])

View file

@ -10,16 +10,16 @@ Display the currently active [.NET SDK][net-sdk-docs] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "dotnet",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#00ffff",
"template": " \uE77F {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active elixir version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "elixir",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#422251",
"template": " \ue62d {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -14,8 +14,9 @@ The installation guide shows how to include this argument for PowerShell and Zsh
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "executiontime",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -26,8 +27,7 @@ The installation guide shows how to include this argument for PowerShell and Zsh
"threshold": 500,
"style": "austin"
}
}
```
}}/>
## Properties

View file

@ -10,8 +10,9 @@ Displays the last exit code or that the last command failed based on the configu
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "exit",
"style": "diamond",
"foreground": "#ffffff",
@ -22,8 +23,7 @@ Displays the last exit code or that the last command failed based on the configu
"properties": {
"always_enabled": true
}
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active flutter version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "flutter",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#06A4CE",
"template": " \ue28e {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,15 +10,15 @@ Display [fossil][fossil] information when in a fossil repository.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "fossil",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#193549",
"background": "#ffeb3b"
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active GCP project, region and account
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "gcp",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#47888d",
"template": " \uE7B2 {{.Project}} :: {{.Account}} "
}
```
}}/>
## Template ([info][templates])

View file

@ -35,8 +35,9 @@ You can then use the `POSH_GIT_STRING` environment variable in a [text segment][
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "git",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -57,8 +58,7 @@ You can then use the `POSH_GIT_STRING` environment variable in a [text segment][
"/Users/user/Projects/oh-my-posh/": "no"
}
}
}
```
}}/>
## Properties

View file

@ -16,16 +16,16 @@ the value for 30 minutes by default.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "gitversion",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#3a579b",
"template": " \uF1D2 {{ .MajorMinorPatch }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active golang version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "go",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#7FD5EA",
"template": " \u202D\uFCD1 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active Glasgow Haskell Compiler (GHC) version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "haskell",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#906cff",
"background": "#100e23",
"template": " \ue61f {{ .Full }}"
}
```
}}/>
## Properties

View file

@ -10,8 +10,9 @@ sidebar_label: Ipify
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "ipify",
"style": "diamond",
"foreground": "#ffffff",
@ -23,8 +24,7 @@ sidebar_label: Ipify
"cache_timeout": 5,
"http_timeout": 1000
}
}
```
}}/>
## Properties

View file

@ -29,15 +29,15 @@ You do not need to add this segment.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "iterm",
"interactive": true,
"style": "plain",
"foreground": "#80ffea",
"template": "{{ .PromptMark }}"
}
```
}}/>
## Template ([info][templates])

View file

@ -10,16 +10,16 @@ Display the currently active java version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "java",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#4063D8",
"template": " \uE738 {{ .Full }}"
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active julia version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "julia",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#4063D8",
"template": " \uE624 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active [Kotlin][kotlin] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "kotlin",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#906cff",
"template": " \ufa05 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active Kubernetes context name and namespace name.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "kubectl",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#ebcc34",
"template": " \uFD31 {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active [Lua][lua] or [LuaJIT][luajit] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "lua",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "white",
"background": "blue",
"template": " \ue620 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -11,8 +11,9 @@ make sure your `hg` executable is up-to-date (when branch or status information
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "mercurial",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -21,8 +22,7 @@ make sure your `hg` executable is up-to-date (when branch or status information
"properties": {
"newprop": "\uEFF1"
}
}
```
}}/>
## Properties

View file

@ -14,16 +14,16 @@ The Nerdbank.GitVersioning CLI can be a bit slow causing the prompt to feel slow
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "nbgv",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#3a579a",
"template": " \uF1D2 {{ .Version }} "
}
```
}}/>
## Template ([info][templates])

View file

@ -23,8 +23,9 @@ white text on a yellow background, for example.
The `foreground_templates` example below could be set to just a single color,
if that color is visible against any of your backgrounds.
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "nightscout",
"style": "diamond",
"foreground": "#ffffff",
@ -39,7 +40,6 @@ if that color is visible against any of your backgrounds.
"{{ if lt .Sgv 60 }}#000000{{ end }}",
"#000000"
],
"leading_diamond": "\ue0b6",
"trailing_diamond": "\uE0B0",
"template": "\ue2a1 {{ .Sgv }}{{ .TrendIcon }}",
@ -47,8 +47,7 @@ if that color is visible against any of your backgrounds.
"url": "https://YOURNIGHTSCOUTAPP.herokuapp.com/api/v1/entries.json?count=1&token=APITOKENFROMYOURADMIN",
"http_timeout": 1500
}
}
```
}}/>
Or display in mmol/l (instead of the default mg/dl) with the following template:

View file

@ -10,16 +10,16 @@ Display the currently active [Node.js][node-js] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "node",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#6CA35E",
"template": " \uE718 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active [npm][npm-docs] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "npm",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#193549",
"background": "#ffeb3b",
"template": "\ue71e {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active [Nx][nx-docs] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "nx",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#1976d2",
"template": " \uE753 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,8 +10,9 @@ Display OS specific info - defaults to Icon.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "os",
"style": "plain",
"foreground": "#26C6DA",
@ -20,8 +21,7 @@ Display OS specific info - defaults to Icon.
"properties": {
"macos": "mac"
}
}
```
}}/>
## Properties

View file

@ -15,8 +15,9 @@ The free tier for _Current weather and forecasts collection_ is sufficient.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "owm",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -30,8 +31,7 @@ The free tier for _Current weather and forecasts collection_ is sufficient.
"http_timeout": 20,
"cache_timeout": 10
}
}
```
}}/>
## Properties

View file

@ -10,8 +10,9 @@ Display the current path.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "path",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -23,8 +24,7 @@ Display the current path.
"C:\\temp": "\ue799"
}
}
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active perl version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "perl",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#4063D8",
"template": " \ue769 {{ .Full }}"
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active php version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "php",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#4063D8",
"template": " \ue73d {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -12,8 +12,9 @@ For maximum compatibility, make sure your `cm` executable is up-to-date
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "plastic",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -31,8 +32,7 @@ For maximum compatibility, make sure your `cm` executable is up-to-date
"branch_max_length": 25,
"truncate_symbol": "\u2026"
}
}
```
}}/>
## Plastic SCM Icon

View file

@ -18,24 +18,24 @@ Supports:
- .NET project (`*.csproj`, `*.vbproj` or `*.fsproj`, first file match info is displayed)
- Julia project (`JuliaProject.toml`, `Project.toml`)
## Properties
| Name | Type | Description |
| ---------------- | --------- | --------------------------------------------- |
| `always_enabled` | `boolean` | always show the segment - defaults to `false` |
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "project",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#193549",
"background": "#ffeb3b",
"template": " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Version }}\uf487 {{.Version}}{{ end }} {{ if .Name }}{{ .Name }}{{ end }}{{ end }} "
}
```
}}/>
## Properties
| Name | Type | Description |
| ---------------- | --------- | --------------------------------------------- |
| `always_enabled` | `boolean` | always show the segment - defaults to `false` |
## Template ([info][templates])

View file

@ -11,16 +11,16 @@ Supports conda, virtualenv and pyenv (if python points to pyenv shim).
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "python",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#100e23",
"background": "#906cff",
"template": " \uE235 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active [R][r-homepage] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "r",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "blue",
"background": "lightWhite",
"template": " R {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Show when the current user is root or when in an elevated shell (Windows).
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "root",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#111111",
"background": "#ffff66",
"template": "\uF0E7"
}
```
}}/>
## Template ([info][templates])

View file

@ -10,16 +10,16 @@ Display the currently active ruby version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "ruby",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#4063D8",
"template": " \uE791 {{ .Full }}"
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active rust version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "rust",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#193549",
"background": "#99908a",
"template": " \uE7a8 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,8 +10,9 @@ Display [sapling][sapling] information when in a sapling repository.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "sapling",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -21,8 +22,7 @@ Display [sapling][sapling] information when in a sapling repository.
"properties": {
"fetch_status": true
}
}
```
}}/>
## Properties

View file

@ -10,8 +10,9 @@ Show the current user and host name.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "session",
"style": "diamond",
"foreground": "#ffffff",
@ -19,8 +20,7 @@ Show the current user and host name.
"leading_diamond": "\uE0B6",
"trailing_diamond": "\uE0B0",
"template": "{{ if .SSHSession }}\uF817 {{ end }}{{ .UserName }}"
}
```
}}/>
## Template ([info][templates])

View file

@ -10,8 +10,9 @@ Show the current shell name (zsh, PowerShell, bash, ...).
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "shell",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -22,8 +23,7 @@ Show the current shell name (zsh, PowerShell, bash, ...).
"pwsh": "PS"
}
}
}
```
}}/>
## Properties

View file

@ -19,8 +19,9 @@ fetching information from the native Spotify application and Edge PWA.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "spotify",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -31,8 +32,7 @@ fetching information from the native Spotify application and Edge PWA.
"paused_icon": "\uF8E3 ",
"stopped_icon": "\uF04D "
}
}
```
}}/>
## Properties

View file

@ -4,8 +4,6 @@ title: Strava
sidebar_label: Strava
---
import StravaConnect from "/img/strava_connect.svg";
## What
[Strava][strava] is a popular activity tracker for bike, run or any other training.
@ -30,8 +28,9 @@ This configuration sets the background green if you have an activity the last tw
orange if you have one last 5 days, and red otherwise. The `foreground_templates` example below could be set to just a single color,
if that color is visible against any of your backgrounds.
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "strava",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -53,8 +52,7 @@ if that color is visible against any of your backgrounds.
"refresh_token": "1111111111111111",
"http_timeout": 1500
}
}
```
}}/>
## Properties

View file

@ -11,8 +11,9 @@ make sure your `svn` executable is up-to-date (when branch or status information
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "svn",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -21,8 +22,7 @@ make sure your `svn` executable is up-to-date (when branch or status information
"properties": {
"fetch_status": true
}
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active [Swift][swift] version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "swift",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#f6553c",
"template": " \ue755 {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -10,8 +10,9 @@ Display SysInfo.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type":"sysinfo",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
@ -21,8 +22,7 @@ Display SysInfo.
"precision": 2
},
"style":"powerline"
},
```
}}/>
## Properties

View file

@ -14,16 +14,16 @@ This requires a terraform binary in your PATH and will only show in directories
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "terraform",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#000000",
"background": "#ebcc34",
"template": "{{.WorkspaceName}}"
}
```
}}/>
## Properties

View file

@ -10,14 +10,14 @@ Display text.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "text",
"style": "plain",
"foreground": "#E06C75",
"template": "\u276F"
}
```
}}/>
## Template ([info][templates])

View file

@ -10,16 +10,16 @@ Show the current timestamp.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "time",
"style": "plain",
"foreground": "#007ACC",
"properties": {
"time_format": "15:04:05"
}
}
```
}}/>
## Properties

View file

@ -11,16 +11,16 @@ see [the documentation][ui5-version-help]).
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"background": "#f5a834",
"foreground": "#100e23",
"powerline_symbol": "\ue0b0",
"template": " \ufab6ui5 {{ .Full }} ",
"style": "powerline",
"type": "ui5tooling"
}
```
}}/>
## Properties

View file

@ -21,8 +21,9 @@ This segment always chooses the higher version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "unity",
"style": "powerline",
"powerline_symbol": "\ue0b0",
@ -31,8 +32,7 @@ This segment always chooses the higher version.
"properties": {
"http_timeout": 2000
}
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active vala version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "vala",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#5E20A4",
"template": " \ue69e {{ .Full }} "
}
```
}}/>
## Properties

View file

@ -9,28 +9,26 @@ sidebar_label: Wakatime
Shows the tracked time on [wakatime][wt] of the current day
:::caution
You **must** request an API key at the [wakatime][wt] website.
The free tier for is sufficient. You'll find the API key in your profile settings page.
:::
## Sample Configuration
```json
{
"type": "wakatime",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#007acc",
"properties": {
"url": "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key=API_KEY",
"cache_timeout": 10,
"http_timeout": 500
}
},
```
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "wakatime",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#007acc",
"properties": {
"url": "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key=API_KEY",
"cache_timeout": 10,
"http_timeout": 500
}
}}/>
## Properties

View file

@ -18,20 +18,20 @@ Supported registry key types:
## Sample Configuration
```json
{
"type": "winreg",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#444444",
"template":" \uE62A {{ .Value }}",
"properties": {
"path": "HKLM\\software\\microsoft\\windows nt\\currentversion\\buildlab",
"fallback":"unknown"
}
},
```
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "winreg",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#444444",
"template":" \uE62A {{ .Value }}",
"properties": {
"path": "HKLM\\software\\microsoft\\windows nt\\currentversion\\buildlab",
"fallback":"unknown"
}
}}/>
## Properties

View file

@ -26,8 +26,9 @@ Click the following link to connect with Withings:
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "withings",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -39,8 +40,7 @@ Click the following link to connect with Withings:
"refresh_token": "1111111111111111",
"http_timeout": 1500
}
}
```
}}/>
## Properties

View file

@ -10,16 +10,16 @@ Display the currently active xmake version.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "xmake",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#e0f2f1",
"background": "#22a079",
"template": " xmake v{{ .Full }} "
},
```
}}/>
## Properties

View file

@ -15,8 +15,9 @@ Remote Control password.
## Sample Configuration
```json
{
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "ytm",
"style": "powerline",
"powerline_symbol": "\uE0B0",
@ -27,8 +28,7 @@ Remote Control password.
"paused_icon": "\uF8E3 ",
"stopped_icon": "\uF04D "
}
}
```
}}/>
## Properties

View file

@ -11,10 +11,12 @@
"@docusaurus/core": "^2.3.1",
"@docusaurus/preset-classic": "^2.3.1",
"@docusaurus/theme-search-algolia": "^2.3.1",
"@iarna/toml": "^2.2.5",
"classnames": "^2.3.2",
"query-string": "7.1.1",
"react": "17.0.2",
"react-dom": "17.0.2"
"react-dom": "17.0.2",
"yaml": "^2.2.1"
},
"devDependencies": {
"cross-env": "^7.0.3",
@ -2585,6 +2587,11 @@
"@hapi/hoek": "^9.0.0"
}
},
"node_modules/@iarna/toml": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="
},
"node_modules/@jest/schemas": {
"version": "29.0.0",
"resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz",
@ -5089,6 +5096,14 @@
"node": ">=10"
}
},
"node_modules/cosmiconfig/node_modules/yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"engines": {
"node": ">= 6"
}
},
"node_modules/create-ecdh": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
@ -5470,6 +5485,14 @@
"postcss": "^8.2.15"
}
},
"node_modules/cssnano/node_modules/yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"engines": {
"node": ">= 6"
}
},
"node_modules/csso": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
@ -6592,6 +6615,14 @@
"node": ">=6"
}
},
"node_modules/fork-ts-checker-webpack-plugin/node_modules/yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"engines": {
"node": ">= 6"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@ -13333,11 +13364,11 @@
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.1.tgz",
"integrity": "sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==",
"engines": {
"node": ">= 6"
"node": ">= 14"
}
},
"node_modules/yocto-queue": {
@ -15178,6 +15209,11 @@
"@hapi/hoek": "^9.0.0"
}
},
"@iarna/toml": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="
},
"@jest/schemas": {
"version": "29.0.0",
"resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz",
@ -17095,6 +17131,13 @@
"parse-json": "^5.0.0",
"path-type": "^4.0.0",
"yaml": "^1.10.0"
},
"dependencies": {
"yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
}
}
},
"create-ecdh": {
@ -17303,6 +17346,13 @@
"cssnano-preset-default": "^5.2.13",
"lilconfig": "^2.0.3",
"yaml": "^1.10.2"
},
"dependencies": {
"yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
}
}
},
"cssnano-preset-advanced": {
@ -18209,6 +18259,11 @@
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
"integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA=="
},
"yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
}
}
},
@ -23010,9 +23065,9 @@
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.1.tgz",
"integrity": "sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw=="
},
"yocto-queue": {
"version": "0.1.0",

View file

@ -11,12 +11,14 @@
"@docusaurus/core": "^2.3.1",
"@docusaurus/preset-classic": "^2.3.1",
"@docusaurus/theme-search-algolia": "^2.3.1",
"@iarna/toml": "^2.2.5",
"classnames": "^2.3.2",
"query-string": "7.1.1",
"react": "17.0.2",
"react-dom": "17.0.2"
"react-dom": "17.0.2",
"yaml": "^2.2.1"
},
"resolutions":{
"resolutions": {
"trim": "^0.0.3",
"got": "^11.8.5"
},

View file

@ -0,0 +1,41 @@
import React from 'react';
import CodeBlock from '@theme/CodeBlock';
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import YAML from 'yaml';
import TOML from '@iarna/toml';
function Config(props) {
const {data} = props;
return (
<Tabs
defaultValue="json"
groupId="sample"
values={[
{ label: 'json', value: 'json', },
{ label: 'yaml', value: 'yaml', },
{ label: 'toml', value: 'toml', },
]
}>
<TabItem value="json">
<CodeBlock className="language-json">
{JSON.stringify(data, null, 2)}
</CodeBlock>
</TabItem>
<TabItem value="yaml">
<CodeBlock className="language-yaml">
{YAML.stringify(data)}
</CodeBlock>
</TabItem>
<TabItem value="toml">
<CodeBlock className="language-toml">
{TOML.stringify(data)}
</CodeBlock>
</TabItem>
</Tabs>
);
}
export default Config;

View file

@ -213,18 +213,23 @@ a.getStarted_Sjon {
/* Fonts */
@font-face {
font-family: "Victor Mono";
src: url('/static/fonts/VictorMono.ttf') format("truetype");
}
:root {
--ifm-font-family-monospace: "Inter";
--ifm-font-family-base: "Inter";
}
code {
font-family: "Fira Code", monospace;
font-family: "Victor Mono", monospace;
}
code[class*="language-"],
pre[class*="language-"] {
font-family: "Fira Code", monospace;
font-family: "Victor Mono", monospace;
}
/* Dev settings */

Binary file not shown.