mirror of
https://github.com/yannbertrand/macos-defaults
synced 2024-12-17 23:13:09 +00:00
2bc15fe0de
This improves markdown support within descriptions. Currently, adding multiline text blocks in the defaults.yml file breaks, because the generated head meta tags content includes that whitespace as is and breaks the generated yaml contents. Now, meta tag content is stringified as JSON, which is yaml compliant. The final html meta tag contains the markdown as is. Also currently, markdown descriptions inserted into the content can interact with subsequent content (if you end with a list it'll cause funky interaction with the following content). That's fixed by inserting a "break" between (done on categores and pages).
79 lines
2.1 KiB
Handlebars
79 lines
2.1 KiB
Handlebars
---
|
||
metaTitle: {{{ title }}} | {{{ name }}} | macOS defaults
|
||
meta:
|
||
- property: "og:title"
|
||
content: macOS defaults > {{{ name }}} > {{{ title }}}
|
||
- name: "description"
|
||
content: {{{ json description }}}
|
||
- property: "og:description"
|
||
content: {{{ json 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 -->
|
||
|
||
- **Testé sur macOS**:
|
||
{{# versions }}
|
||
* {{ . }}
|
||
{{/ versions }}
|
||
- **Type de paramètre**: {{ param.type }}
|
||
{{# param.values }}
|
||
* {{ . }}
|
||
{{/ param.values }}
|
||
|
||
{{# if requirements }}
|
||
## Prérequis
|
||
{{# requirements }}
|
||
- [`{{ name }}`](../..{{ ../url }}{{ folder }}/{{ key }}.html#avec-la-valeur-{{ value }}) doit avoir la valeur `{{ value }}`
|
||
{{/ requirements }}
|
||
|
||
{{/ if }}
|
||
{{# examples }}
|
||
## {{# if title }}{{{ title }}}{{ else }}Avec la valeur `{{ value }}`{{/ if }}{{# if default }} (par défaut){{/ if }}
|
||
{{# if text }}
|
||
|
||
{{# text }}
|
||
{{{ . }}}
|
||
{{/ text }}
|
||
{{/ if}}
|
||
|
||
```bash
|
||
defaults write {{ ../domain }} {{ ../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">
|
||
Exemple avec la valeur {{{ ../value }}}
|
||
</video>
|
||
{{/ video }}
|
||
{{# image }}
|
||
<img
|
||
src="./{{ ../../folder }}-{{ ../../key }}-{{ filename }}"
|
||
alt="Exemple avec la valeur {{{ ../value }}}"
|
||
width="{{ width }}" height="{{ height }}" style="height: auto"
|
||
/>
|
||
{{/ image }}
|
||
|
||
{{/ examples }}
|
||
## Lire la valeur courante
|
||
```bash
|
||
defaults read {{ domain }} {{ key }}
|
||
```
|
||
|
||
## Remettre la valeur à l'état initial
|
||
{{# if deleteAlert }}
|
||
::: {{ deleteAlert.type }}
|
||
{{{ deleteAlert.message }}}
|
||
:::
|
||
{{/ if }}
|
||
```bash
|
||
defaults delete {{ domain }} {{ key }}{{# if after }} && {{ after }}{{/ if }}
|
||
```
|