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

Make script path dynamic and related to the page path #1472

Merged
merged 1 commit into from
Mar 4, 2022
Merged

Make script path dynamic and related to the page path #1472

merged 1 commit into from
Mar 4, 2022

Conversation

spring1843
Copy link
Contributor

…either release version or preview

1. Issue, if available:

2. Description of changes:
This will change the behavior where the scripts are being read from the preview directory, and instead use the release directory that comes from the path of the page, for example for the preview version it will read from ./website/content/en/preview/... and for v0.6.4 it will read from ./website/content/en/v0.6.4/....

This allows us to manage the scripts of each version independently should we need to.

3. How was this change tested?

4. Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: link to issue
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@netlify
Copy link

netlify bot commented Mar 4, 2022

✔️ Deploy Preview for karpenter-docs-prod ready!

🔨 Explore the source changes: c3513a0

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/62228d9ae7f13e0007ec19ae

😎 Browse the preview: https://deploy-preview-1472--karpenter-docs-prod.netlify.app

@spring1843 spring1843 changed the title Make script path dynamic and related to the page path, ends up being … Make script path dynamic and related to the page path Mar 4, 2022
@@ -1,3 +1,5 @@
{{ $file := .Get "file" | readFile }}
{{ $file := .Get "file" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool! Can we call this file version.html?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The name of the files corresponds to the shortcode tag, e.g. {{% script file="... so if we change the name of the file we will have to use {{% version which would be a bit confusing.

Copy link
Contributor

Choose a reason for hiding this comment

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

ahhh gotcha.

@ellistarn ellistarn merged commit 606c24e into aws:main Mar 4, 2022
@spring1843 spring1843 deleted the rm/link-to-scripts-in-same-release branch March 25, 2022 18:34
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.

2 participants