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

Feature request: Add rel property in menu bundles #878

Open
MayeulC opened this issue Sep 4, 2024 · 1 comment
Open

Feature request: Add rel property in menu bundles #878

MayeulC opened this issue Sep 4, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@MayeulC
Copy link

MayeulC commented Sep 4, 2024

Rationale: Including a rel="me" property in a link is sometimes required for website verification, in mastodon and others.

References:

There are other possible rel types, and they don't all make sense in this context, but I don't think allowing them is an issue.

Possible implementation (untested):

diff --git a/layouts/partials/menu-bundle.html b/layouts/partials/menu-bundle.html
index d9dcfbb..a158191 100644
--- a/layouts/partials/menu-bundle.html
+++ b/layouts/partials/menu-bundle.html
@@ -60,6 +60,9 @@
                   class="gdoc-nav__entry{{- if not .external }}
                     {{- if $isCurrent }}{{ printf " is-active" }}{{ end }}
                   {{- end }}"
+                 {{ if .rel - }}
+                   rel="{{ .rel }}"
+                 {{ - end }}
                 >
                   {{ $name }}
                 </a>

The idea is to add the ability to put links with the rel="me" property in the sidebar:

# data/menu/more.yaml
more:
  - name: "My mastodon account"
    ref: "https://mastodon.example.com/my-account"
    external: true
    rel: me
@xoxys xoxys added the enhancement New feature or request label Oct 6, 2024
@xoxys
Copy link
Member

xoxys commented Oct 6, 2024

Personally, I would use <link> elements instead but I don't see a reason why we should not support this for bundle menus.

@xoxys xoxys added help wanted Extra attention is needed good first issue Good for newcomers labels Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants