diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b8fd06..dc96850 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# v3.0.0-beta.2 +## 12-03-2021 + +1. [](#new) + * `render`-variables for `templates/partials/header.html.twig` and `components/docs/partials/docs/toolbar/menu.html.twig` +2. [](#improved) + * Search-template + * Expect metadata in `user://data/persist/index.js` + * Expect full data in `user://data/persist/static/index.full.js` +3. [](#bugfix) + * API-alignment to use `Grav\Common\Page\Interfaces\PageInterface` + * ClassNames-getter + * Patch Router Page-instance + # v3.0.0-beta.1 ## 08-03-2021 @@ -8,7 +22,7 @@ * Dependencies strictness 2. [](#bugfix) * Relocate search-results for correct keyboard-navigation - * Forcibly cast Linked Dataas strings + * Forcibly cast Linked Data as strings * Fall back to `en` for Linked Data * Search-mechanisms * Remove redundant `aria-checked`-attribute diff --git a/README.md b/README.md index d62c6fb..b2cba4c 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ A demonstration is available at [OleVik.me/staging/grav-skeleton-scholar](https: ### Version 3.0.0 and higher -This major-version update targets compatibility with Grav Core 1.7, but also updates some internals. +This major-version update targets compatibility with Grav Core 1.7, and also updates and changes some internals. ### Grav Package Manager @@ -64,7 +64,7 @@ You should now have all the theme files under /your/site/grav/user/themes/scholar -This theme started as a clone of Paul Hibbitt's [Learn2 with Git Sync](https://github.com/hibbitts-design/grav-theme-learn2-git-sync)-theme, which is a customized version of the [Learn2](https://github.com/getgrav/grav-theme-learn2)-theme. As this theme decouples and supercedes much of the logic in either, it is rebranded as Scholar. +This theme started as a clone of Paul Hibbitt's [Learn2 with Git Sync](https://github.com/hibbitts-design/grav-theme-learn2-git-sync)-theme, which is a customized version of the [Learn2](https://github.com/getgrav/grav-theme-learn2)-theme. As this theme decouples and supercedes most of the logic in either, it is rebranded as Scholar. It also goes much further in what a documentation-theme can be and do. ## [Advanced Usage](https://github.com/OleVik/grav-theme-scholar/blob/master/ADVANCED.md) @@ -75,4 +75,4 @@ This theme started as a clone of Paul Hibbitt's [Learn2 with Git Sync](https://g ## TODO - [ ] Evaluate metadata text-wrapping -- [ ] Extension: Filter content with FlexSearch \ No newline at end of file +- [ ] Search: Replace with engine-agnostic approach, decoupling into a plugin \ No newline at end of file diff --git a/blueprints.yaml b/blueprints.yaml index 7d7b3ef..9ce2d4d 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Scholar -version: 3.0.0-beta.1 +version: 3.0.0-beta.2 testing: true slug: scholar type: theme diff --git a/classes/Content/Content.php b/classes/Content/Content.php index 3d3c8a2..76573b7 100644 --- a/classes/Content/Content.php +++ b/classes/Content/Content.php @@ -1,4 +1,5 @@ createDocumentFragment(); $fragment->appendXML( '<' . $element->nodeName - . '>' . $element->textContent - . '' . $element->nodeName . '>' + . '>' . $element->textContent + . '' . $element->nodeName . '>' ); $element->parentNode->replaceChild($fragment, $element); } else { @@ -193,7 +194,7 @@ public static function wrapHTML(string $content, string $wrapperTag, array $targ $node = $doc->getElementsByTagName('body')[0]; return self::getInnerHTML($node, false); } - + /** * Extract headings from HTML * @@ -214,7 +215,7 @@ public static function buildList($data): string $href = $data[$title]['href']; $level = $data[$title]['level']; $nextLevel = $data[next($keys)]['level'] ?? null; - + if ($nextLevel > $level) { $output .= '