Added theme options
This commit is contained in:
parent
68a6169bc3
commit
ab5c101fcc
5 changed files with 66 additions and 4 deletions
|
|
@ -7,9 +7,19 @@ import (
|
|||
|
||||
var themes = []models.ThemeMeta{
|
||||
{
|
||||
ID: "bear",
|
||||
Name: "Bear",
|
||||
URL: "https://github.com/janraasch/hugo-bearblog",
|
||||
ID: "bear",
|
||||
Name: "Bear",
|
||||
URL: "https://github.com/janraasch/hugo-bearblog",
|
||||
Options: []models.ThemeOption{
|
||||
{
|
||||
Name: "homepage_post_limit",
|
||||
Label: "Homepage Post Limit",
|
||||
Description: "Number of links to post on homepage",
|
||||
Type: models.ThemeOptionTypeInt,
|
||||
DefaultValue: "30",
|
||||
},
|
||||
},
|
||||
|
||||
OverlayFS: overlays.HugoBearblogFS,
|
||||
Overlays: map[string]string{
|
||||
"hugo-bearblog/archetype-posts.md": "archetypes/posts.md",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<h3>Recent Posts</h3>
|
||||
|
||||
<ul class="blog-posts">
|
||||
{{ range site.RegularPages }}
|
||||
{{ range site.RegularPages.Limit .Site.Params.theme_options.homepage_post_limit }}
|
||||
<li>
|
||||
<span>
|
||||
<i>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue