Skip to content

Commit

Permalink
Moves content var into a better location. (#318)
Browse files Browse the repository at this point in the history
* Moves content var into a better location.

* Renders lead text as markdown in more places.
  • Loading branch information
johnnymatthews authored Jan 29, 2025
1 parent 118c084 commit 9c0c7ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions themes/hextra/layouts/docs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
<div class="content">
<h1>{{ .Title }}</h1>

<p class="lead italic">{{ .Params.Lead | markdownify }}</p>

{{ .Content }}
<p class="lead italic">{{ .Params.Lead }}</p>

<div class="hextra-cards hx-mt-4 hx-gap-4 hx-grid not-prose">
{{ range .Pages }}
Expand All @@ -20,9 +21,9 @@ <h1>{{ .Title }}</h1>
</span>
<div class="hextra-card-subtitle hx-line-clamp-3 hx-text-sm hx-font-normal hx-text-gray-500 dark:hx-text-gray-400 hx-px-4 hx-mb-4 hx-mt-2">
{{ if .Params.lead }}
{{ .Params.lead | truncate 200 }}
{{ .Params.lead | truncate 200 | markdownify }}
{{ else }}
{{ .Summary | truncate 200 }}
{{ .Summary | truncate 200 | markdownify }}
{{ end }}
</div>
</a>
Expand Down

0 comments on commit 9c0c7ae

Please sign in to comment.