From 762adfcd21c71c6260c7e99ad717ac41fbbd6710 Mon Sep 17 00:00:00 2001
From: Deepak Khatri <lorforlinux@beagleboard.org>
Date: Sat, 30 Mar 2024 00:15:02 +0530
Subject: [PATCH] WIP: fix OSHW image src

---
 _templates/oshw.html | 6 +++++-
 conf.py              | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/_templates/oshw.html b/_templates/oshw.html
index 1ecd4865..8d7364f6 100644
--- a/_templates/oshw.html
+++ b/_templates/oshw.html
@@ -7,7 +7,11 @@
       <div class="card-body">
         <p class="card-text text-dark">
             <a href="https://certification.oshwa.org/{{ oshw_id|lower }}.html" target="_blank">
-              <img src="{{docs_url}}/_static/images/oshw/{{board}}_{{path}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/>
+              {% if pages_slug %}
+                <img src="../../../../{{pages_slug}}/_static/images/oshw/{{board}}_{{path | replace('/', '#')}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/>
+              {% else %}
+                <img src="../../../../_static/images/oshw/{{board}}_{{path | replace('/', '#')}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/>
+              {% endif %}
             </a>
         </p>
       </div>
diff --git a/conf.py b/conf.py
index 5fadb5d8..15876aee 100644
--- a/conf.py
+++ b/conf.py
@@ -225,7 +225,7 @@ release = version
 
 # Variables here holds default settings
 pages_url = "https://docs.beagleboard.io"
-pages_slug = "latest"
+pages_slug = ""
 gitlab_user = "docs"
 gitlab_version = "main"
 gitlab_url = "https://openbeagle.org"
-- 
GitLab