We can store content from external projects yay

This commit is contained in:
2024-08-08 12:10:54 -04:00
parent 9557d90560
commit b4f53691ca
8 changed files with 41 additions and 70 deletions

View File

@@ -0,0 +1,10 @@
{{/* This never really worked but its cool to be able to make shortcodes like this for use in MD */}}
{{ $image := .Page.Resources.GetMatch (printf "*%s" (.Get 0)) }}
{{ if $image }}
<img src="{{ $image.RelPermalink }}" alt="{{ $image.Title }}">
{{ else }}
<!-- Would be cool to make an error-box for stuff like this in css -->
<p>Serverside shortcode Error, couldn't load {{ .Get 0 }}</p>
{{ end }}

View File

@@ -0,0 +1,7 @@
{{/* This custom shortcode lets me list all the resources available. Pretty cool yeah? */}}
<ul>
{{ range .Page.Resources }}
<li>{{ .RelPermalink }} - {{ .ResourceType }} - {{ .Name }}</li>
{{ end }}
</ul>