feat: allow disable toc on page frontmatter

refactor: move pager to partial/components

chore: add head-css and favicons

- support favicons and page descriptions
- dynamic title based on page
- add custom head-end hook

feat: add opengraph to head

fix: sidebar not hiding when resizing
This commit is contained in:
Xin
2023-08-09 22:57:43 +01:00
parent ad3c607623
commit 750e566d24
11 changed files with 96 additions and 40 deletions

View File

@ -1,12 +1,13 @@
{{ $context := .context }}
{{ $disableSidebar := .disableSidebar | default false }}
{{ $sidebarClass := cond $disableSidebar "md:hidden xl:block" "md:sticky" }}
{{ $navRoot := cond (eq site.Home.Type "docs") site.Home $context.FirstSection }}
{{ $navPages := union $navRoot.RegularPages $navRoot.Sections }}
{{ $pageURL := $context.RelPermalink }}
<aside class="sidebar-container flex flex-col print:hidden md:top-16 md:shrink-0 md:w-64 md:sticky md:self-start max-md:[transform:translate3d(0,-100%,0)]">
<aside class="sidebar-container flex flex-col print:hidden md:top-16 md:shrink-0 md:w-64 md:self-start max-md:[transform:translate3d(0,-100%,0)] {{ $sidebarClass }}">
<!-- Search bar on small screen -->
<div class="px-4 pt-4 md:hidden">
{{ partial "search.html" }}