summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-06-11 19:57:24 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-06-11 20:00:59 +0200
commit0d158900b4e8db7eac6d84e46e0955456351c9f7 (patch)
tree23e0c814b82d51409d6afec9afc541a65796ec04 /doc
parent56c566a31ba621aaf7ec38b9c9301c50849d17ab (diff)
docfx: Only add media files in use to the final docs
The setup script copied ALL media files, but only the C# tutorials and guides. A lot of space can be saved in the generated _site folder if only the media files relevant to C# are copied.
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/docfx/setup.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/docfx/setup.sh b/doc/docfx/setup.sh
index 3cf9d60e3b..b166516fd5 100755
--- a/doc/docfx/setup.sh
+++ b/doc/docfx/setup.sh
@@ -50,10 +50,12 @@ find articles/www-content/pages/develop/tutorials -name "start.md.txt" -exec rm
50find articles/www-content/pages/develop/guides -name "start.md.txt" -exec rm {} \; 50find articles/www-content/pages/develop/guides -name "start.md.txt" -exec rm {} \;
51# Remove the trailing .txt from filenames (DocFX wants only the .md) 51# Remove the trailing .txt from filenames (DocFX wants only the .md)
52for f in `find articles -name "*.md.txt"`; do mv $f $(echo $f | rev | cut -c5- | rev) ; done 52for f in `find articles -name "*.md.txt"`; do mv $f $(echo $f | rev | cut -c5- | rev) ; done
53# Copy all media files to the images folder 53# Copy all media files currently in use to the images folder
54rm -rf images 54rm -rf images
55mkdir images 55mkdir images
56cp -r www-content/media/* images 56cd www-content/media
57for f in `find ../../articles -name "*.md" | xargs grep -Poh '(?<=/_media/)[^)]*'`; do cp -f --parents $f ../../images; done
58cd ../..
57# Remove git clone now that we have everything we wanted 59# Remove git clone now that we have everything we wanted
58rm -rf www-content 60rm -rf www-content
59 61