Add support to add blog entries on index
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
|
||||
{{ partial "counter.html" . }}
|
||||
|
||||
{{ partial "blog.html" . }}
|
||||
|
||||
{{ partial "portfolio.html" . }}
|
||||
|
||||
{{ partial "testimonial.html" . }}
|
||||
|
||||
{{ partial "call-to-action.html" . }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
33
layouts/partials/blog.html
Normal file
33
layouts/partials/blog.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{{ with .Site.Params.Blog }}
|
||||
{{ if .enable }}
|
||||
<section class="site-project" id="project">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="section-title">
|
||||
<h2>{{ .title }}</h2>
|
||||
<p>{{ .subtitle }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{ range first 4 (where $.Site.RegularPages "Type" "blog") }}
|
||||
<div class="col-lg-6 col-md-10 mx-auto">
|
||||
<div class="site-project-item">
|
||||
<div class="site-project-item-thumb">
|
||||
<img src="{{ .Params.Image | absURL }}" alt="project-thumb">
|
||||
</div>
|
||||
<div class="site-project-item-content">
|
||||
<span>{{ delimit .Params.category ", " }}</span>
|
||||
<h3>{{ .Title }}</h3>
|
||||
<a href="{{ .Permalink }}" class="read-more">{{ .Site.Params.blog.view_entry }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="col-12 text-center text-lg-left">
|
||||
<a href="blog" class="site-project-cta">{{ .Site.Params.blog.read_more }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user