Skip to content

Commit

Permalink
Fix Images path
Browse files Browse the repository at this point in the history
- for pdf, ./images
- for html, ./site/images
  • Loading branch information
hirotnk authored and happi committed Apr 22, 2020
1 parent e06a7fc commit 9f02857
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ beam-book.pdf: xml/beam-book-from-ab.xml

### Experimental pdf command
beam-book2.pdf: chapters/opcodes_doc.asciidoc book.asciidoc chapters/*.asciidoc chapters/contributors.txt
cp -r images/*.png site/images
asciidoctor-pdf -r ./style/custom-pdf-converter.rb -r asciidoctor-diagram -r ./style/custom-admonition-block.rb -a config=./style/ditaa.cfg --doctype book -a media=prepress -a pdf-style=./style/pdf-theme.yml book.asciidoc -o $@

index.html:
cp -r images site
asciidoctor -r asciidoctor-diagram -r ./style/custom-admonition-block.rb -a config=style/ditaa.cfg --backend=html5 --doctype=book -o site/index.html book.asciidoc --trace
cp -r images/*.png site/images
rsync -R code/*/*.png site

code/book/ebin/generate_op_doc.beam: code/book/src/generate_op_doc.erl
erlc -o $(dir $@) $<
Expand All @@ -33,5 +33,5 @@ genop.tab:
touch $@

clean:
rm -f beam-book.pdf site/index.html site/*.png site/*.md5 xml/*.png xml/*.md5 xml/beam-book-from-ab.xml
rm -f beam-book2.pdf site/images/*.png
rm -f beam-book.pdf site/index.html site/*.png site/*.md5 xml/*.png xml/*.md5 xml/beam-book-from-ab.xml ./images/diag-*.png
rm -fdr beam-book2.pdf site/images site/code
3 changes: 2 additions & 1 deletion book.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
:sectlinks:
:!compat-mode:
:source-highlighter: rouge
:imagesdir: site/images
:imagesdir: images
:ditaa-shadows: false
:ditaa-transparent: true
:attribute-missing: warn

include::chapters/preface.asciidoc[]

Expand Down

0 comments on commit 9f02857

Please sign in to comment.