docs: update to docusaurus V3

This commit is contained in:
Jan De Dobbeleer 2023-11-19 11:58:42 +01:00 committed by Jan De Dobbeleer
parent eea6ffe4c1
commit efe7398799
8 changed files with 6442 additions and 13220 deletions

View file

@ -6,7 +6,7 @@
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
}
},
"go.formatTool": "gofmt",

View file

@ -168,7 +168,7 @@ use them.
| `{{ if glob "*.go" }}OK{{ else }}NOK{{ end }}` | Exposes [filepath.Glob][glob] as a boolean template function. |
| `{{ if matchP "*.Repo" .Path }}Repo{{ else }}No Repo{{ end }}` | Exposes [regexp.MatchString][regexpms] as a boolean template function. |
| `{{ replaceP "c.t" "cut code cat" "dog" }}` | Exposes [regexp.ReplaceAllString][regexpra] as a string template function. |
| <code>{{ .Code &vert; hresult }}</code> | Transform a status code to its HRESULT value for easy troubleshooting. For example `-1978335212` becomes `0x8A150014`. |
| <code>\{\{ .Code &vert; hresult \}\}</code> | Transform a status code to its HRESULT value for easy troubleshooting. For example `-1978335212` becomes `0x8A150014`. |
<!-- markdownlint-enable MD013 -->

View file

@ -10,24 +10,24 @@ Display the currently active AWS profile and region.
## Sample Configuration
import Config from '@site/src/components/Config.js';
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}}"
}}/>
<Config
data={{
type: "aws",
style: "powerline",
powerline_symbol: "\uE0B0",
foreground: "#ffffff",
background: "#FFA400",
template: " \uE7AD {{.Profile}}{{if .Region}}@{{.Region}}{{end}}",
}}
/>
## Properties
| Name | Type | Description |
| ----------------- | ------------------------------------------------------------------------------ | ----------- |
| `display_default` | `boolean` - display the segment or not when the user profile matches `default` | defaults |
to `true`
| ----------------- | ------------------------------------------------------------------------------ | ------------------ |
| `display_default` | `boolean` - display the segment or not when the user profile matches `default` | defaults to `true` |
## Template ([info][templates])

View file

@ -42,7 +42,7 @@ import Config from "@site/src/components/Config.js";
| `api_key` | `string` | Your API key from [Open Weather Map][owm] |
| `latitude` | `float64` | The latitude of the requested location. |
| `longitude` | `float64` | The longitude of the requested location. |
| `location` | `string` | The requested location. Formatted as <City,STATE,COUNTRY_CODE>. City name, state code and country code divided by comma. Please, refer to ISO 3166 for the state codes or country codes - defaults to `DE BILT,NL` |
| `location` | `string` | The requested location. Formatted as \<City,STATE,COUNTRY_CODE\>. City name, state code and country code divided by comma. Please, refer to ISO 3166 for the state codes or country codes - defaults to `DE BILT,NL` |
| `units` | `string` | Units of measurement. Available values are standard (kelvin), metric (celsius), and imperial (fahrenheit) - defaults to `standard` |
| `http_timeout` | `int` | The default timeout for http request is 20ms. |
| `cache_timeout` | `int` | The default timeout for request caching is 10m. A value of 0 disables the cache. |
@ -71,6 +71,8 @@ The given location can either be specified through the Latitude and Longitude pr
| `.UnitIcon` | `string` | the current unit icon(based on units property) |
| `.URL` | `string` | the url of the current api call |
[go-text-template]: https://golang.org/pkg/text/template/
[sprig]: http://masterminds.github.io/sprig/
[templates]: /docs/configuration/templates
[owm]: https://openweathermap.org
[owm-price]: https://openweathermap.org/price

View file

@ -19,7 +19,7 @@ module.exports = {
],
themeConfig: {
prism: {
additionalLanguages: ['powershell', 'lua', 'jsstacktrace', 'toml'],
additionalLanguages: ['powershell', 'lua', 'jsstacktrace', 'toml', 'json', 'yaml'],
},
navbar: {
title: 'Oh My Posh',

19597
website/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -5,17 +5,19 @@
"scripts": {
"start": "cross-env NODE_ENV=development docusaurus start",
"build": "docusaurus build",
"serve": "docusaurus serve",
"themes": "node export_themes.js"
},
"dependencies": {
"@docusaurus/core": "^2.3.1",
"@docusaurus/preset-classic": "^2.3.1",
"@docusaurus/theme-search-algolia": "^2.3.1",
"@docusaurus/core": "^3.0.0",
"@docusaurus/preset-classic": "^3.0.0",
"@docusaurus/theme-search-algolia": "^3.0.0",
"@iarna/toml": "^2.2.5",
"@mdx-js/react": "^3.0.0",
"classnames": "^2.3.2",
"query-string": "7.1.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"yaml": "^2.2.2"
},
"resolutions": {

View file

@ -15,6 +15,7 @@
--ifm-color-primary-lighter: rgb(95, 157, 237);
--ifm-color-primary-lightest: rgb(8, 9, 10);
--ifm-code-font-size: 95%;
--ifm-pre-background: #232136;
}
.docusaurus-highlight-code-line {
@ -110,6 +111,8 @@ html[data-theme="dark"] .header-discord-link:before {
no-repeat;
}
/* Admonition */
div.theme-admonition.theme-admonition-tip.alert.alert--success {
background-color: #9ccfd8;
border-color: #56949f;