Skip to content

Commit 985fad8

Browse files
committed
update pdf instructions
1 parent ccc2829 commit 985fad8

File tree

8 files changed

+36
-9
lines changed

8 files changed

+36
-9
lines changed

META-INF/container.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0"?>
2+
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
3+
<rootfiles>
4+
<rootfile full-path="docapis.opf" media-type="application/oebps-package+xml"/>
5+
6+
</rootfiles>
7+
</container>

_config_kindle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: english
2-
media: /Users/tomjoht/projects/learnapidoc/images
2+
media: images
33
format: kindle
44
sidebar: docapis
55

_docs/introduction_to_rest_apis/docapis_formats.md

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ To read the content as PDF, I recommended that you either read the PDF in [Adobe
2323

2424
## Kindle
2525

26-
You can use either MOBI or EPUB formats on Kindle. Although Kindle switched to primarily preferring EPUB, it still supports MOBI, and the MOBI file has a better table of contents from the "Go to" button, so I recommend using MOBI for Kindle.
27-
2826
To read the content on Kindle device:
2927

3028
1. Click the **Kindle (MOBI)** file above. When you do, the MOBI file downloads to your computer.

_includes/course_image.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% if site.format == "kindle" %}<figure>{% if {{include.url}} %}<a target="_blank" class="noExtIcon noCrossRef" href="{{include.url}}">{% endif %}<img class="docimage {% if {{include.size}} %}{{include.size}}{% endif %} {% if {{include.border}} == "true" %}border{% endif %}" src="/Users/tomjoht/projects/learnapidoc/images/{{include.filename}}.{{include.ext_print}}" alt="{{include.alt}}" />{% if {{include.url}} %}</a>{% endif %}{% if {{include.caption}}%}<figcaption>{{include.caption}}</figcaption>{% endif %}</figure>{% elsif site.format == "pdf" %}<figure>{% if {{include.url}} %}<a target="_blank" class="noExtIcon" href="{{include.url}}">{% endif %}<img class="docimage {% if {{include.size}} %}{{include.size}}{% endif %} {% if {{include.border}} == "true" %}border{% endif %}" src="/Users/tomjoht/projects/learnapidoc/images/{{include.filename}}.{{include.ext_web}}" alt="{{include.alt}}" />{% if {{include.url}} %}</a>{% endif %}{% if {{include.caption}}%}<figcaption>{{include.caption}}</figcaption>{% endif %}</figure>{% elsif site.format == "web" %}<figure>{% if {{include.url}} %}<a target="_blank" class="noExtIcon" href="{{include.url}}">{% endif %}<img class="docimage {% if {{include.size}} %}{{include.size}}{% endif %} {% if {{include.border}} == "true" %}border{% endif %}" src="https://s3.us-west-1.wasabisys.com/idbwmedia.com/images/api/{{include.filename}}.{{include.ext_web}}" alt="{{include.alt}}" />{% if {{include.url}} %}</a>{% endif %}{% if {{include.caption}}%}<figcaption>{{include.caption}}</figcaption>{% endif %}</figure>{% endif %}
1+
{% if site.format == "kindle" %}<figure>{% if {{include.url}} %}<a target="_blank" class="noExtIcon noCrossRef" href="{{include.url}}">{% endif %}<img class="docimage {% if {{include.size}} %}{{include.size}}{% endif %} {% if {{include.border}} == "true" %}border{% endif %}" src="images/{{include.filename}}.{{include.ext_print}}" alt="{{include.alt}}" />{% if {{include.url}} %}</a>{% endif %}{% if {{include.caption}}%}<figcaption>{{include.caption}}</figcaption>{% endif %}</figure>{% elsif site.format == "pdf" %}<figure>{% if {{include.url}} %}<a target="_blank" class="noExtIcon" href="{{include.url}}">{% endif %}<img class="docimage {% if {{include.size}} %}{{include.size}}{% endif %} {% if {{include.border}} == "true" %}border{% endif %}" src="/Users/tomjoht/projects/learnapidoc/images/{{include.filename}}.{{include.ext_web}}" alt="{{include.alt}}" />{% if {{include.url}} %}</a>{% endif %}{% if {{include.caption}}%}<figcaption>{{include.caption}}</figcaption>{% endif %}</figure>{% elsif site.format == "web" %}<figure>{% if {{include.url}} %}<a target="_blank" class="noExtIcon" href="{{include.url}}">{% endif %}<img class="docimage {% if {{include.size}} %}{{include.size}}{% endif %} {% if {{include.border}} == "true" %}border{% endif %}" src="https://s3.us-west-1.wasabisys.com/idbwmedia.com/images/api/{{include.filename}}.{{include.ext_web}}" alt="{{include.alt}}" />{% if {{include.url}} %}</a>{% endif %}{% if {{include.caption}}%}<figcaption>{{include.caption}}</figcaption>{% endif %}</figure>{% endif %}

assets/css/pdf/printstyles.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ a[href^="http:"]::after, a[href^="https:"]::after {
5656
content: " (" attr(href) ") ";
5757
}
5858

59-
/* cut this i think*/
59+
/* cut this i think
6060
chapter {
6161
prince-pdf-destination: attr(identifier,string)
62-
}
62+
} */
6363
/* print href link urls after links
6464
a::after{
6565
content: " (" attr(href) ") ";

docapis.opf

+5-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ layout: null
9292
<manifest>
9393
<!-- HTML content files [mandatory] -->
9494
<item id="item_tocstart" media-type="application/xhtml+xml" href="tocstart.html"></item>
95-
95+
<item id="titlepage" href="titlepage.xhtml" media-type="application/xhtml+xml"/>
9696
{% for folder in sidebar %}
9797
<item id="item_{{folder.jurl | remove: "/" | remove: ".html" }}" media-type="application/xhtml+xml" href="{{folder.jurl | remove: "/" }}"></item>
9898
{% for folderitem in folder.folderitems %}
@@ -133,13 +133,15 @@ layout: null
133133
{% endunless %}
134134
{% endfor %}
135135
{% endcomment %}
136-
136+
<!-- stylesheets -->
137+
<item id="css" href="assets/css/kindle.css" media-type="text/css"/>
138+
<item id="css_syntax" href="assets/css/syntax.css" media-type="text/css"/>
137139

138140
<!-- table of contents [mandatory] -->
139141
<item id="My_Table_of_Contents" media-type="application/x-dtbncx+xml" href="docapis.ncx"/>
140142

141143
<!-- cover image [mandatory] -->
142-
<item id="My_Cover" media-type="image/gif" href="images/restapi_kindletitle.png"/>
144+
<item id="My_Cover" media-type="image/png" href="images/restapi_kindletitle.png"/>
143145
</manifest>
144146

145147
<!--

mimetype

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
application/epub+zip

titlepage.xhtml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5+
<meta name="calibre:cover" content="true"/>
6+
<title>Cover</title>
7+
<style type="text/css" title="override_css">
8+
@page {padding: 0pt; margin:0pt}
9+
body { text-align: center; padding:0pt; margin: 0pt; }
10+
</style>
11+
</head>
12+
<body>
13+
<div>
14+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 960 1186" preserveAspectRatio="none">
15+
<image width="960" height="1186" xlink:href="images/restapi_kindletitle.png"/>
16+
</svg>
17+
</div>
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)