Skip to content

Commit

Permalink
Merge branch 'main' into add-update-changelog-script
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll authored Dec 21, 2023
2 parents cfe4b41 + 18aebd7 commit b5f5741
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/_docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
platform: [
# build-push action and qemu use different platform names
# therefore we create a map
{ qemu: "", docker: "linux/amd64" },
{ qemu: "arm64", docker: "linux/arm64" },
{ name: "amd64", qemu: "", docker: "linux/amd64" },
{ name: "arm64", qemu: "arm64", docker: "linux/arm64" },
]
steps:
- name: Create build id
Expand Down Expand Up @@ -98,9 +98,9 @@ jobs:
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: digests-${{ steps.build-id.outputs.id }}
name: digests-${{ steps.build-id.outputs.id }}-${{ matrix.platform.name }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Expand All @@ -116,8 +116,9 @@ jobs:
- name: Download digests
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: digests-${{ needs.build.outputs.build-id }}
pattern: digests-${{ needs.build.outputs.build-id }}-*
path: /tmp/digests
merge-multiple: true

- name: Docker meta
id: meta
Expand Down
28 changes: 27 additions & 1 deletion doc/source/_templates/sidebar/versioning.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,40 @@
}
</style>

<script>
function checkPageExistence(versionName, current_language, pagename) {
var newUrl = `https://flower.dev/docs/framework/${versionName}/${current_language}/${pagename}.html`;
var fallbackUrl = `https://flower.dev/docs/framework/${versionName}/${current_language}/index.html#references`;

fetch(newUrl)
.then(response => {
if (response.ok) {
window.location.href = newUrl;
} else {
window.location.href = fallbackUrl;
}
})
.catch(error => {
console.error('Error:', error);
window.location.href = fallbackUrl;
});
}
</script>

<div class="wrap-collabsible">
<input id="collapsible" class="toggle" type="checkbox">
<label for="collapsible" class="lbl-toggle">Versions</label>
<div class="collapsible-content">
<div class="content-inner">
<ul>
{%- for item in versions %}
<li><a href="https://flower.dev/docs/framework/{{ item.name }}/{{ current_language }}/{{ pagename }}.html" style="text-decoration:none">{{ item.name }}</a></li>
<li>
<a href="javascript:void(0);"
onclick="checkPageExistence('{{ item.name }}', '{{ current_language }}', '{{ pagename }}')"
style="text-decoration:none">
{{ item.name }}
</a>
</li>
{%- endfor %}
</ul>
</div>
Expand Down

0 comments on commit b5f5741

Please sign in to comment.