Skip to content

Commit

Permalink
feat: add currentversion variable in docs index (#4)
Browse files Browse the repository at this point in the history

Signed-off-by: realanna <[email protected]>
  • Loading branch information
RealAnna authored Jun 19, 2023
1 parent 7e0be2d commit 9b277e0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ jobs:
run: |
cp -R ./docs/content/en/docs/. "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.name}}"
echo "${{ inputs.tag_name }}" > "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.name}}/version"
sed -i 's/cascade:/cascade:\n currentversion:${{ inputs.tag_name }}/g' "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.name}}/_index.md"
- name: Push content
if: ${{ inputs.dry_run != true }}
uses: EndBug/add-and-commit@v9
Expand Down
1 change: 1 addition & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ IgnoreDirs:
IgnoreURLs:
- "linkedin.com"
- "localhost"
- "twitter.com"
StripQueryString: false
11 changes: 11 additions & 0 deletions layouts/shortcodes/embed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

{{ $u := printf "%s%s/%s" "https://raw.githubusercontent.com/keptn/lifecycle-toolkit/" (.Page.Params.currentversion) (.Get "path") }}
{{ with resources.GetRemote $u }}
{{ with .Err }}
{{ errorf "%s" . }}
{{ else }}
{{- highlight (.Content | htmlUnescape | safeHTML ) "yaml" -}}
{{ end }}
{{ else }}
{{ errorf "Unable to get remote resource." }}
{{ end }}

0 comments on commit 9b277e0

Please sign in to comment.