diff --git a/config/apache/standardebooks.org.conf b/config/apache/standardebooks.org.conf index 794691f0..61aa8120 100644 --- a/config/apache/standardebooks.org.conf +++ b/config/apache/standardebooks.org.conf @@ -71,7 +71,6 @@ Define domain standardebooks.org # Log downloads SetEnvIf Request_URI "\.epub$" logdownload SetEnvIf Request_URI "\.kepub.epub$" logdownload - SetEnvIf Request_URI "\.epub3$" logdownload SetEnvIf Request_URI "\.azw3$" logdownload CustomLog /var/log/local/downloads.log "%h [%{%Y-%m-%d %H:%M:%S %Z}t] \"%r\" %>s %b" env=logdownload DirectorySlash Off @@ -90,7 +89,7 @@ Define domain standardebooks.org CGIPassAuth on - AddType application/epub+zip .epub .epub3 + AddType application/epub+zip .epub AddType application/x-mobi8-ebook .azw3 diff --git a/config/apache/standardebooks.test.conf b/config/apache/standardebooks.test.conf index 12b5dc5c..7addc3ba 100644 --- a/config/apache/standardebooks.test.conf +++ b/config/apache/standardebooks.test.conf @@ -70,7 +70,6 @@ Define domain standardebooks.test # Log downloads SetEnvIf Request_URI "\.epub$" logdownload SetEnvIf Request_URI "\.kepub.epub$" logdownload - SetEnvIf Request_URI "\.epub3$" logdownload SetEnvIf Request_URI "\.azw3$" logdownload CustomLog /var/log/local/downloads.log "%h [%{%Y-%m-%d %H:%M:%S %Z}t] \"%r\" %>s %b" env=logdownload DirectorySlash Off @@ -89,7 +88,7 @@ Define domain standardebooks.test CGIPassAuth on - AddType application/epub+zip .epub .epub3 + AddType application/epub+zip .epub AddType application/x-mobi8-ebook .azw3 diff --git a/lib/Ebook.php b/lib/Ebook.php index 55ad8550..79bb3d4a 100644 --- a/lib/Ebook.php +++ b/lib/Ebook.php @@ -13,7 +13,7 @@ class Ebook{ public $Url; public $KindleCoverUrl; public $EpubUrl; - public $Epub3Url; + public $AdvancedEpubUrl; public $KepubUrl; public $Azw3Url; public $HasDownloads; @@ -97,16 +97,16 @@ class Ebook{ $this->KindleCoverUrl = $this->Url . '/dist/' . basename($tempPath[0]); } - // Generate the epub URL. + // Generate the compatible epub URL. $tempPath = glob($this->WwwFilesystemPath . '/dist/*.epub'); if(sizeof($tempPath) > 0){ $this->EpubUrl = $this->Url . '/dist/' . basename($tempPath[0]); } - // Generate the epub3 URL - $tempPath = glob($this->WwwFilesystemPath . '/dist/*.epub3'); + // Generate the epub URL + $tempPath = glob($this->WwwFilesystemPath . '/dist/*_advanced.epub'); if(sizeof($tempPath) > 0){ - $this->Epub3Url = $this->Url . '/dist/' . basename($tempPath[0]); + $this->AdvancedEpubUrl = $this->Url . '/dist/' . basename($tempPath[0]); } // Generate the Kepub URL @@ -121,7 +121,7 @@ class Ebook{ $this->Azw3Url = $this->Url . '/dist/' . basename($tempPath[0]); } - $this->HasDownloads = $this->EpubUrl || $this->Epub3Url || $this->KepubUrl || $this->Azw3Url; + $this->HasDownloads = $this->EpubUrl || $this->AdvancedEpubUrl || $this->KepubUrl || $this->Azw3Url; $tempPath = glob($this->WwwFilesystemPath . '/dist/cover.jpg'); if(sizeof($tempPath) > 0){ @@ -489,11 +489,11 @@ class Ebook{ $output->encoding[] = $encodingObject; } - if($this->Epub3Url){ + if($this->AdvancedEpubUrl){ $encodingObject = new stdClass(); $encodingObject->{'@type'} = 'MediaObject'; - $encodingObject->encodingFormat = 'epub3'; - $encodingObject->contentUrl = SITE_URL . $this->Epub3Url; + $encodingObject->encodingFormat = 'epub'; + $encodingObject->contentUrl = SITE_URL . $this->AdvancedEpubUrl; $output->encoding[] = $encodingObject; } diff --git a/templates/OpdsAcquisitionEntry.php b/templates/OpdsAcquisitionEntry.php index 64d7989f..fd0fe0aa 100644 --- a/templates/OpdsAcquisitionEntry.php +++ b/templates/OpdsAcquisitionEntry.php @@ -26,7 +26,7 @@ - + diff --git a/www/contribute/producing-an-ebook-step-by-step.php b/www/contribute/producing-an-ebook-step-by-step.php index 2a5bbfb1..6b3a5479 100644 --- a/www/contribute/producing-an-ebook-step-by-step.php +++ b/www/contribute/producing-an-ebook-step-by-step.php @@ -402,10 +402,10 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll

If there are no errors, we’ll see five files in the brand-new ~/dist/ folder in our home directory: