Skip to content
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

Two way references #8600

Closed
lucasew opened this issue Jun 1, 2021 · 2 comments
Closed

Two way references #8600

lucasew opened this issue Jun 1, 2021 · 2 comments

Comments

@lucasew
Copy link

lucasew commented Jun 1, 2021

Hugo has a pretty convenient template engine, shortcodes have pretty interesting handling about markdown extensibility so Hugo is a nice candidate to preview and publish digital gardens, but it lacks a two-way linking reference.

The proposition is basically a method on Page data structure that exposes a slice of relative references to the current page.

This can then be used in a template to generate quick jumping links and also a JSON manifest to generate things like graph views. Hugo just generates that metadata of the page. The rest can be handled by a template.

An extra idea about this is that linking can be labeled like /some/page#label then the label is stripped out the ref then on that slice it returns a struct with the relative href from the baseurl to the referenced page and the label as something like the state.

I was looking to do this and send a PR. No idea where to start xD. Is there already a shared index on the server mode? Should I do it from scratch? How can I listen to file modifications to efficiently update the index? Does Hugo already have an index like to the links a file is referencing?

@jmooring
Copy link
Member

jmooring commented Jun 1, 2021

Duplicate of #8077

@jmooring jmooring marked this as a duplicate of #8077 Jun 1, 2021
@jmooring jmooring closed this as completed Jun 1, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants