Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(summary): use description as summary when summary is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Feb 21, 2020
1 parent 0d83302 commit 850e8f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
17 changes: 4 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
version: 2.1
jobs:
build-check:
parameters:
example-site-path:
type: string
theme-path:
type: string
docker:
- image: cibuilds/hugo:0.62
working_directory: ~/LoveIt
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run:
command: |
cd << parameters.example-site-path >> && pwd
HUGO_ENV=production hugo --themesDir << parameters.theme-path >> -v --gc
htmlproofer public --check-html --allow-hash-href --empty-alt-ignore --disable-external
- run: HUGO_ENV=production hugo --source=exampleSite -v --gc
- run: htmlproofer exampleSite/public --check-html --allow-hash-href --empty-alt-ignore --disable-external

workflows:
build-check-exampleSite:
jobs:
- build-check:
example-site-path: exampleSite
theme-path: ../..
- build-check
6 changes: 5 additions & 1 deletion layouts/_default/summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ <h1 class="single-title" itemprop="name headline">

{{- /* Summary content */ -}}
<div class="content">
{{- partial "single/content.html" .Summary -}}
{{- with .Summary -}}
{{- partial "single/content.html" . -}}
{{- else -}}
{{- .Description | safeHTML -}}
{{- end -}}
</div>

{{- /* Footer */ -}}
Expand Down

0 comments on commit 850e8f3

Please sign in to comment.