forked from neo4j-documentation/developer-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.sh
More file actions
executable file
·23 lines (20 loc) · 729 Bytes
/
render.sh
File metadata and controls
executable file
·23 lines (20 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export GITHUB=https://github.com/neo4j-contrib/developer-resources/tree/gh-pages
export MANUAL=http://neo4j.com/docs/stable
function render {
file="$1"
to=${file%/*}/index.html
echo "Rendering $file to $to"
asciidoctor -a source-highlighter=codemirror -a linkattrs -a img=./ -a manual="${MANUAL}" -a github="${GITHUB}" -T _templates $file -o $to 2>&1 | grep -v "out of sequence"
sed -e 's/\/developer\//\/developer-resources\//g' $to > /tmp/render.html
mv /tmp/render.html $to
}
if [ "$1" != "" ]; then
render "$1"
else
for file in `find . -mindepth 2 -maxdepth 3 -name "*.adoc"`; do
render "$file"
done
fi
#git add .
#git commit -m "content-update for github-pages"
#git push origin gh-pages