mirror of
https://github.com/tiennm99/hugoThemesSiteBuilder.git
synced 2026-10-16 22:14:39 +00:00
Pull newly created themes to the top
This commit is contained in:
2 files changed
+6
-7
No files matched your search
@@ -1624,11 +1624,6 @@
|
||||
"noMounts": true,
|
||||
"path": "github.com/themefisher/parsa-hugo"
|
||||
},
|
||||
{
|
||||
"ignoreImports": true,
|
||||
"noMounts": true,
|
||||
"path": "github.com/themefisher/parsa-hugo-personal-blog-theme"
|
||||
},
|
||||
{
|
||||
"ignoreImports": true,
|
||||
"noMounts": true,
|
||||
|
||||
@@ -293,11 +293,11 @@ func (t *theme) calculateWeight(maxStars int) {
|
||||
boostRecent(time.Since(t.m.Time), (3 * d30), 20)
|
||||
}
|
||||
|
||||
// Boost themes created the last month.
|
||||
// Pull themes created the last 3 months to the top.
|
||||
// Note that we currently only have that information for themes
|
||||
// hosted on GitHub.
|
||||
if !t.ghRepo.IsZero() {
|
||||
boostRecent(time.Since(t.ghRepo.CreatedAt), (1 * d30), 50)
|
||||
boostRecent(time.Since(t.ghRepo.CreatedAt), (3 * d30), 50000)
|
||||
}
|
||||
|
||||
// Boost themes with a Hugo version indicator set that covers.
|
||||
@@ -308,6 +308,10 @@ func (t *theme) calculateWeight(maxStars int) {
|
||||
weight -= boost
|
||||
}*/
|
||||
|
||||
if t.weight < 0 {
|
||||
t.weight = 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (t *theme) toFrontMatter() map[string]interface{} {
|
||||
|
||||
Reference in new issue
Block a user