-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from thegetty/fix/windows-filepath
Fix/ Convert directory paths in contents-list partials to work in Windows
- Loading branch information
Showing
4 changed files
with
23 additions
and
5 deletions.
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
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
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
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,7 @@ | ||
{{/* Uses the Hugo `path.Dir` function to return the given path's directory and normalize it, making it consistent for both Windows and macOS/Linux/Unix users | ||
--------------------------------------------------------------------------- */}} | ||
{{- $fileDir := path.Dir . -}} | ||
{{- if ne $fileDir "/" -}} | ||
{{- $fileDir = printf "%s%s" $fileDir "/" -}} | ||
{{- end -}} | ||
{{- return $fileDir -}} |