Merge pull request #93 from dillonzq/fix/description_as_summary

fix(summary): use description as summary when summary is empty
This commit is contained in:
Dillon 2020-02-22 01:20:25 +08:00 committed by GitHub
commit fbfcbaebca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 14 deletions

View file

@ -1,11 +1,6 @@
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
@ -13,14 +8,10 @@ jobs:
- 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

View file

@ -44,7 +44,11 @@
{{- /* Summary content */ -}}
<div class="content">
{{- partial "single/content.html" .Summary -}}
{{- with .Summary -}}
{{- partial "single/content.html" . -}}
{{- else -}}
{{- .Description | safeHTML -}}
{{- end -}}
</div>
{{- /* Footer */ -}}