From 4f62eaec1a46a514dcfbb5903d2f7c9dddcfba9e Mon Sep 17 00:00:00 2001 From: obijuan Date: Mon, 2 Aug 2021 11:09:14 +0200 Subject: [PATCH] Wiki url is added as a link to the heather image --- icm/commands/cmd_update.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/icm/commands/cmd_update.py b/icm/commands/cmd_update.py index cc5528c..42c8e1d 100644 --- a/icm/commands/cmd_update.py +++ b/icm/commands/cmd_update.py @@ -201,7 +201,20 @@ def _create_header(package): # -- Get the header image if package.get("header"): file = package["header"] - data += f"![]({file})\n" + + # -- If there is a wiki page defined, the heather images is linked + # -- to the wiki + if package.get("wiki"): + + # -- Get the wiki URL + url = package["wiki"] + + # --- Add the image + link + data += f"[![]({file})]({url})\n" + + # -- No wiki: Just place the heather image + else: + data += f"![]({file})\n" return data