mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 15:03:10 -04:00
feat: pdf shortcode (unstable) (#345)
This commit is contained in:
9
layouts/shortcodes/pdf.html
Normal file
9
layouts/shortcodes/pdf.html
Normal 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>
|
Reference in New Issue
Block a user