feat: adopt theme-level slack-invite shortcode, drop org-UUID namespace#418
feat: adopt theme-level slack-invite shortcode, drop org-UUID namespace#418hortison wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the slack-invite shortcode by moving it to a global layout and simplifying its usage in the workshop index files. Feedback was provided regarding the HTML structure in the new shortcode layout, specifically pointing out that nesting a <button> inside an <a> tag is invalid HTML and suggesting to style the anchor tag directly.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| <a href="{{ $link | safeURL }}" target="_blank" rel="noopener" style="text-decoration: none; display: inline-block; margin-top: 0.5rem;"> | ||
| <button style="background-color: #4A154B; color: white; padding: 12px 24px; border: none; border-radius: 8px; font-size: 16px; cursor: pointer;"> | ||
| 🚀 Join the Slack Community | ||
| </button> | ||
| </a> |
There was a problem hiding this comment.
Nesting a <button> element inside an <a> (anchor) element is invalid HTML according to the W3C HTML specification, as both are interactive elements. This can cause issues with assistive technologies (like screen readers) and keyboard navigation. Instead, style the <a> element directly to look like a button.
<a href="{{ $link | safeURL }}" target="_blank" rel="noopener" style="text-decoration: none; display: inline-block; margin-top: 0.5rem; background-color: #4A154B; color: white; padding: 12px 24px; border-radius: 8px; font-size: 16px; cursor: pointer;">
🚀 Join the Slack Community
</a>There was a problem hiding this comment.
Fixed in the follow-up commit — replaced the <button> inside <a> with a single styled <a> element. The same fix has been applied to the slack-invite.html in the academy-theme PR as well.
e0675ae to
7701512
Compare
|
🚀 Preview deployment: https://layer5io.github.io/exoscale-academy/pr-preview/pr-418/
|
7701512 to
228b6c6
Compare
Replaces the org-UUID-namespaced shortcode calls:
{{< 1e2a8e46-.../slack-invite link="..." >}}
with the theme-provided generic form:
{{< slack-invite link="..." >}}
Adds layouts/shortcodes/slack-invite.html as a local bridge until
academy-theme#215 is merged and the theme version is bumped. The
org-namespaced override in layouts/shortcodes/{orgID}/ is no longer
referenced by any content file and can be cleaned up in a follow-on.
Closes: layer5io/academy-theme#215
228b6c6 to
5037038
Compare
|
🚨 Alert! Git Police! We couldn’t help but notice that one or more of your commits is missing a sign-off. A what? A commit sign-off (your email address). To amend the commits in this PR with your signoff using the instructions provided in the DCO check. To configure your dev environment to automatically signoff on your commits in the future, see these instructions.
|



Summary
slack-inviteshortcode calls with the generic theme-level formlayouts/shortcodes/slack-invite.htmlbridge so the site builds correctly until academy-theme#215 is merged andgo.modis bumpedBefore
After
Context
Follows up the discussion in PR #416, where it was noted that the org UUID (
1e2a8e46-...) was hardcoded in shortcode calls. Theacademy-themenow ships two new shortcodes:org-id— dynamically extracts the org UUID from the current page's path (learning-paths/{orgID}/...)slack-invite— generic Slack invite card, no longer org-namespacedSee: layer5io/academy-theme#215
Follow-on
Once the theme PR is merged and the version is bumped in
go.mod, the locallayouts/shortcodes/slack-invite.htmlcan be removed. The now-unusedlayouts/shortcodes/1e2a8e46-.../slack-invite.htmlorg override can also be cleaned up.Test plan
hugo serverbuilds without shortcode errorsGenerated by Claude Code