diff --git a/book-to-static.php b/book-to-static.php index c72df43..8db3d72 100644 --- a/book-to-static.php +++ b/book-to-static.php @@ -7,6 +7,7 @@ $apiUrl = getenv('BS_URL') ?: ''; $clientId = getenv('BS_TOKEN_ID') ?: ''; $clientSecret = getenv('BS_TOKEN_SECRET') ?: ''; +$htmlCss = getenv('BS_CSS_FILE') ?: ''; // Output Folder // Can be provided as a arguments when calling the script @@ -132,7 +133,8 @@ function getImageFile(string $url): string { * Get the HTML representation of a book. */ function getBookHtmlOutput(array $book, array $chapters, array $pages): string { - $content = ""; + global $htmlCss; + $content = ""; $content .= "

{$book['name']}

"; $content .= "

{$book['description']}

"; $content .= "
"; @@ -157,7 +159,8 @@ function getBookHtmlOutput(array $book, array $chapters, array $pages): string { * Get the HTML representation of a chapter. */ function getChapterHtmlOutput(array $chapter, array $pages): string { - $content = ""; + global $htmlCss; + $content = ""; $content .= "

Back to book

"; $content .= "

{$chapter['name']}

"; $content .= "

{$chapter['description']}

"; @@ -176,7 +179,8 @@ function getChapterHtmlOutput(array $chapter, array $pages): string { * Get the HTML representation of a page. */ function getPageHtmlOutput(array $page, ?array $parentChapter): string { - $content = ""; + global $htmlCss; + $content = ""; if (is_null($parentChapter)) { $content .= "

Back to book

"; } else {