Add asciinema support
This commit is contained in:
parent
981b8ad067
commit
866fe408e4
9 changed files with 2930 additions and 12 deletions
|
|
@ -1,10 +1,16 @@
|
|||
<!--
|
||||
Returns the file path of the colocated asset.
|
||||
When Zola uses `resize_image` it looks relative to the `content` folder.
|
||||
This means you have to reference the full page asset colocation path.
|
||||
-->
|
||||
{%- macro colocated_asset(path) -%}
|
||||
{%- set page_url_components = page.relative_path | default(value=section.relative_path) | split(pat='/') -%}
|
||||
{%- set page_base = page_url_components | slice(end=page_url_components | length - 1) | join(sep='/') -%}
|
||||
{{ page_base ~ '/' ~ path }}
|
||||
{#
|
||||
Returns the file path of the colocated asset.
|
||||
When Zola uses `resize_image` it looks relative to the `content` folder.
|
||||
This means you have to reference the full page asset colocation path.
|
||||
|
||||
The get_url parameter specifies whether you want the URL or the file path.
|
||||
#}
|
||||
{%- macro colocated_asset(path, get_url=false) -%}
|
||||
{%- if get_url -%}
|
||||
{{ page.path ~ path }}
|
||||
{%- else -%}
|
||||
{%- set page_url_components = page.relative_path | default(value=section.relative_path) | split(pat='/') -%}
|
||||
{%- set page_base = page_url_components | slice(end=page_url_components | length - 1) | join(sep='/') -%}
|
||||
{{ page_base ~ '/' ~ path }}
|
||||
{%- endif -%}
|
||||
{%- endmacro colocated_asset -%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue