From 6552b90959078ac793247090a566f9838158b13d Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 11 Oct 2021 20:16:47 +1100 Subject: [PATCH] Fix assets directory --- _includes/img.html | 6 +++--- docs/hooks.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_includes/img.html b/_includes/img.html index b1ea4f3..9d0983c 100644 --- a/_includes/img.html +++ b/_includes/img.html @@ -1,5 +1,5 @@ {% if 'http' in url %} -{% set doc_url = url %} +{% set img_url = url %} {% else %} {% set img_url = config.assets_dir + '/images/' + url %} {% endif %} @@ -8,7 +8,7 @@ {% if id %} - {% elif doc_url %} + {% elif img_url %} {% endif %} {{ description }} - {% if id or doc_url %} + {% if id or img_url %} {% endif %} diff --git a/docs/hooks.py b/docs/hooks.py index 29d97a8..701e941 100644 --- a/docs/hooks.py +++ b/docs/hooks.py @@ -32,7 +32,7 @@ def on_config(config, *args, **kwargs): rtd_language = os.environ['READTHEDOCS_LANGUAGE'] site_url = f"https://inventree.readthedocs.io/{rtd_language}/{rtd_version}" - assets_dir = f"/{rtd_language}/{rtd_version}" + assets_dir = f"/{rtd_language}/{rtd_version}/assets" print("Building within READTHEDOCS environment!") print(f" - Version: {rtd_version}")