πŸš§πŸ—οΈπŸ‘·πŸΎNote: This site is under construction. Expect a lot of broken links and layouts. Have feedback? Email me at [email protected]

Home β†’ The Bikeshed β†’ Components

absURL.html

Published: Updated:

Gets the absolute URL of a path, else returns the string if not found. Useful for videos.

Source Code

{{- $url := .Get 0 -}}
{{- with or (.Page.Resources.GetMatch $url) (resources.Get $url) -}}
    {{- .Permalink -}}
{{- else -}}
    {{- absURL $url -}}
{{- end -}}

TODO

  • I need to find a better way of referencing videos. It’s good enough for now but I really need to improve it.