-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hugo defaults to serving files with pretty urls [1] - this means `/posts/foo.org` is served at `/posts/foo/`. This works because servers default to serving index.html when a directory is specified and hugo renders the post to `/posts/foo/index.html` instead of `/posts/foo.html`. To make relative links work we need to (1) remove the fake `foo/` subdirectory from unrooted links and (2) replace any `.org` suffix with `/`. [1] https://gohugo.io/content-management/urls/#pretty-urls
- Loading branch information
1 parent
84d56e9
commit 5dadf8c
Showing
2 changed files
with
38 additions
and
3 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
5dadf8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this patch has broken hugo for me. I have files like
and index.org refers to [[bar.pdf]]. Since hugo 0.81 (which I think includes this code) the link in
resolves to
.../page/foo/../bar.pdf
(which is.../page/bar.pdf
) while the file is actually in.../page/foo/bar.pdf
.I have reverted to hugo 0.80 for now but it would be nice to get this issue resolved in a future version of hugo.
5dadf8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #53. Will revert