@@ -228,10 +228,10 @@ The following configuration options are available for card generation:
228
228
229
229
[`cards_layout_options`](#+social.cards_layout_options){ # +social.cards_layout_options }
230
230
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:
232
232
Default : _none_ – This option allows to set [parameters] as provided by
233
233
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.
235
235
236
236
---
237
237
@@ -293,6 +293,32 @@ The following configuration options are available for card generation:
293
293
font_family: Ubuntu
294
294
` ` `
295
295
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
+
296
322
[color palette] : ./changing-the-colors.md#color-palette
297
323
[primary color] : ./changing-the-colors.md#primary-color
298
324
[accent color] : ./changing-the-colors.md#accent-color
@@ -308,6 +334,7 @@ The following configuration options are available for card generation:
308
334
[parameters] : # parameters
309
335
[default layouts] : # +social.cards_layout
310
336
[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
311
338
312
339
# ### Debugging
313
340
@@ -594,8 +621,8 @@ layers:
594
621
` ` `
595
622
596
623
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 :
599
626
600
627
![Layer size]
601
628
@@ -605,6 +632,38 @@ useful for alignment and composition.
605
632
606
633
[Layer size] : ../assets/screenshots/social-cards-layer-size.png
607
634
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
+
608
667
# ## Backgrounds
609
668
610
669
Each layer can be assigned a background color and image. If both are given, the
0 commit comments