mirror of
https://github.com/suk-ws/ph-Bookshelf.git
synced 2025-02-23 22:58:49 +08:00
- support page config define in front matter - support `title`, which can set HTML title. - if `title` is not set, then HTML title will try find page title defined in book.xml - if `title` is set but <h1> title not set, it will generated a <h1> title using the value of `title` - support `configurations` which can set page level configs here. - now can open page that has .md file but not defined in book.xml (must in a book defined) - old.title.gen is not supported yet.
26 lines
823 B
PHP
26 lines
823 B
PHP
<?php use SukWs\Bookshelf\Data\SiteConfig\ConfigName; ?>
|
|
<?php use SukWs\Bookshelf\Data\SiteMeta; ?>
|
|
<?php use SukWs\Bookshelf\Data\PageMeta; ?>
|
|
|
|
<!-- Assets(js) --><?php
|
|
foreach (SiteMeta::getJavascriptList() as $item) {
|
|
if ($item==null) continue;
|
|
echo "\n\t\t";
|
|
echo "<script src=\"$item\"></script>";
|
|
}
|
|
echo "\n";
|
|
?>
|
|
<script><?= SiteMeta::getCustomScriptContent("custom") ?></script>
|
|
<script>
|
|
bookCurrentId = "<?= PageMeta::$bookId ?>";
|
|
pageCurrentId = "<?= PageMeta::$page_id ?>";
|
|
<?php if (!(PageMeta::getConfigurationLevelPage(ConfigName::highlightjs)=="false")) :
|
|
?>hljs.highlightAll();<?php endif; ?>
|
|
<?php if (!(PageMeta::getConfigurationLevelPage(ConfigName::regex_highlight)=="false")) :
|
|
?>RegexColorizer.coloringAll();<?php endif; ?>
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|