Skip to content

Commit

Permalink
Merge pull request #337 from autocrypt/favicon
Browse files Browse the repository at this point in the history
Generate favicon on travis
  • Loading branch information
hpk42 committed Jan 12, 2018
2 parents dc7a355 + 30f1036 commit 257a60e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ addons:
- texlive-latex-extra
- latexmk
- inkscape
- imagemagick

install:
- pip install sphinx
Expand Down
17 changes: 9 additions & 8 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ clean:
rm -f $(PDFs)

.PHONY: html
html:
html: favicon
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
Expand Down Expand Up @@ -241,11 +241,12 @@ dummy:
@echo "Build finished. Dummy builder generates no files."

.PHONY: favicon
favicon: html
convert images/autocrypt_logo_alone_orig.png -resize 256x256 -transparent white /tmp/favicon-256.png
convert /tmp/favicon-256.png -resize 16x16 /tmp/favicon-16.png
convert /tmp/favicon-256.png -resize 32x32 /tmp/favicon-32.png
convert /tmp/favicon-256.png -resize 64x64 /tmp/favicon-64.png
convert /tmp/favicon-256.png -resize 128x128 /tmp/favicon-128.png
convert /tmp/favicon-16.png /tmp/favicon-32.png /tmp/favicon-64.png /tmp/favicon-128.png /tmp/favicon-256.png -colors 256 $(BUILDDIR)/html/favicon.ico
favicon:
mkdir -p $(BUILDDIR)/html
convert.im6 images/autocrypt_logo_alone_orig.png -resize 256x256 -transparent white /tmp/favicon-256.png
convert.im6 /tmp/favicon-256.png -resize 16x16 /tmp/favicon-16.png
convert.im6 /tmp/favicon-256.png -resize 32x32 /tmp/favicon-32.png
convert.im6 /tmp/favicon-256.png -resize 64x64 /tmp/favicon-64.png
convert.im6 /tmp/favicon-256.png -resize 128x128 /tmp/favicon-128.png
convert.im6 /tmp/favicon-16.png /tmp/favicon-32.png /tmp/favicon-64.png /tmp/favicon-128.png /tmp/favicon-256.png -colors 256 $(BUILDDIR)/html/favicon.ico
rm -f /tmp/favicon-16.png /tmp/favicon-32.png /tmp/favicon-64.png /tmp/favicon-128.png /tmp/favicon-256.png
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = None
html_favicon = '_build/html/favicon.ico'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down

0 comments on commit 257a60e

Please sign in to comment.