-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Static files are now visible in pages
- Loading branch information
1 parent
b679644
commit c9e0c96
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- $url := urls.Parse .Destination -}} | ||
{{- $scheme := $url.Scheme -}} | ||
|
||
<img src=" | ||
{{- if eq $scheme "" -}} | ||
{{- if strings.HasSuffix $url.Path ".md" -}} | ||
{{- relref .Page .Destination | safeURL -}} | ||
{{- else -}} | ||
{{- printf "/%s%s" .Page.File.Dir .Destination | safeURL -}} | ||
{{- end -}} | ||
{{- else -}} | ||
{{- .Destination | safeURL -}} | ||
{{- end -}}" | ||
{{- with .Title }} title="{{ . | safeHTML }}"{{- end -}} | ||
{{- with .Text }} alt="{{ . | safeHTML }}" | ||
{{- end -}} | ||
/> | ||
|
||
{{- /* whitespace stripped here to avoid trailing newline in rendered result caused by file EOL */ -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- $url := urls.Parse .Destination -}} | ||
{{- $scheme := $url.Scheme -}} | ||
|
||
<a href=" | ||
{{- if eq $scheme "" -}} | ||
{{- if strings.HasSuffix $url.Path ".md" -}} | ||
{{- relref .Page .Destination | safeURL -}} | ||
{{- else -}} | ||
{{- .Destination | safeURL -}} | ||
{{- end -}} | ||
{{- else -}} | ||
{{- .Destination | safeURL -}} | ||
{{- end -}}" | ||
{{- with .Title }} title="{{ . | safeHTML }}"{{- end -}}> | ||
{{- .Text | safeHTML -}} | ||
</a> | ||
|
||
{{- /* whitespace stripped here to avoid trailing newline in rendered result caused by file EOL */ -}} |
Submodule vault
updated
from dfa113 to 96c297