@cryptotaxi247 / netdata-1 / commits / 9ead7a2ea

Make integration links absolute (#18851)

make integration links absolute

Fotis Voutsas committed Oct 23, 2024 at 11:10 UTC 9ead7a2ea471e422f8461b2fcbb9a4271cb0c23e
1 file changed +5
integrations/gen_integrations.py
+5
@@ -963,12 +963,17 @@ def render_authentications(categories, authentications, ids):
963 return authentications, clean_authentications, ids
964
965
966 +def convert_local_links(text, prefix):
967 + return text.replace("](/", f"]({prefix}/")
968 +
969 +
970 def render_integrations(categories, integrations):
971 template = get_jinja_env().get_template('integrations.js')
972 data = template.render(
973 categories=json.dumps(categories, indent=4),
974 integrations=json.dumps(integrations, indent=4),
975 )
976 + data = convert_local_links(data, "https://github.com/netdata/netdata/blob/master")
977 OUTPUT_PATH.write_text(data)
978
979