Skip to content

Commit 962f64d

Browse files
committed
Updated Insiders changelog
1 parent 72e44d7 commit 962f64d

File tree

4 files changed

+103
-4
lines changed

4 files changed

+103
-4
lines changed

CHANGELOG

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
mkdocs-material-9.1.14+insiders-4.35.0 (2023-05-20)
2+
3+
* Improve editing experience and stability of social plugin
4+
* Added support for custom layout syntax validation in social plugin
5+
* Added support for layer origin for easier placement in social plugin
6+
* Added support for in- and exclusion patterns in social plugin
7+
* Catch and print syntax errors in custom layouts
8+
19
mkdocs-material-9.1.14 (2023-05-20)
210

311
* Updated Armenian and Greek translations

docs/insiders/changelog.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## Material for MkDocs Insiders
44

5+
### 4.35.0 <small>May 20, 2023</small> { id="4.35.0" }
6+
7+
- Improve editing experience and stability of social plugin
8+
- Added support for custom layout syntax validation in social plugin
9+
- Added support for layer origin for easier placement in social plugin
10+
- Added support for in- and exclusion patterns in social plugin
11+
- Catch and print syntax errors in custom layouts
12+
513
### 4.34.1 <small>May 16, 2023</small> { id="4.34.1" }
614

715
- Disable social plugin debug mode by default on mkdocs build

docs/schema/plugins/social.json

+24
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,30 @@
6161
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#+social.cards_layout_options",
6262
"type": "object"
6363
},
64+
"cards_include": {
65+
"title": "Pages or folders to include",
66+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#+social.cards_include",
67+
"type": "array",
68+
"items": {
69+
"title": "Pages or folders matching this pattern will be included",
70+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#+social.cards_include",
71+
"pattern": ".*"
72+
},
73+
"uniqueItems": true,
74+
"minItems": 1
75+
},
76+
"cards_exclude": {
77+
"title": "Pages or folders to exclude",
78+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#+social.cards_exclude",
79+
"type": "array",
80+
"items": {
81+
"title": "Pages or folders matching this pattern will be excluded",
82+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#+social.cards_exclude",
83+
"pattern": ".*"
84+
},
85+
"uniqueItems": true,
86+
"minItems": 1
87+
},
6488
"debug": {
6589
"title": "Debug mode",
6690
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#+social.debug",

docs/setup/setting-up-social-cards.md

+63-4
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ The following configuration options are available for card generation:
228228

229229
[`cards_layout_options`](#+social.cards_layout_options){ #+social.cards_layout_options }
230230

231-
: [:octicons-tag-24: insiders-4.33.0][Insiders] · :octicons-milestone-24:
231+
: [:octicons-tag-24: 9.1.10][Layout options support] · :octicons-milestone-24:
232232
Default: _none_ – This option allows to set [parameters] as provided by
233233
the layout specification. For [custom layouts], this key can be used to
234-
provide layout-specific options, making layouts entirels configurable.
234+
provide layout-specific options, making layouts entirely configurable.
235235

236236
---
237237

@@ -293,6 +293,32 @@ The following configuration options are available for card generation:
293293
font_family: Ubuntu
294294
```
295295

296+
[`cards_include`](#+privacy.cards_include){ #+privacy.cards_include }
297+
298+
: [:octicons-tag-24: insiders-4.35.0][Insiders] · :octicons-milestone-24:
299+
Default: _none_ – This option allows to only generate social cards for
300+
certain subsections of your documentation, e.g. to generate different
301+
cards for different subfolders with multiple instances of the plugin:
302+
303+
``` yaml
304+
plugins:
305+
- social:
306+
cards_include:
307+
- blog/*
308+
```
309+
310+
[`cards_exclude`](#+privacy.cards_exclude){ #+privacy.cards_exclude }
311+
312+
: :octicons-milestone-24: Default: _none_ – This option allows to exclude
313+
certain subsections of your documentation from generating social cards:
314+
315+
``` yaml
316+
plugins:
317+
- social:
318+
cards_exclude:
319+
- changelog/*.md
320+
```
321+
296322
[color palette]: ./changing-the-colors.md#color-palette
297323
[primary color]: ./changing-the-colors.md#primary-color
298324
[accent color]: ./changing-the-colors.md#accent-color
@@ -308,6 +334,7 @@ The following configuration options are available for card generation:
308334
[parameters]: #parameters
309335
[default layouts]: #+social.cards_layout
310336
[CSS color keyword]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#color_keywords
337+
[Layout options support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.1.10
311338

312339
#### Debugging
313340

@@ -594,8 +621,8 @@ layers:
594621
```
595622

596623
If the `size` is omitted, it defaults to the size of the layout. If the `offset`
597-
is omitted, it defaults to the top left corner, which is the origin for all
598-
layers. Saving the layout and reloading renders:
624+
is omitted, it defaults to the top left corner, which is the defaut `origin`.
625+
Saving the layout and reloading renders:
599626

600627
![Layer size]
601628

@@ -605,6 +632,38 @@ useful for alignment and composition.
605632

606633
[Layer size]: ../assets/screenshots/social-cards-layer-size.png
607634

635+
#### Origin
636+
637+
[:octicons-tag-24: insiders-4.35.0][Insiders] ·
638+
:octicons-beaker-24: Experimental
639+
640+
The `origin` for the `x` and `y` values can be changed, so that the layer is
641+
aligned to one of the edges or corners of the layout, e.g., to the bottom right
642+
corner of the layout:
643+
644+
``` yaml hl_lines="5"
645+
size: { width: 1200, height: 630 }
646+
layers:
647+
- size: { width: 1200, height: 630 }
648+
offset: { x: 0, y: 0 }
649+
origin: end bottom
650+
```
651+
652+
The following table shows the supported values:
653+
654+
<figure markdown>
655+
656+
| Origin | | |
657+
| -------------- | --------------- | ------------ |
658+
| :material-arrow-top-left: `start top` | :material-arrow-up: `center top` | :material-arrow-top-right: `end top` |
659+
| :material-arrow-left: `start center` | :material-circle-small: `center` | :material-arrow-right: `end center` |
660+
| :material-arrow-bottom-left: `start bottom` | :material-arrow-down: `center bottom` | :material-arrow-bottom-right: `end bottom` |
661+
662+
<figcaption>
663+
Supported values for origin
664+
</figcaption>
665+
</figure>
666+
608667
### Backgrounds
609668

610669
Each layer can be assigned a background color and image. If both are given, the

0 commit comments

Comments
 (0)