-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Add support for page backlinks (e.g. .GetBacklinks
)
#8077
Comments
Ok, so I'm not sure what you mean by "back links". I did read the the linked articles... This is only for links inside of the blog, not pingbacks like wordpress, where if another blog mentions your article then you generate a link saying they were talking about your blogpost. Can we get a few use cases of how people might be interested to use this? I use the tags feature and the related content features. See related content here: https://hughandbecky.us/Becky-CV/publication/2015-narrative-uses-of-utmatin-bare-verb |
Use cases are probably always wiki-like features, where you show which page links to what page. Using tags is certainly a solution, but it will make you have to edit all pages that your new page links to, to add a backlink. While having this done internally would be nice, it might also slow the build process down (for people that do not require that feature). I am pretty sure this can be done with some kind of .scratch functionality. |
Love the new feature "backlinks" or "bidirectional links"! As a heavy fan of Roam research, I am truly looking forward to this! It's all related to zettelkasten —— knowledge management and note-taking method used in research and study. |
I understand the "usefulness", but this is in my head currently very hard to do. For this to work you would probably need to render all content in 1 thread before you can do anything else -- which would slow down the build a whole lot. |
@bep If it is an opt-in feature, the slowdown is tolerable. One can turn it off when one is doing experiments requiring fast reload, and turn it back on for the production version. Anyhow, a slow thing is better than nothing. |
It can be opt in via the configuration file. A way to index this is to traverse the files looking for internal link references. If a file changes you can just update the index of that file. It will require a warm-up on setup to index and because it's opt in if you don't use you can just disable with no penalty. |
@gcushen I'm interested in this but not competent to implement. In looking around I've found two people discussing ways of doing this https://gabrielleearnshaw.medium.com/implementing-backlinks-in-a-hugo-website-e548d3d8f0e0 and https://seds.nl/notes/export_org_roam_backlinks_with_gohugo/ (I'm going to play, but I'm not likely to be able to implement). I can imagine academics e.g. being interested in linking projects<->publications<->authors<->news. |
The problem of using taxonomies (tag is one of the default taxonomies) is
that you can't get from the content. It's all defined on the frontmatter.
Not so convenient if you are using your obsidian vault. I've made a
template that uses an obsidian extension to dump the relations [1]. It's
not the ideal approach because I am having even more strong cpu spikes each
time obsidian exports the metadata because my obsidian vault keeps growing.
I am getting almost 10s for the cold build with 1052 pages. My laptop gets
pretty warm so I limit via GOMAXPROCS the amount of cores hugo can use to
half of them. For incremental builds it seems to work pretty nice but when
I am typing something it starts screaming the fans so a way to defer the
rebuild after X ms of the last filesystem activity would be a lot useful.
[1] https://github.com/lucasew/hugo-kb
EDIT: I found a way to make it cooler: partialCached. Lots of partials were being rendered repeatedly but caching the partials helped a lot on hot reloads.
…On Thu, Aug 5, 2021, 05:46 sjgknight ***@***.***> wrote:
@gcushen <https://github.com/gcushen> I'm interested in this but not
competent to implement. In looking around I've found two people discussing
ways of doing this
https://gabrielleearnshaw.medium.com/implementing-backlinks-in-a-hugo-website-e548d3d8f0e0
and https://seds.nl/notes/export_org_roam_backlinks_with_gohugo/ (I'm
going to play, but I'm not likely to be able to implement). I can imagine
academics e.g. being interested in linking
projects<->publications<->authors<->news.
Taxonomies/tags can do some of this I think, but it's not quite the same.
@apreshill <https://github.com/apreshill> also has an "on this page"
which shows the headings for a page, which I assume could be used to show
the links
https://github.com/rbind/apreshill/search?q=%22on+this+page%22&type= ?
Apologies this is just a a link dump .
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8077 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADXXO6BSPLZRJF67VHSWFSDT3JFWRANCNFSM4VCP5IWQ>
.
|
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
I still think this is useful, especially for wikis which was mentioned above. |
Zola has backlinks support, it would be good if Hugo has the same feature. https://twitter.com/20100Prouillet/status/1548430360135929856 |
It would be hugely useful for my project. Please make it happen. |
I want to bump this because I am looking for exactly this. Backlinks are incredibly useful |
Bumping! |
1 similar comment
Bumping! |
Solution proposal (high level):
Performance should be good, but there's a lack of adequacy: Internal linkage changes will take effect with one build delay. |
This behaviour could be acceptable, e. g. when performance is no issue, or when there's a high frequency of site updates, or when the ratio of internal linkage changes is low. |
How about Quartz? It is compatible with Hugo and comes with support for backlinks and a graph view, and it's easy to use. |
It would be great to have a native solution to this, instead of a third-party project like quartz. |
This sort of feature is one of the things that has left me on WordPress, where me and ChatGPT designed a solution using post metadata. My blog basically has no other form of organizing content (no tags, etc.). Internal backlinks is a must for my use case, and I'd consider getting the hell off the ever more monstrous thing that is WordPress and onto a static approach if there were an internal backlinks solution. |
This uses a relatively simple module to capture and render backlinks.
Details: |
That's clever! Is there a way to make this work with |
@unindented Use the
However, the test site enables Hugo's embedded link render hook (see site configuration), so you shouldn't need to use the |
Problem
As far as I can tell, there is currently no user friendly and efficient way to get the set of internal pages that link to a page (aka backlinks) via Hugo's Go templating.
Internal backlinks are really useful to those using Hugo in academia and for research and note taking. It's become one of the top selling points used by popular note taking apps such as Notion and Roam Research.
There is also demand in the community for such capability, for example:
Possible high-level solution
Expose a
.GetBacklinks
page option which provides a list ofPage
instances (similar to .GetTerms output) that link to the current page.The text was updated successfully, but these errors were encountered: