diff --git a/lib/Constants.php b/lib/Constants.php index 6a3602b4..95086f9b 100644 --- a/lib/Constants.php +++ b/lib/Constants.php @@ -29,9 +29,11 @@ const AVERAGE_READING_WORDS_PER_MINUTE = 275; // No trailing slash on any of the below constants. const SITE_URL = 'https://standardebooks.org'; const SITE_ROOT = '/standardebooks.org'; -const TEMPLATES_PATH = SITE_ROOT . '/web/templates'; +const WEB_ROOT = SITE_ROOT . '/web/www'; const REPOS_PATH = SITE_ROOT . '/ebooks'; -const EBOOKS_DIST_PATH = SITE_ROOT . '/web/www/ebooks/'; +const TEMPLATES_PATH = SITE_ROOT . '/web/templates'; +const MANUAL_PATH = WEB_ROOT . '/manual'; +const EBOOKS_DIST_PATH = WEB_ROOT . '/ebooks/'; const GITHUB_SECRET_FILE_PATH = SITE_ROOT . '/config/secrets/se-vcs-bot@github.com'; // Set in the GitHub organization global webhook settings. const GITHUB_WEBHOOK_LOG_FILE_PATH = '/var/log/local/webhooks-github.log'; // Must be writable by `www-data` Unix user. diff --git a/lib/Ebook.php b/lib/Ebook.php index 0663d7d2..9ddf165a 100644 --- a/lib/Ebook.php +++ b/lib/Ebook.php @@ -72,7 +72,7 @@ class Ebook{ } $this->WwwFilesystemPath = $wwwFilesystemPath; - $this->Url = str_replace(SITE_ROOT . '/web/www', '', $this->WwwFilesystemPath); + $this->Url = str_replace(WEB_ROOT, '', $this->WwwFilesystemPath); $rawMetadata = file_get_contents($wwwFilesystemPath . '/src/epub/content.opf') ?: ''; diff --git a/www/ebooks/author.php b/www/ebooks/author.php index 20f19d34..3812aac8 100644 --- a/www/ebooks/author.php +++ b/www/ebooks/author.php @@ -18,7 +18,7 @@ try{ } catch(\Exception $ex){ http_response_code(404); - include(SITE_ROOT . '/web/www/404.php'); + include(WEB_ROOT . '/404.php'); exit(); } ?> 'Ebooks by ' . strip_tags($ebooks[0]->AuthorsHtml), 'highlight' => 'ebooks', 'description' => 'All of the Standard Ebooks ebooks by ' . strip_tags($ebooks[0]->AuthorsHtml)]) ?> diff --git a/www/ebooks/ebook.php b/www/ebooks/ebook.php index 71ce9d55..a005b2d7 100644 --- a/www/ebooks/ebook.php +++ b/www/ebooks/ebook.php @@ -57,7 +57,7 @@ catch(SeeOtherEbookException $ex){ } catch(\Exception $ex){ http_response_code(404); - include(SITE_ROOT . '/web/www/404.php'); + include(WEB_ROOT . '/404.php'); exit(); } ?> strip_tags($ebook->TitleWithCreditsHtml), 'ogType' => 'book', 'coverUrl' => $ebook->DistCoverUrl, 'highlight' => 'ebooks', 'description' => 'The Standard Ebooks edition of ' . $ebook->Title . ': ' . $ebook->Description, 'jsonld' => $ebook->GenerateJsonLd()]) ?> diff --git a/www/ebooks/index.php b/www/ebooks/index.php index efc36bf0..6248eac1 100644 --- a/www/ebooks/index.php +++ b/www/ebooks/index.php @@ -86,7 +86,7 @@ try{ } catch(\Exception $ex){ http_response_code(404); - include(SITE_ROOT . '/web/www/404.php'); + include(WEB_ROOT . '/404.php'); exit(); } ?> $pageTitle, 'highlight' => 'ebooks', 'description' => $pageDescription]) ?>