diff --git a/documentation/asciidoc/services/connect/use.adoc b/documentation/asciidoc/services/connect/use.adoc index 4913484ab..8217fea48 100644 --- a/documentation/asciidoc/services/connect/use.adoc +++ b/documentation/asciidoc/services/connect/use.adoc @@ -103,7 +103,7 @@ image::images/screen-sharing-end.png[width="80%"] To turn off screen sharing, click the Connect system tray icon and unselect **Allow screen sharing**. Your Raspberry Pi remains signed into Connect, but you won't be able to create a screen sharing session from the Connect dashboard. -image:images/screen-sharing-disabled-desktop.png[width="80%"] +image::images/screen-sharing-disabled-desktop.png[width="80%"] Alternatively, you can disable screen sharing with the following command: @@ -168,7 +168,7 @@ image::images/remote-shell-end.png[width="80%"] To turn off remote shell access, click the Connect system tray icon and unselect **Allow remote shell**. Your Raspberry Pi remains signed into Connect, but you won't be able to create a remote shell session from the Connect dashboard. -image:images/remote-shell-disabled-desktop.png[width="80%"] +image::images/remote-shell-disabled-desktop.png[width="80%"] Alternatively, you can disable remote shell access with the following command: diff --git a/scripts/create_build_adoc.py b/scripts/create_build_adoc.py index da5d29314..536446645 100755 --- a/scripts/create_build_adoc.py +++ b/scripts/create_build_adoc.py @@ -21,7 +21,6 @@ def check_no_markdown(filename): if re.search(r'(\[.+?\]\(.+?\))', asciidoc): raise Exception("{} contains a Markdown-style link (i.e. '[title](url)' rather than 'url[title]')".format(filename)) - if __name__ == "__main__": index_json = sys.argv[1] config_yaml = sys.argv[2] @@ -72,6 +71,12 @@ def check_no_markdown(filename): m = re.match(r'^(include::)(.+)(\[\]\n?)$', line) if m: line = m.group(1) + os.path.join('{includedir}/{parentdir}', m.group(2)) + m.group(3) + # find all image references, append md5 hash at end to bust the cache if we change the image + m = re.match(r'^(image::)(.+)(\[(.+)]\n?)$', line) + if m: + directory = os.path.dirname(os.path.abspath(src_adoc)) + image_hash = hashlib.md5(open(os.path.join(directory, m.group(2)),'rb').read()).hexdigest() + line = m.group(1) + m.group(2) + '?hash=' + image_hash + m.group(3) + "\n" new_contents += line with open(build_adoc, 'w') as out_fh: diff --git a/scripts/create_build_adoc_include.py b/scripts/create_build_adoc_include.py index ab7c3c0cf..52227ebce 100755 --- a/scripts/create_build_adoc_include.py +++ b/scripts/create_build_adoc_include.py @@ -4,6 +4,7 @@ import os import re import yaml +import hashlib def check_no_markdown(filename): @@ -48,6 +49,13 @@ def check_no_markdown(filename): seen_header = True if github_edit is not None: line += edit_text + "\n\n" + else: + # find all image references, append md5 hash at end to bust the cache if we change the image + m = re.match(r'^(image::)(.+)(\[(.+)]\n?)$', line) + if m: + directory = os.path.dirname(os.path.abspath(src_adoc)) + image_hash = hashlib.md5(open(os.path.join(directory, m.group(2)),'rb').read()).hexdigest() + line = m.group(1) + m.group(2) + '?hash=' + image_hash + m.group(3) + "\n" new_contents += line with open(build_adoc, 'w') as out_fh: