You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At our company, we are using Hugo to produce our internal documentation. Something we've been wanting is a way to have pages show what other pages link to them. This has been asked for by others, who were told that such a feature does not currently exist.
Since we desire to have this feature, we would like to help implementing it. But, we need some pointers. We just spent an hour trying to find a good place to start, but sadly could not find a good spot.
So, basically what we want is to have access to something like .Page.BackRefs when rending a page. This would be an array of other Page objects, so that we could loop over them and create simple lists using their title and their refs.
Firstly, does this sound like an okay idea? If it does, do you have any suggestions on how it would be implemented? Our perhaps naive idea was to just walk over all the page nodes, collect what references they contain, and then populate a hashmap with a ReferencedPage: [ReferencingPages] structure. So, when looking up the backreferences to a Page, we can use this hashmap and find all the pages that references it.
Again, this is less of a feature request and more of an inquiry for places to start. We're happy to implement it, we just want to make sure we go about it in a good way that's compatible with the project!
The text was updated successfully, but these errors were encountered:
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.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Hello,
At our company, we are using Hugo to produce our internal documentation. Something we've been wanting is a way to have pages show what other pages link to them. This has been asked for by others, who were told that such a feature does not currently exist.
Since we desire to have this feature, we would like to help implementing it. But, we need some pointers. We just spent an hour trying to find a good place to start, but sadly could not find a good spot.
So, basically what we want is to have access to something like
.Page.BackRefs
when rending a page. This would be an array of otherPage
objects, so that we could loop over them and create simple lists using their title and their refs.Firstly, does this sound like an okay idea? If it does, do you have any suggestions on how it would be implemented? Our perhaps naive idea was to just walk over all the page nodes, collect what references they contain, and then populate a hashmap with a
ReferencedPage: [ReferencingPages]
structure. So, when looking up the backreferences to aPage
, we can use this hashmap and find all the pages that references it.Again, this is less of a feature request and more of an inquiry for places to start. We're happy to implement it, we just want to make sure we go about it in a good way that's compatible with the project!
The text was updated successfully, but these errors were encountered: