Skip to content

Commit b2e7fae

Browse files
committed
Restore mobi target
1 parent ac25fd1 commit b2e7fae

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CHAPTERS := $(basename $(shell ls [0-9][0-9]_*.md) .md)
22

33
SVGS := $(wildcard img/*.svg)
44

5-
all: html book.pdf book_mobile.pdf book.epub
5+
all: html book.pdf book_mobile.pdf book.epub book.mobi
66

77
html: $(foreach CHAP,$(CHAPTERS),html/$(CHAP).html) html/js/acorn_codemirror.js \
88
code/skillsharing.zip code/solutions/20_3_a_public_space_on_the_web.zip html/js/chapter_info.js
@@ -75,3 +75,6 @@ epub/hints.xhtml: $(foreach CHAP,$(CHAPTERS),$(CHAP).md) src/extract_hints.js sr
7575

7676
epubcheck: book.epub
7777
epubcheck book.epub 2>&1 | grep -v 'img/.*\.svg'
78+
79+
book.mobi: book.epub img/cover.jpg
80+
ebook-convert book.epub book.mobi --output-profile=kindle --cover=img/cover.jpg --remove-first-image

html/Eloquent_JavaScript.mobi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../book.mobi

html/index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,11 @@ <h2>Other pages</h2>
110110
<li><a href="code">Code sandbox and exercise solutions</a></li>
111111
<li><a href="errata.html">Errata for the paper book</a></li>
112112
<li><a href="Eloquent_JavaScript.pdf">This book as a single PDF file</a> (&amp; <a href="Eloquent_JavaScript_small.pdf">small version for mobile</a>)</li>
113-
<li><a href="http://eloquentjavascript.net/Eloquent_JavaScript.epub">This book as an EPUB file</a></li>
114-
<!--
115-
<li><a href="http://eloquentjavascript.net/Eloquent_JavaScript.mobi">This book as a MOBI (Kindle) file</a></li>
116-
-->
113+
<li><a href="https://eloquentjavascript.net/Eloquent_JavaScript.epub">This book as an EPUB file</a></li>
114+
<li><a href="https://eloquentjavascript.net/Eloquent_JavaScript.mobi">This book as a MOBI (Kindle) file</a></li>
117115
<li><a href="https://gitter.im/Eloquent-JavaScript/Lobby">Community chat for readers</a></li>
118-
<li><a href="http://eloquentjavascript.net/1st_edition">The first edition of the book</a></li>
119-
<li><a href="http://eloquentjavascript.net/2nd_edition">The second edition of the book</a></li>
116+
<li><a href="https://eloquentjavascript.net/1st_edition">The first edition of the book</a></li>
117+
<li><a href="https://eloquentjavascript.net/2nd_edition">The second edition of the book</a></li>
120118
</ul>
121119

122120
<h2>Translations of the second edition</h2>

0 commit comments

Comments
 (0)