feat: pdf shortcode (unstable) (#345)

This commit is contained in:
Xin
2024-04-01 16:55:11 +02:00
committed by GitHub
parent 0d6cbba9df
commit 9f2b67c08c
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,9 @@
{{/* Shortcode to include a PDF file in a page. */}}
{{- $path := .Get 0 -}}
{{- $url := partial "utils/file-path" (dict "page" .Page "path" $path) -}}
<div class="hextra-pdf">
<iframe src="{{ $url | safeURL }}" width="100%" style="min-height: 32rem;" frameborder="0"></iframe>
</div>