Allow setting card per page/section
This commit is contained in:
@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Add `h1` with page/section title by default.
|
- Add `h1` with page/section title by default.
|
||||||
- Add ability to set accent color per page/section.
|
- Add ability to set accent color per page/section.
|
||||||
- Add ability to set default theme per page/section.
|
- Add ability to set default theme per page/section.
|
||||||
|
- Add ability to set metadata card per page/section.
|
||||||
- Add active state to footer's "Powered by" links.
|
- Add active state to footer's "Powered by" links.
|
||||||
- Add active state to footnotes' go back button.
|
- Add active state to footnotes' go back button.
|
||||||
- Add active state to slider thumb.
|
- Add active state to slider thumb.
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
{%- if page.extra.banner -%}
|
{%- if page.extra.card -%}
|
||||||
{%- set card = resize_image(path=page.colocated_path ~ page.extra.banner, width=1200, height=628, op="fill") -%}
|
{{ get_url(path=page.colocated_path ~ page.extra.card) }}
|
||||||
{{ card.url }}
|
{%- elif section.extra.card -%}
|
||||||
|
{{ get_url(path=section.colocated_path ~ section.extra.card) }}
|
||||||
|
{%- elif page.extra.banner -%}
|
||||||
|
{%- set card = resize_image(path=page.colocated_path ~ page.extra.banner, width=1200, height=628, op="fill") -%}
|
||||||
|
{{ card.url }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ get_url(path='card.png') }}
|
{{ get_url(path='card.png') }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
Reference in New Issue
Block a user