diff options
author | Chip Zoller <chipzoller@gmail.com> | 2022-05-19 15:01:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 15:01:56 +0300 |
commit | ba091e275759d8c7289b7757c8146de25825239f (patch) | |
tree | b53474253b879fb484e293883877b810e4a16619 | |
parent | b51a5eeda027b7d7b1e9567cbefab76bd35f9312 (diff) | |
parent | 4ee43643d9998d80159d01b9c6d447ea2ee0dd2d (diff) |
Merge pull request #303 from chipzoller/more-markdownify
Run more user-supplied text through markdownify
-rw-r--r-- | assets/sass/_syntax.sass | 2 | ||||
-rw-r--r-- | exampleSite/content/post/bundle/index.md | 1 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/excerpt.html | 6 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 6 |
6 files changed, 10 insertions, 9 deletions
diff --git a/assets/sass/_syntax.sass b/assets/sass/_syntax.sass index 5055c59..7adb615 100644 --- a/assets/sass/_syntax.sass +++ b/assets/sass/_syntax.sass @@ -7,7 +7,7 @@ opacity: 1 code - font-size: 15px + font-size: 85% font-weight: 400 overflow-y: hidden display: block diff --git a/exampleSite/content/post/bundle/index.md b/exampleSite/content/post/bundle/index.md index 69ba5a4..6b1ab1a 100644 --- a/exampleSite/content/post/bundle/index.md +++ b/exampleSite/content/post/bundle/index.md @@ -1,6 +1,7 @@ --- title: 'Using Hugo page bundles' description: 'Page bundles are an optional way to organize content within Hugo.' +summary: "Page bundles are an optional way to organize page resources within Hugo. You can opt-in to using page bundles in Hugo Clarity with `usePageBundles` in your site configuration --- or in a page's front matter." # For the post in lists. date: '2022-03-24' aliases: - hugo-page-bundles diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2935179..e0299b2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,7 +12,7 @@ <div class="{{ if ne $p.singleColumn true }}grid-inverse {{ end }}wrap content"> <article class="post_content"> {{- $t := .Title }} - <h1 class="post_title">{{ $t }}</h1> + <h1 class="post_title">{{ $t | markdownify }}</h1> {{- partial "post-meta" . }} {{- with .Params.featureImage -}} <div class="post_featured"> diff --git a/layouts/partials/excerpt.html b/layouts/partials/excerpt.html index 0e2c355..ba94336 100644 --- a/layouts/partials/excerpt.html +++ b/layouts/partials/excerpt.html @@ -2,7 +2,7 @@ <div class="excerpt"> <div class="excerpt_header"> <h3 class="post_link"> - <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a> + <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title | markdownify }}</a> </h3> {{ partial "post-meta" . }} </div> @@ -22,9 +22,9 @@ {{ $summary = .Params.abstract }} {{- end }} {{ if not ( strings.Contains $summary "<p>" ) }} - <p>{{ $summary }}</p> + <p>{{ $summary | markdownify }}</p> {{ else }} - {{ $summary }} + {{ $summary | markdownify }} {{ end }} <br> {{- $r := T "read_more" }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0e4b888..d1bc945 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -8,7 +8,7 @@ <footer class="footer"> <div class="footer_inner wrap pale"> <img src='{{ absURL (default $defaultFooterLogo $s.footerLogo) }}' class="icon icon_2 transparent" alt="{{ $t }}"> - <p>{{ T "copyright" }}{{ with $s.since }} {{ . }}-{{ end }} <span class="year"></span> {{ upper $t }}. {{ T "all_rights" }}</p> + <p>{{ T "copyright" | markdownify }}{{ with $s.since }} {{ . }}-{{ end }} <span class="year"></span> {{ upper $t }}. {{ T "all_rights" | markdownify }}</p> {{- partialCached "top" .}} </div> </footer> diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index edf5a2a..e849852 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -50,7 +50,7 @@ <ul> {{ range $related }} <li> - <a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a> + <a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title | markdownify }}</a> </li> {{ end }} </ul> @@ -63,7 +63,7 @@ <ul> {{- range . }} <li> - <a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a> + <a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title | markdownify }}</a> </li> {{- end }} </ul> @@ -73,7 +73,7 @@ {{- $recent := default 8 $s.numberOfRecentPosts }} {{- range first $recent $posts }} <li> - <a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a> + <a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title | markdownify }}</a> </li> {{- end }} </ul> |