Skip to content

feat: adopt theme-level slack-invite shortcode, drop org-UUID namespace#418

Open
hortison wants to merge 1 commit into
masterfrom
claude/dazzling-ride-j0l8sg
Open

feat: adopt theme-level slack-invite shortcode, drop org-UUID namespace#418
hortison wants to merge 1 commit into
masterfrom
claude/dazzling-ride-j0l8sg

Conversation

@hortison

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the two org-UUID-namespaced slack-invite shortcode calls with the generic theme-level form
  • Adds a local layouts/shortcodes/slack-invite.html bridge so the site builds correctly until academy-theme#215 is merged and go.mod is bumped

Before

{{< 1e2a8e46-937c-47ea-ab43-5716e3bcab2e/slack-invite link="..." >}}

After

{{< slack-invite link="..." >}}

Context

Follows up the discussion in PR #416, where it was noted that the org UUID (1e2a8e46-...) was hardcoded in shortcode calls. The academy-theme now 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-namespaced

See: layer5io/academy-theme#215

Follow-on

Once the theme PR is merged and the version is bumped in go.mod, the local layouts/shortcodes/slack-invite.html can be removed. The now-unused layouts/shortcodes/1e2a8e46-.../slack-invite.html org override can also be cleaned up.

Test plan

  • hugo server builds without shortcode errors
  • Slack invite card renders correctly on Workshop CKA and Workshop K8S overview pages

Generated by Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread layouts/shortcodes/slack-invite.html Outdated
Comment on lines +8 to +12
<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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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>

@hortison hortison Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hortison hortison force-pushed the claude/dazzling-ride-j0l8sg branch from e0675ae to 7701512 Compare June 23, 2026 18:52
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployment: https://layer5io.github.io/exoscale-academy/pr-preview/pr-418/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

@hortison hortison force-pushed the claude/dazzling-ride-j0l8sg branch from 7701512 to 228b6c6 Compare June 23, 2026 19:03
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
@hortison hortison force-pushed the claude/dazzling-ride-j0l8sg branch from 228b6c6 to 5037038 Compare June 23, 2026 19:05

@Bhumikagarggg Bhumikagarggg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image Image Image

Tested locally.

hugo server builds successfully without any shortcode errors.
✅ Slack invite card renders correctly on both the Workshop CKA and Workshop K8S overview pages.

Everything looks good from my side.

@Bhumikagarggg Bhumikagarggg added the issue/dco Commit sign-off instructions label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🚨 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.


        Be sure to join the community, if you haven't yet and please leave a ⭐ star on the project 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants