Skip to content

feat: Add shortcode for the latest version of NGINX Gateway Fabric #203

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

Merged
merged 6 commits into from
Feb 19, 2025

Conversation

ADubhlaoich
Copy link
Contributor

Proposed changes

This commit adds a new shortcode to the layouts folder to store a string representing the latest version of NGINX Gateway Fabric. This means that instead of updating each file individually during a new release, only the shortcode file needs to be modified.

It clarifies the versioning for documentation, which makes it easier to review - and also reduces the amount of drift when updating, in the case that a reference was overlooked. There may be old references that need to be updated to use this shortcode.

Closes #199

Checklist

Before merging a pull request, run through this checklist and mark each as complete.

  • I have read the contributing guidelines
  • I have signed the F5 Contributor License Agreement (CLA)
  • I have ensured that documentation content adheres to the style guide
  • If the change involves potentially sensitive changes, I have assessed the possible impact
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • I have updated any relevant documentation (README.md and CHANGELOG.md
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Potentially sensitive changes include anything involving code, personally identify information (PII), live URLs or significant amounts of new or revised documentation.

Please refer to our style guide for guidance about placeholder content.

This commit adds a new shortcode to the layouts folder to store a string
representing the latest version of NGINX Gateway Fabric. This means that
instead of updating each file individually during a new release, only
the shortcode file needs to be modified.

It clarifies the versioning for documentation, which makes it easier to
review - and also reduces the amount of drift when updating, in the case
that a reference was overlooked. There may be old references that need
to be updated to use this shortcode.
@ADubhlaoich ADubhlaoich requested review from a team as code owners February 18, 2025 10:38
Copy link

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/docs/203/

Copy link
Contributor

@sjberman sjberman left a comment

Choose a reason for hiding this comment

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

Check for any 1.5.1 instances as well, I think those were seen in an includes for the install docs.

@ADubhlaoich ADubhlaoich requested a review from sjberman February 19, 2025 12:05
Copy link
Contributor

@mjang mjang left a comment

Choose a reason for hiding this comment

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

Question: while I like this idea, I think this looks like "nesting includes," which our style guide suggests we avoid. @travisamartin WDYT?

@ADubhlaoich
Copy link
Contributor Author

Question: while I like this idea, I think this looks like "nesting includes," which our style guide suggests we avoid. @travisamartin WDYT?

Ooh, I forgot about this. I think it was largely to avoid situations where skeletons of pages would be built in refraction: this is nested re-used content, but the scope is probably the tightest you could get for an include. Subsequent to affected pages are watching the version string increment as opposed to reviewing 16 separate files.

@mjang
Copy link
Contributor

mjang commented Feb 19, 2025

Question: while I like this idea, I think this looks like "nesting includes," which our style guide suggests we avoid. @travisamartin WDYT?

Ooh, I forgot about this. I think it was largely to avoid situations where skeletons of pages would be built in refraction: this is nested re-used content, but the scope is probably the tightest you could get for an include. Subsequent to affected pages are watching the version string increment as opposed to reviewing 16 separate files.

As I think I implied, I'd welcome this kind of exception to the style guide.

@JTorreG
Copy link
Contributor

JTorreG commented Feb 19, 2025

Question: while I like this idea, I think this looks like "nesting includes," which our style guide suggests we avoid. @travisamartin WDYT?

Ooh, I forgot about this. I think it was largely to avoid situations where skeletons of pages would be built in refraction: this is nested re-used content, but the scope is probably the tightest you could get for an include. Subsequent to affected pages are watching the version string increment as opposed to reviewing 16 separate files.

As I think I implied, I'd welcome this kind of exception to the style guide.

I don't consider a variable shortcode inside an include a nested include, as the real content of the variable can be "guessed" or at least understood without having to open the source file with the actual value.

The issue with nested variables is obfuscating the real content to the point that it's not possible to effectively review the document

@mjang
Copy link
Contributor

mjang commented Feb 19, 2025

To clarify, I've opened #207

@ADubhlaoich ADubhlaoich merged commit 5d129b1 into main Feb 19, 2025
8 checks passed
@ADubhlaoich ADubhlaoich deleted the ngf/create-version-shortcode branch February 19, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a version shortcode for NGINX Gateway Fabric and replace the current hard-coded release versions
4 participants