diff --git a/_genonce.sh b/_genonce.sh old mode 100644 new mode 100755 diff --git a/_updatePublisher.bat b/_updatePublisher.bat index a8bf6ee..67aebf5 100644 --- a/_updatePublisher.bat +++ b/_updatePublisher.bat @@ -7,14 +7,15 @@ SET publisher_jar=publisher.jar SET input_cache_path=%CD%\input-cache\ SET skipPrompts=false -set update_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_updatePublisher.bat -set gen_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_genonce.bat -set gencont_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_gencontinuous.bat -set gencont_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_gencontinuous.sh -set gen_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_genonce.sh -set update_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_updatePublisher.sh +SET scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main +SET update_bat_url=%scriptdlroot%/_updatePublisher.bat +SET gen_bat_url=%scriptdlroot%/_genonce.bat +SET gencont_bat_url=%scriptdlroot%/_gencontinuous.bat +SET gencont_sh_url=%scriptdlroot%/_gencontinuous.sh +SET gen_sh_url=%scriptdlroot%/_genonce.sh +SET update_sh_url=%scriptdlroot%/_updatePublisher.sh -IF "%~1"=="/f" SET skipPrompts=true +IF "%~1"=="/f" SET skipPrompts=y ECHO. @@ -65,21 +66,21 @@ IF DEFINED FORCE ( GOTO download ) -IF "%skipPrompts%"=="true" ( - SET create="Y" +IF "%skipPrompts%"=="y" ( + SET create=Y ) ELSE ( SET /p create="Ok? (Y/N) " ) IF /I "%create%"=="Y" ( - ECHO Will place publisher jar here: %input_cache_path%%publisher_jar% + ECHO Will place publisher jar here: %input_cache_path%%publisher_jar% MKDIR "%input_cache_path%" 2> NUL GOTO download ) GOTO done :upgrade -IF "%skipPrompts%"=="true" ( - SET overwrite="Y" +IF "%skipPrompts%"=="y" ( + SET overwrite=Y ) ELSE ( SET /p overwrite="Overwrite %jarlocation%? (Y/N) " ) @@ -132,8 +133,8 @@ GOTO done ECHO. ECHO Updating scripts -IF "%skipPrompts%"=="true" ( - SET updateScripts="Y" +IF "%skipPrompts%"=="y" ( + SET updateScripts=Y ) ELSE ( SET /p updateScripts="Update scripts? (Y/N) " ) @@ -215,4 +216,4 @@ start copy /y "_updatePublisher.new.bat" "_updatePublisher.bat" ^&^& del "_updat IF "%skipPrompts%"=="true" ( PAUSE -} +) diff --git a/_updatePublisher.sh b/_updatePublisher.sh old mode 100644 new mode 100755 index a8d4489..f127f66 --- a/_updatePublisher.sh +++ b/_updatePublisher.sh @@ -1,11 +1,11 @@ -#/bin/bash +#!/bin/bash pubsource=https://github.com/HL7/fhir-ig-publisher/releases/latest/download/ publisher_jar=publisher.jar dlurl=$pubsource$publisher_jar input_cache_path=$PWD/input-cache/ -scriptdlroot=https://raw.githubusercontent.com/FHIR/sample-ig/master +scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main update_bat_url=$scriptdlroot/_updatePublisher.bat gen_bat_url=$scriptdlroot/_genonce.bat gencont_bat_url=$scriptdlroot/_gencontinuous.bat @@ -31,11 +31,7 @@ while [ "$#" -gt 0 ]; do done echo "Checking internet connection" -case "$OSTYPE" in - linux-gnu* ) ping tx.fhir.org -4 -c 1 -w 1000 >/dev/null ;; - darwin* ) ping tx.fhir.org -c 1 >/dev/null ;; - *) echo "unknown: $OSTYPE"; exit 1 ;; -esac +curl -sSf tx.fhir.org > /dev/null if [ $? -ne 0 ] ; then echo "Offline (or the terminology server is down), unable to update. Exiting" diff --git a/input/howto.xml b/input/howto.xml index ed9f127..227cca3 100644 --- a/input/howto.xml +++ b/input/howto.xml @@ -58,12 +58,11 @@ <generation value="markdown"/> - <page> - <nameUrl value="diagrams.html"/> - <title value="Adding diagrams"/> - <generation value="markdown"/> - </page> - + </page> + <page> + <nameUrl value="diagrams.html"/> + <title value="Adding diagrams"/> + <generation value="markdown"/> </page> <page> <nameUrl value="template.html"/> diff --git a/input/includes/menu.xml b/input/includes/menu.xml index 1e06072..64f7b7a 100644 --- a/input/includes/menu.xml +++ b/input/includes/menu.xml @@ -9,6 +9,9 @@ <li> <a href="background.html">Background</a> </li> + <li> + <a href="readingIgs.html">Reading IGs</a> + </li> <li> <a href="tooling.html">IG Tooling</a> </li> @@ -25,6 +28,9 @@ <li> <a href="best-practice.html">IG Best Practices</a> </li> + <li> + <a href="diagrams.html">Adding Diagrams</a> + </li> </ul> </li> <li class="dropdown"> diff --git a/input/pagecontent/diagrams.md b/input/pagecontent/diagrams.md index 406c9e9..749b0e8 100644 --- a/input/pagecontent/diagrams.md +++ b/input/pagecontent/diagrams.md @@ -42,6 +42,7 @@ To include a diagram in a markdown page, after creating the diagram source, we c {% include filename.svg %} ``` {% endraw %} + Where filename is the name of the file that contains the diagram source. Given the way markdown is processed, the text may end up wrapped around the diagram. To resolve this, we can add a `<br clear="all"/>` html tag after inserting the diagram. {% raw %} @@ -52,6 +53,16 @@ Where filename is the name of the file that contains the diagram source. Given t {% endraw %} + +Depending upon your version of Jekyll, you may need to wrap the include tag, to stop it erroneously processing the `<?xml>` declaration at the top of the included `.svg` file. +{% raw %} +``` +{::nomarkdown} +{% include filename.svg %} +{:/} +``` +{% endraw %} + #### **XHTML and markdown** A diagram can be added in an xhtml page by means of a jekyll include tag, possibly wrapped in a figure and with an opptional figure caption: