summaryrefslogtreecommitdiffstats
path: root/docs/enable_docu_gen.rst
diff options
context:
space:
mode:
authorVictor Laza <vlaza@cloudbasesolutions.com>2015-04-28 11:46:50 +0300
committerVictor Laza <vlaza@cloudbasesolutions.com>2015-04-28 11:50:44 +0300
commit1c1056b9af2bc5d7822d061a57f4539db2baea2c (patch)
tree41812ee4828cf2e21d2c435daced4cfb47bfae26 /docs/enable_docu_gen.rst
parent0033450ebab23b7939e6af3d23d4e5fab6da27d4 (diff)
Updated docs/enable_docu_gen.rst with latest image include code
JIRA: Updated docs/enable_docu_gen.rst with latest image include code that will make visible images in .html artifacts also Change-Id: Ie2938a1feeb815ddf51cafb53c96df3690ec6f4c Signed-off-by: Victor Laza <vlaza@cloudbasesolutions.com>
Diffstat (limited to 'docs/enable_docu_gen.rst')
-rw-r--r--docs/enable_docu_gen.rst35
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/enable_docu_gen.rst b/docs/enable_docu_gen.rst
index d36dba331..8dd1c02fc 100644
--- a/docs/enable_docu_gen.rst
+++ b/docs/enable_docu_gen.rst
@@ -129,6 +129,27 @@ example: cp releng/jjb/opnfvdocs/build-docu.sh releng/jjb/<your-project>/::
done
+ images=()
+ while read -r -d ''; do
+ images+=("$REPLY")
+ done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0)
+
+ for img in "${{images[@]}}"; do
+
+ # uploading found images
+ echo "uploading $img"
+ cat "$img" | gsutil cp -L gsoutput.txt - \
+ gs://artifacts.opnfv.org/"$project"/"$img"
+ gsutil setmeta -h "Content-Type:image/jpeg" \
+ -h "Cache-Control:private, max-age=0, no-transform" \
+ gs://artifacts.opnfv.org/"$project"/"$img"
+ cat gsoutput.txt
+ rm -f gsoutput.txt
+
+ done
+
+
+
#the double {{ in file_cut="${{file%.*}}" is to escape jjb's yaml
@@ -232,6 +253,20 @@ You must include at the bottom of every document that you want to track the foll
# add one "_" at the end of each trigger variable (they have also a prefix "_") when inserting them into documents to enable auto-replacement
+**Image inclusion for artifacts**
+
+Create a folder called images in the same folder where you documentation resides and copy .jpg or .png files there, according to the guide here: https://wiki.opnfv.org/documentation
+
+Here is an example of what you need to include in the .rst files to include an image::
+
+ .. image:: images/smiley.png
+ :height: 200
+ :width: 200
+ :alt: Just a smiley face!
+ :align: left
+
+The image will be shown in both .html and .pdf resulting artifacts.
+
NOTE:
------