Skip to content

Commit

Permalink
update related post setting, ref #165
Browse files Browse the repository at this point in the history
  • Loading branch information
tfsomrat committed Jan 13, 2025
1 parent 2c17174 commit defe83d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 31 deletions.
47 changes: 23 additions & 24 deletions exampleSite/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@ module hugoplate.netlify.app
go 1.21

require (
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/components/announcement v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/images v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/modal v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/search v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/tab v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/videos v0.0.0-20241203025515-30ad48e108af // indirect
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/components/announcement v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/images v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/modal v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/search v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/tab v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/gethugothemes/hugo-modules/videos v0.0.0-20250112030311-a0de82520a5a // indirect
github.com/hugomods/mermaid v0.1.4 // indirect
github.com/zeon-studio/hugoplate v0.0.0-20241203091903-bf5613de8b39 // indirect
)
2 changes: 1 addition & 1 deletion layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h5 class="mr-3">{{ T "tags" }} :</h5>
</div>

<!-- Related posts -->
{{ $related := (where site.RegularPages "Section" "in" site.Params.mainSections) | intersect (where site.RegularPages ".Title" "!=" .Title) | union (site.RegularPages.Related . ) }}
{{ $related := .Site.RegularPages.Related . | first 10 }}
{{ $related = $related | shuffle | first 3 }}
{{ with $related }}
<div class="section pb-0">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/components/blog-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h4 class="mb-3">
</li>
</ul>
{{ end }}
<p class="mb-6">{{ .Summary }}</p>
<p class="mb-6">{{ .Summary | plainify }}</p>
<a class="btn btn-outline-primary btn-sm" href="{{ .RelPermalink }}">
{{ T "read_more" }}
</a>
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hugoplate",
"description": "hugo tailwindcss boilerplate",
"version": "1.18.1",
"version": "1.18.2",
"license": "MIT",
"author": "zeon.studio",
"scripts": {
Expand All @@ -19,16 +19,16 @@
"format": "prettier -w ."
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"@tailwindcss/forms": "^0.5.10",
"@tailwindcss/typography": "^0.5.16",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"postcss-cli": "^11.0.0",
"prettier": "^3.4.1",
"prettier": "^3.4.2",
"prettier-plugin-go-template": "0.0.15",
"prettier-plugin-tailwindcss": "^0.6.9",
"tailwind-bootstrap-grid": "^5.1.0",
"tailwindcss": "^3.4.15"
"tailwindcss": "^3.4.17"
},
"postcss": {
"plugins": {
Expand Down

0 comments on commit defe83d

Please sign in to comment.