mirror of
https://github.com/dokku/dokku.git
synced 2025-12-16 12:07:45 +01:00
fix: add latest alias to latest docs
This commit is contained in:
@@ -32,9 +32,6 @@ main() {
|
|||||||
sed -i.bak "s/{{NAME}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak
|
sed -i.bak "s/{{NAME}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak
|
||||||
sed -i.bak 's/="\/docs\/"/="\/"/g' tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak
|
sed -i.bak 's/="\/docs\/"/="\/"/g' tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak
|
||||||
|
|
||||||
jq '. += [{"title": "latest", "version": "docs", "aliases": []}]' tmp/docs-build/versions.json > tmp/docs-build/versions.json.bak
|
|
||||||
mv tmp/docs-build/versions.json.bak tmp/docs-build/versions.json
|
|
||||||
|
|
||||||
jq -C -r '.["max-versions"][]' docs-main/assets/versions.json | while read -r current_version; do
|
jq -C -r '.["max-versions"][]' docs-main/assets/versions.json | while read -r current_version; do
|
||||||
major="$(echo "$current_version" | cut -d'.' -f1)"
|
major="$(echo "$current_version" | cut -d'.' -f1)"
|
||||||
minor="$(echo "$current_version" | cut -d'.' -f2)"
|
minor="$(echo "$current_version" | cut -d'.' -f2)"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ def main():
|
|||||||
versions.sort(key=lambda x: list(map(int, x.split('.'))), reverse=True)
|
versions.sort(key=lambda x: list(map(int, x.split('.'))), reverse=True)
|
||||||
data = [
|
data = [
|
||||||
{
|
{
|
||||||
"aliases": [],
|
"aliases": ["latest"],
|
||||||
"title": "latest",
|
"title": "latest",
|
||||||
"version": "docs",
|
"version": "docs",
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user