From da5f3cb1f87afcb822f936b8655c697ff64c18dc Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Wed, 6 Sep 2023 10:01:06 +0300 Subject: [PATCH] fix(datasheet): broken links to git / extra docs --- docs/doc_template.md | 4 ++-- documentation.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/doc_template.md b/docs/doc_template.md index c21bd7e..6fc489f 100644 --- a/docs/doc_template.md +++ b/docs/doc_template.md @@ -4,10 +4,10 @@ * Author: {author} * Description: {description} -* [GitHub repository]({git_url}) +* [GitHub repository](__git_url__) * {project_type} project * Mux address: {mux_address} -* [Extra docs]({doc_link}) +* [Extra docs](__doc_link__) * Clock: {clock_hz} Hz * External hardware: {external_hw} diff --git a/documentation.py b/documentation.py index 054628f..6ecaa2f 100644 --- a/documentation.py +++ b/documentation.py @@ -104,7 +104,11 @@ class Docs(): # now build the doc & print it try: - doc = doc_template.format(**yaml_data) + doc = (doc_template + .replace('__git_url__', '{git_url}') + .replace('__doc_link__', '{doc_link}') + .format(**yaml_data) + ) fh.write(doc) fh.write("\n\clearpage\n") except IndexError: