Skip to content

feat: replace hardcoded org UUID in shortcode calls with theme-level slack-invite #147

Description

@hortison

Background

The academy-theme now provides an org-id shortcode (see layer5io/academy-theme#215) that dynamically extracts the organization UUID from the current learning-path page's directory path (learning-paths/{orgID}/...). It also provides a generic slack-invite shortcode at the theme level.

Current state

Any org-specific shortcode calls that hardcode the org UUID namespace (e.g. {{< your-org-uuid/slack-invite link="..." >}}) introduce a maintenance burden: if the UUID changes, all content files referencing it break.

Requested change

Once academy-theme#215 is merged and the theme version is bumped in go.mod:

  1. Replace org-namespaced slack-invite calls with the generic theme shortcode:
    {{< slack-invite link="https://..." >}}
    
  2. Remove any local layouts/shortcodes/{orgID}/slack-invite.html override (the theme now owns it)
  3. Use {{< org-id >}} anywhere the UUID is needed as a text value in content — no more copy-pasting the UUID

Why this matters for the starter template

As the canonical starter template, academy-example should model best practices. Demonstrating the use of {{< org-id >}} and {{< slack-invite >}} instead of hardcoded UUIDs helps new academy adopters avoid the maintenance pitfall from day one.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions