Skip to content

[Feat] Automatically link glossary entries#106

Open
ByteOtter wants to merge 2 commits into
mainfrom
feat/auto-glossar
Open

[Feat] Automatically link glossary entries#106
ByteOtter wants to merge 2 commits into
mainfrom
feat/auto-glossar

Conversation

@ByteOtter

@ByteOtter ByteOtter commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

This PR adds a new feature to allow users to quickly link a given abbreviation or name to a glossary entry.

This will look like this in any given text:

This is a sample text about gardenlinux {{glossary:flavors}}.

This shorthand will then be replaced into a clickable link automatically during aggregation or by running make glossary.

This is a sample test about gardenlinux [flavors](/reference/glossary.html#flavor)

In addition, this PR fixes a bunch of formatting and linting issues throughout the codebase, strengthens our linters by minor configuration changes and introduces a new testsuite for this feature.

Preliminary usage documentation can be found in the deploy preview: https://deploy-preview-106--gardenlinux-docs.netlify.app/contributing/documentation/auto-glossary.html

Which issue(s) this PR fixes:
Fixes: gardenlinux/gardenlinux#4637

Definition of Done:

  • The code is sufficiently documented
  • Shared the changes with the Team so everyone is aware
  • The code is appropriately tested
  • Checked if the code needs to be backportet to release branches of maintained versions (perform the actual backport after the merge to main)

Special notes for your reviewer:

Release note:

@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for gardenlinux-docs ready!

Name Link
🔨 Latest commit 783fc3e
🔍 Latest deploy log https://app.netlify.com/projects/gardenlinux-docs/deploys/6a54dbeff13b310007c561f8
😎 Deploy Preview https://deploy-preview-106--gardenlinux-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@ByteOtter ByteOtter force-pushed the feat/auto-glossar branch 5 times, most recently from 1b9afe9 to 9298e07 Compare July 9, 2026 15:18
@ByteOtter ByteOtter marked this pull request as ready for review July 9, 2026 15:20
@ByteOtter ByteOtter force-pushed the feat/auto-glossar branch from 9298e07 to 19692aa Compare July 13, 2026 11:56
Signed-off-by: Tiara Lena Hock <hock@b1-systems.de>
On-behalf-of: SAP <tiara.hock@sap.com>
@ByteOtter ByteOtter force-pushed the feat/auto-glossar branch from c79122f to 3fbd693 Compare July 13, 2026 12:34
Signed-off-by: Tiara Lena Hock <hock@b1-systems.de>
On-behalf-of: SAP <tiara.hock@sap.com>
@ByteOtter ByteOtter force-pushed the feat/auto-glossar branch from 3fbd693 to 783fc3e Compare July 13, 2026 12:37
@ByteOtter ByteOtter self-assigned this Jul 13, 2026
@ByteOtter ByteOtter requested a review from yeoldegrove July 13, 2026 12:40
@ByteOtter ByteOtter added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Jul 13, 2026
@yeoldegrove yeoldegrove added this to the 2026-07 milestone Jul 14, 2026

@yeoldegrove yeoldegrove 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.

In general, I would like this search/replace to not run on the make aggregate(-|) steps but only on the make build steps to not leave unstaged files in git.

Comment on lines +61 to +66
::: details Developer Information
The auto glossary system is designed to accept a new custom `entry_format` through which
the shortcode `{glossary:*}` can be replaced with a new custom pattern.

Check the source code for more information.
:::

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.

I like that we hide this behind a developer block as I guess "nobody will use this feature". It's good to have it, though.

Comment on lines +110 to +140
## Auto-Linking



Auto-linking creates links for glossary terms without requiring explicit markers. This feature is disabled by default.

With auto-linking enabled, input text:

```
Deploy Gardenlinux on AWS using KVM virtualization.
```

Becomes:

```markdown
Deploy [Garden Linux](/reference/glossary#garden-linux) on [AWS](/reference/glossary#aws) using [KVM](/reference/glossary#kvm) virtualization.
```

Auto-linking rules:
- Links only the first occurrence of each term
- Matches longer terms first (`Garden Linux` before `Linux`)
- Case-insensitive matching
- Respects word boundaries
- Preserves code blocks and inline code
- Does not modify existing links

::: warning
This feature is disabled by default as it is highly experimental and intended for research work only.

**Contributors must not rely on this feature when contributing documentation.**
:::

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.

Could you remove this and also the feature until it is ready? It adds a lot of new code and in it's current state it is not very helpful.

I like the feature, though and would be happy if we get this included if it works properly.

Process glossary links manually:

```bash
make glossary

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.

This does not work for me currently. No files are touched.

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

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs Hub] Automate Abbreviation references

2 participants