diff options
author | Qicz <zcq@zhucongqi.cn> | 2022-05-23 13:00:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 13:00:36 +0300 |
commit | 17b553fe62e19d4ef79aca070674f90347f6e2b2 (patch) | |
tree | 048fd857fa916ce2708c472a65a8e26c704a21c6 | |
parent | 5d47f21e0933be12e7ecbfc4b414c58fe6a583c6 (diff) |
optimize the carousel title & href with saftHTML (#362)
* optimize the carousel title & href with saftHTML
* support more sections list
* quotes.
Co-authored-by: Guillermo Guerrero Ibarra <guillermo@guerreroibarra.com>
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/partials/carousel.html | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 41bde81..c852448 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -23,7 +23,7 @@ <div class="col-md-9" id="blog-listing-medium"> - {{ $paginator := .Paginate (where .Data.Pages "Type" "blog") }} + {{ $paginator := .Paginate (where .Data.Pages "Type" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }} <section class="post"> <div class="row"> diff --git a/layouts/partials/carousel.html b/layouts/partials/carousel.html index a329dc2..5d0e42b 100644 --- a/layouts/partials/carousel.html +++ b/layouts/partials/carousel.html @@ -11,11 +11,11 @@ {{ range sort .Site.Data.carousel "weight" }} <div class="item"> {{ if .href }} - <a href="{{ .href }}"> + <a href="{{ .href }}" target="_blank" title="{{ .title | safeHTML }}"> {{ end }} <div class="row"> <div class="col-sm-5 right"> - <h1>{{ .title }}</h1> + <h1>{{ .title | safeHTML }}</h1> {{ .description | safeHTML }} </div> <div class="col-sm-7"> |