From e4c6f79d5caacf972b6cab24b0b18ddb7c7575c7 Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Thu, 11 Apr 2024 08:52:57 +0200
Subject: [PATCH] Bumped version

---
 build-docs.sh    | 14 ++++----------
 mkdocs.yml       | 13 ++++++++++---
 requirements.txt |  5 +++--
 3 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/build-docs.sh b/build-docs.sh
index 15a81eb54c..bd0001c1ea 100644
--- a/build-docs.sh
+++ b/build-docs.sh
@@ -1,7 +1,6 @@
 #!/bin/bash
 
-OVERRIDES_MAIN_HTML=""
-SCRIPTS_EXTRA_JS=""
+VERSIONS_JSON=""
 
 function clean_cache {
   echo "Removing cache from directory ./site ./lib/python/docs/build"
@@ -32,18 +31,13 @@ function generate_docs {
   pip install -r ./requirements.txt > /dev/null
   mkdir -p ./final
   if [ "$1" = "latest" ]; then
-    OVERRIDES_MAIN_HTML=$(cat .docs/overrides/main.html)
-    sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" .docs/scripts/extra.js
-    SCRIPTS_EXTRA_JS=$(cat .docs/scripts/extra.js)
-  else
-    echo $OVERRIDES_MAIN_HTML > .docs/overrides/main.html
-    mkdir -p .docs/scripts
-    echo $SCRIPTS_EXTRA_JS > .docs/scripts/extra.js
+    VERSIONS_JSON=$(cat ./versions.json)
   fi
   find .docs/ -type f -exec sed -i -e "s/__APPVERSION__/$1/g" {} \;
   find .docs/ -type f -exec sed -i -e "s/__CHARTVERSION__/$1/g" {} \;
-  mkdocs build > /dev/null && cp -r ./site "./final/$1"
+  mike deploy $1 && cp -r ./site "./final/$1"
   cp -r "./swagger/$1" "./final/$1/swagger"
+  echo $VERSIONS_JSON > "./final/$1/versions.json"
   clean_cache
 }
 
diff --git a/mkdocs.yml b/mkdocs.yml
index d669b11c54..5bc175d43d 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -43,9 +43,7 @@ nav:
   - publications.md
   - contact.md
 extra_css:
-  - stylesheets/extra.css
-extra_javascript:
-  - scripts/extra.js
+  - stylesheets/custom.css
 theme:
   favicon: images/signet_white.png
   custom_dir: .docs/overrides
@@ -104,6 +102,15 @@ markdown_extensions:
           - .docs/overrides/.icons
 extra:
   homepage: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/
+  version:
+    default: 1.4.2
+    provider: mike
   social:
+    - icon: simple/artifacthub
+      link: https://artifacthub.io/packages/helm/dbrepo/dbrepo
+    - icon: fontawesome/brands/docker
+      link: https://hub.docker.com/search?q=dbrepo
+    - icon: fontawesome/brands/python
+      link: https://pypi.org/project/dbrepo/
     - icon: fontawesome/brands/gitlab
       link: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
diff --git a/requirements.txt b/requirements.txt
index 6bfd02cb23..6442ea6075 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 mkdocs==1.5.3
-mkdocs-material==9.5.5
+mkdocs-material==9.5.17
 mkdocs-with-pdf==0.9.3
 mkdocs-material-extensions>=1.0.3
 requests>=2.27.0
@@ -13,4 +13,5 @@ furo==2024.1.29
 requests==2.31.0
 pika==1.3.2
 pydantic==2.6.4
-tuspy==1.0.3
\ No newline at end of file
+tuspy==1.0.3
+mike==2.0.0
\ No newline at end of file
-- 
GitLab