Skip to content

Commit

Permalink
docs: restore mkdocs-material theme
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Cornick <mark@markcornick.com>
  • Loading branch information
mcornick committed Feb 21, 2024
1 parent 90e3fca commit 6031a3e
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 55 deletions.
107 changes: 53 additions & 54 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,33 +127,32 @@ The configuration file should be named either `config.yaml`, `config.toml` or `c

The file should look like one of these, substituting your own details:

config.yaml:

```yaml
---
address: tomservo
email: tomservo@gizmonics.invalid
apikey: 0123456789abcdef0123456789abcdef
```
config.toml:
```toml
address = "tomservo"
email = "tomservo@gizmonics.invalid"
apikey = "0123456789abcdef0123456789abcdef"
```

config.json:

```json
{
"address": "tomservo",
"email": "tomservo@gizmonics.invalid",
"apikey": "0123456789abcdef0123456789abcdef"
}
```

=== "config.yaml"

```yaml
---
address: tomservo
email: tomservo@gizmonics.invalid
apikey: 0123456789abcdef0123456789abcdef
```

=== "config.toml"

```toml
address = "tomservo"
email = "tomservo@gizmonics.invalid"
apikey = "0123456789abcdef0123456789abcdef"
```

=== "config.json"

```json
{
"address": "tomservo",
"email": "tomservo@gizmonics.invalid",
"apikey": "0123456789abcdef0123456789abcdef"
}
```
A [JSON Schema](https://raw.githubusercontent.com/mcornick/clilol/main/docs/config.schema.json) for the configuration file is available, for editors that support it.

!!! Note
Expand Down Expand Up @@ -186,40 +185,40 @@ Environment variables take precedence over any configuration file.

Rather than hardcoding your API key in the configuration file or environment, you can specify a command which, when run, will return the API key on standard output, such as:

config.yaml:
=== "config.yaml"

```yaml
---
address: tomservo
email: tomservo@gizmonics.invalid
apikeycmd: gopass -o omg.lol/tomservo
```
```yaml
---
address: tomservo
email: tomservo@gizmonics.invalid
apikeycmd: gopass -o omg.lol/tomservo
```

config.toml:
=== "config.toml"

```toml
address = "tomservo"
email = "tomservo@gizmonics.invalid"
apikeycmd = "gopass -o omg.lol/tomservo"
```
```toml
address = "tomservo"
email = "tomservo@gizmonics.invalid"
apikeycmd = "gopass -o omg.lol/tomservo"
```

config.json:
=== "config.json"

```json
{
"address": "tomservo",
"email": "tomservo@gizmonics.invalid",
"apikeycmd": "gopass -o omg.lol/tomservo"
}
```
```json
{
"address": "tomservo",
"email": "tomservo@gizmonics.invalid",
"apikeycmd": "gopass -o omg.lol/tomservo"
}
```

environment:
=== "environment"

```sh
export CLILOL_ADDRESS="tomservo"
export CLILOL_EMAIL="tomservo@gizmonics.invalid"
export CLILOL_APIKEYCMD="gopass -o omg.lol/tomservo"
```
```sh
export CLILOL_ADDRESS="tomservo"
export CLILOL_EMAIL="tomservo@gizmonics.invalid"
export CLILOL_APIKEYCMD="gopass -o omg.lol/tomservo"
```

In this example, clilol would use the output of `gopass -o omg.lol/tomservo` as the API key. If the command fails, clilol will print an error stating that the API key is missing.

Expand Down
28 changes: 27 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ extra:
link: https://social.sdf.org/@mcornick
markdown_extensions:
- admonition
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
plugins:
- search
repo_name: mcornick/clilol
Expand All @@ -17,4 +20,27 @@ site_description: a CLI for omg.lol
site_name: clilol, a CLI for omg.lol
site_url: https://clilol.readthedocs.io/
theme:
name: readthedocs
features:
- content.action.edit
- content.action.view
- content.code.copy
icon:
logo: fontawesome/solid/heart
repo: fontawesome/brands/github
name: material
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: pink
accent: pink
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: pink
accent: pink
toggle:
icon: material/brightness-4
name: Switch to light mode
# yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json
3 changes: 3 additions & 0 deletions readthedocs-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdocs-material
mkdocs-material-extensions
pymdown-extensions

0 comments on commit 6031a3e

Please sign in to comment.