Support static content on front page (above posts)

This commit is contained in:
Li-Wen Yip 2017-03-11 18:36:32 +00:00
parent c5736a53c2
commit cfbe939864
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,2 @@
## Front Page Content
`beautifulhugo` supports content on your front page. Edit `/content/_index.md` to change what appears here. Delete `/content/_index.md` if you don't want any content here.

View File

@ -51,6 +51,11 @@
<div role="main" class="container"> <div role="main" class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ with .Content }}
<div class="well">
{{.}}
</div>
{{ end }}
<div class="posts-list"> <div class="posts-list">
{{ $pag := .Paginate (where .Data.Pages "Type" "post") }} {{ $pag := .Paginate (where .Data.Pages "Type" "post") }}
{{ range $pag.Pages }} {{ range $pag.Pages }}