Merge pull request #18762 from dvdksn/algolia-tweaks

search tweaks
This commit is contained in:
David Karlsson 2023-11-23 10:17:50 +01:00 committed by GitHub
commit e77df54c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 14 deletions

View File

@ -12,8 +12,10 @@
{{ .Scratch.Set "headings" slice }}
{{ .Scratch.Set "subheadings" slice }}
{{ partial "breadcrumbs.html" . }}
<article class="prose max-w-none dark:prose-invert">
<h1>{{ .Title }}</h1>
<article class="DocSearch-content prose max-w-none dark:prose-invert">
{{ with .Title }}
<h1 id="{{ anchorize . }}">{{ . }}</h1>
{{ end }}
{{ $data.short | .RenderString (dict "display" "block") }}
{{ if $data.deprecated }}
<blockquote class="warning">

View File

@ -4,8 +4,10 @@
{{ define "main" }}
{{ partial "breadcrumbs.html" . }}
<article class="prose max-w-none dark:prose-invert">
<h1>{{ .Title }}</h1>
<article class="DocSearch-content prose max-w-none dark:prose-invert">
{{ with .Title }}
<h1 id="{{ anchorize . }}">{{ . }}</h1>
{{ end }}
<table>
<thead>
<tr>

View File

@ -4,9 +4,9 @@
{{ define "main" }}
{{ partial "breadcrumbs.html" . }}
<article class="prose max-w-none dark:prose-invert">
<article class="DocSearch-content prose max-w-none dark:prose-invert">
{{ with .Title }}
<h1>{{ . }}</h1>
<h1 id="{{ anchorize . }}">{{ . }}</h1>
{{ end }}
{{ .Content }}
</article>

View File

@ -4,9 +4,9 @@
{{ define "main" }}
{{ partial "breadcrumbs.html" . }}
<article class="prose max-w-none dark:prose-invert">
<article class="DocSearch-content prose max-w-none dark:prose-invert">
{{ with .Title }}
<h1>{{ . }}</h1>
<h1 id="{{ anchorize . }}">{{ . }}</h1>
{{ end }}
{{ .Content }}
</article>

View File

@ -53,10 +53,10 @@
{{ $isCurrent := eq (urls.Parse $ctx.Permalink).Path .entry.path }}
<li class="pl-4 sidebar-hover rounded
{{ if $isCurrent }} bg-gray-light-200 dark:bg-gray-dark-200{{ end }}">
<span class="flex items-center">
<a {{ if $isCurrent }}aria-current="page" {{ end }} class="py-2 w-full truncate"
href="{{ .entry.path }}" title="{{ markdownify .entry.title }}">{{ markdownify .entry.title }}</a>
</span>
<a {{ if $isCurrent }}aria-current="page" {{ end }} class="py-2 w-full truncate block"
href="{{ .entry.path }}" title="{{ markdownify .entry.title }}"
><span>{{ markdownify .entry.title }}</span>
</a>
</li>
{{ end }}
{{ end }}

View File

@ -4,8 +4,10 @@
{{ define "main" }}
{{ partial "breadcrumbs.html" . }}
<article class="prose max-w-none dark:prose-invert">
<h1>{{ .Title }}</h1>
<article class="DocSearch-content prose max-w-none dark:prose-invert">
{{ with .Title }}
<h1 id="{{ anchorize . }}">{{ . }}</h1>
{{ end }}
<blockquote>
<p><strong>Note</strong></p>
<p>