-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with internal links and the ref shortcut #51
Comments
Interesting! To go-org I guess we could just not prettify links starting with In the meantime things should work if you use TLDR: Try |
Thanks for looking into this issue. Using Shortcodes have the advantage that Hugo searches for the file if it is not in the same folder and resolves to the slug instead of the filename. Interestingly, '[[{{% ref markdown %}}][test]]` works as it used to. The Hugo documentation states that "The I could easily do a search and replace across my sites. |
Makes sense, thx for the explanation. |
I replaced all shortcodes and it seems to work. |
go-org PrettyRelativeLinks rewrites relative org links by - adding `../` in front - removing any `.org` suffix This was meant to play well with hugo pretty urls (which pretty much renders posts in a subdirectory without the file suffix) and allow use of normal org file links to reference other posts. There's a lot of edge cases I didn't consider and multiple bug reports in go-org [1] later I don't think the complexity of handling those edge cases is worth it - so let's disable it. [1] - niklasfasching/go-org#53 - niklasfasching/go-org@5dadf8c (comment) - niklasfasching/go-org#51
Hi Niklas, I just published a detailed blog post on how to use native Org-Mode support in Hugo to publish websites: https://lucidmanager.org/productivity/create-websites-with-org-mode-and-hugo/ Thanks for maintaining go-org. Peter |
Hi @pprevos , mind if I ask if you got relative linking to I am writing some R code, I am asking it to produce plots by doing something like:
This way I can see generated plot right in org buffer which is very useful, but generated image source still has the Also would like to ask @niklasfasching, could the above situation be handled unrelated to the broken PrettyRelativeLinks feature? Maybe as special case only for stripping |
Sigh, right after I finally ask for help, I stumble upon the answer. I still don't understand modules, but this did the job: [[module.mounts]]
source="static"
target="static/static"
includeFiles = ["plots/*"] This way, hugo now preserves the top-level |
This is an issue for Hugo both in Org mode and Markdown, so it is a Hugo issue, not specific to go-org. |
Internal links stopped working (Hugo version:
hugo v0.81.0+extended linux/amd64 BuildDate=unknown
).I use
{{< ref filename.org >}}
for internal links. For some reason, Hugo now adds../
to the front of the HTML link.{{< ref filename.org >}}
resolves properly tohttps://baseurl/filename/
But when I surround it with square brackets, it goes wrong:
[[{{< ref filename.org >}}][link text]]
resolves to../https://baseurl/filename/
.Everything works fine when using Markdown.
The text was updated successfully, but these errors were encountered: