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]: Allow some variables in links #626

Closed
2 tasks done
colleenmcginnis opened this issue Feb 27, 2025 · 3 comments · Fixed by #715
Closed
2 tasks done

[Feature Request]: Allow some variables in links #626

colleenmcginnis opened this issue Feb 27, 2025 · 3 comments · Fixed by #715
Assignees

Comments

@colleenmcginnis
Copy link
Contributor

Prerequisites

  • I have searched existing issues to ensure this feature hasn't already been requested
  • I have tested using the latest version of docs-builder

What problem are you trying to solve?

I did read through the conversation in #182, but I think was specific to not using variables for cross-repo links.

The Beats team shared another use case for using variables in URLs that is unrelated to cross-repo links. They use a variable in links to a third-party site so that they only have to update one line when they bump the version they are using (instead of having to update ~90 lines).

Proposed Solution

Allow some variables in links (or any other approach to addressing the use case described above).

Examples and Research

No response

Alternative Solutions

The alternative would be to just find-and-replace the version in all links in the file.

Additional Context

No response

How important is this feature to you?

Nice to have

@bmorelli25
Copy link
Member

bmorelli25 commented Mar 6, 2025

Note: When adding docs, add var substitution in link docs, not string substitution. While string substitution will still be possible, that's not how we want to sell this feature.

Implementation will either error on frontmatter link subs (if possible) or allow frontmatter link subs (if messaging isn't possible)

@reakaleek
Copy link
Member

#715 will allow substitutions only in external links.

@reakaleek
Copy link
Member

#715 was merged.

You can now add substitutions in links. However, it only works if the resolved url starts with http. Hence, it should be a http:// or https:// link

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

Successfully merging a pull request may close this issue.

3 participants