Skip to content

Commit

Permalink
Enable markdown in description.
Browse files Browse the repository at this point in the history
  • Loading branch information
erpel authored and nicokaiser committed Nov 23, 2024
1 parent 36dc1e0 commit 7420982
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ content/

- `title` -- title of the album, shown in the album list and on the album page.
- `date` -- album date, used for sorting (newest first).
- `description` -- description shown on the album page.
- `description` -- description shown on the album page. Rendered as markdown to enable adding links and some formatting.
- `featured_image` -- name of the image file used for the album thumbnail. If not set, the first image which contains `feature` in its filename is used, otherwise the first image in the album.
- `weight` -- can be used to adjust sort order.
- `private` -- if set to `true`, this album is not shown in the album overview and is excluded from RSS feeds.
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="icon" type="image/svg+xml" href="{{ "images/favicon.svg" | relURL }}" />
<link rel="icon" type="image/png" href="{{ "images/favicon.png" | relURL }}" />
<link rel="apple-touch-icon" sizes="180x180" href="{{ "images/apple-touch-icon.png" | relURL }}" />
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}" />
<meta name="description" content="{{ with .Description }}{{ . | markdownify | plainify }}{{ else }}{{ with .Site.Params.description }}{{ . | markdownify | plainify }}{{ end }}{{ end }}" />
{{ if .Params.keywords }}
<meta name="keywords" content="{{ delimit .Params.keywords `, ` }}" />
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/opengraph.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<meta property="og:title" content="{{ if .IsHome }}{{ with .Site.Params.title }}{{ . }}{{ end }}{{ else }}{{ .Title }}{{ end }}" />
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta property="og:description" content="{{ with .Description }}{{ . | markdownify | plainify }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . | markdownify | plainify }}{{ end }}{{ end }}{{ end }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/title.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<hgroup>
<h1>{{ .Title }}</h1>
{{ with .Params.Description }}
<p>{{ . }}</p>
<p>{{ . | markdownify }}</p>
{{ end }}
</hgroup>
{{ end }}

0 comments on commit 7420982

Please sign in to comment.