Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
Add 'verbatim-assets' shortcode for code blocks
Browse files Browse the repository at this point in the history
or anywhere else we don't want to render the assets (e.g with
a plain text file).

Signed-off-by: Daniel F. Dickinson <[email protected]>
  • Loading branch information
danielfdickinson committed Sep 8, 2022
1 parent cc5586c commit e925be1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions layouts/shortcodes/verbatim-assets.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- $curPage := .Page -}}
{{- $page_asset_name := .Get 0 -}}
{{- $page_asset := resources.Get $page_asset_name -}}
{{- with $page_asset -}}
{{ .Content }}
{{- end -}}

0 comments on commit e925be1

Please sign in to comment.