Skip to content

Commit

Permalink
Merge pull request #303 from chipzoller/more-markdownify
Browse files Browse the repository at this point in the history
Run more user-supplied text through markdownify
  • Loading branch information
chipzoller authored May 19, 2022
2 parents b51a5ee + 4ee4364 commit ba091e2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion assets/sass/_syntax.sass
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
opacity: 1

code
font-size: 15px
font-size: 85%
font-weight: 400
overflow-y: hidden
display: block
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/post/bundle/index.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/excerpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -22,9 +22,9 @@ <h3 class="post_link">
{{ $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" }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}&nbsp;{{ . }}-{{ end }}&nbsp;<span class="year"></span>&nbsp;{{ upper $t }}. {{ T "all_rights" }}</p>
<p>{{ T "copyright" | markdownify }}{{ with $s.since }}&nbsp;{{ . }}-{{ end }}&nbsp;<span class="year"></span>&nbsp;{{ upper $t }}. {{ T "all_rights" | markdownify }}</p>
{{- partialCached "top" .}}
</div>
</footer>
6 changes: 3 additions & 3 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h2 class="mt-4">{{ T "series_posts" }}</h2>
<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>
Expand All @@ -63,7 +63,7 @@ <h2 class="mt-4">{{ T "featured_posts" }}</h2>
<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>
Expand All @@ -73,7 +73,7 @@ <h2 class="mt-4">{{ T "recent_posts" }}</h2>
{{- $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>
Expand Down

0 comments on commit ba091e2

Please sign in to comment.