macos-defaults/build/templates/page.md.handlebars
2022-08-18 19:34:34 +02:00

79 lines
2.2 KiB
Handlebars
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
metaTitle: {{{ title }}} | {{{ name }}} | macOS defaults
meta:
- property: "og:title"
content: macOS defaults > {{{ name }}} > {{{ title }}}
- name: "description"
content: {{{ metaTag description }}}
- property: "og:description"
content: {{{ metaTag description }}}
- property: "twitter:card"
content: "summary"
- property: "twitter:image"
content: "https://macos-defaults.netlify.app/media-1x1.webp"
- property: "og:image"
content: "https://macos-defaults.netlify.app/media-1x1.jpg"
---
# {{{ title }}}
{{{ description }}}
<!-- break lists -->
- **Tested on macOS**:
{{# versions }}
* {{ . }}
{{/ versions }}
- **Parameter type**: {{ param.type }}
{{# param.values }}
* {{ . }}
{{/ param.values }}
{{# if requirements }}
## Requirements
{{# requirements }}
- [`{{ name }}`](../../{{ folder }}/{{ key }}.html#set-to-{{{ value }}}) must be set to `{{ value }}`
{{/ requirements }}
{{/ if }}
{{# examples }}
## {{# if title }}{{{ title }}}{{ else }}Set to `{{{ value }}}`{{/ if }}{{# if default }} (default value){{/ if }}
{{# if text }}
{{# text }}
{{{ . }}}
{{/ text }}
{{/ if}}
```bash
defaults write {{ ../domain }} {{{ shellescape ../key }}} -{{# if command }}{{ command }}{{ else }}{{ ../param.type }}{{/ if }} {{# each value }}{{{ shellescape this }}} {{/ each }}{{# if ../after }}&& {{ ../after }}{{/ if }}
```
{{# video }}
<video autoplay loop muted playsinline width="{{ width }}" height="{{ height }}" style="max-width: 100%; height: auto">
<source src="./{{ ../../folder }}-{{ ../../key }}-{{ filename }}" type="video/mp4">
Example output with value set to {{{ ../value }}}
</video>
{{/ video }}
{{# image }}
<img
src="./{{ ../../folder }}-{{ ../../key }}-{{ filename }}"
alt="Example output with value set to {{{ ../value }}}"
width="{{ width }}" height="{{ height }}" style="height: auto"
/>
{{/ image }}
{{/ examples }}
## Read current value
```bash
defaults read {{ domain }} {{{ shellescape key }}}
```
## Reset to default value
{{# if deleteAlert }}
::: {{ deleteAlert.type }}
{{{ deleteAlert.message }}}
:::
{{/ if }}
```bash
defaults delete {{ domain }} {{{ shellescape key }}}{{# if after }} && {{ after }}{{/ if }}
```