update related-post functionality, 404 page, and readme file

This commit is contained in:
somrat sorkar 2023-07-30 09:16:59 +06:00
parent 6a53b8d986
commit 90da619a5f
7 changed files with 77 additions and 64 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@ -1,13 +0,0 @@
---
title: "Page Not Found"
meta_title: ""
description: "this is meta description"
image: "/images/404.png"
draft: false
# don't create a separate page
_build:
render: "never"
---
Hugoplate is a free starter template built with Hugo and TailwindCSS, providing everything you need to jumpstart your HTML project and save valuable time.

View File

@ -3,27 +3,27 @@ module hugoplate.netlify.app
go 1.20 go 1.20
require ( require (
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/accordion v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/adsense v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/images v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/images v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/modal v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/modal v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/pwa v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/search v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/search v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/tab v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/tab v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/gethugothemes/hugo-modules/videos v0.0.0-20230723035230-6e3f9ed58472 // indirect github.com/gethugothemes/hugo-modules/videos v0.0.0-20230727035736-e23a61ab80b4 // indirect
github.com/zeon-studio/hugoplate v0.0.0-20230723035338-3dfdf7e3efe3 // indirect github.com/zeon-studio/hugoplate v0.0.0-20230727062248-6a53b8d98630 // indirect
) )

View File

@ -22,9 +22,6 @@
- id: share - id: share
translation: Share translation: Share
- id: back_to_home
translation: Back To Home
- id: search_input_placeholder - id: search_input_placeholder
translation: Search Post ... translation: Search Post ...

View File

@ -1,20 +1,24 @@
{{ define "main" }} {{ define "main" }}
{{ with site.GetPage "404" }}
<section class="section-sm text-center"> <section class="section-sm text-center">
<div class="container"> <div class="container">
<div class="row justify-center"> <div class="row justify-center">
<div class="sm:col-10 md:col-8 lg:col-6"> <div class="sm:col-10 md:col-8 lg:col-6">
{{ partial "image" (dict "Src" .Params.image "Alt" .Title "Class" "mb-8") }} <span
<h1 class="h2 mb-4">{{ .Title }}</h1> class="text-[8rem] block font-bold text-dark dark:text-darkmode-dark"
>404</span
>
<h1 class="h2 mb-4">Page not found</h1>
<div class="content"> <div class="content">
{{ .Content }} The page you are looking for might have been removed, had its name
changed, or is temporarily unavailable.
</div> </div>
<a href="{{ site.BaseURL }}" class="btn btn-primary mt-8"> <a
{{ i18n "back_to_home" }} href="{{ site.BaseURL | relLangURL }}"
class="btn btn-primary mt-8">
Back to home
</a> </a>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
{{ end }}
{{ end }} {{ end }}

View File

@ -71,17 +71,20 @@
</div> </div>
<!-- Related posts --> <!-- Related posts -->
{{ $related := (where site.RegularPages "Section" "in" site.Params.mainSections) | intersect (where site.RegularPages ".Title" "!=" .Title) | union (site.RegularPages.Related . ) }}
{{ $related = $related | shuffle | first 3 }}
{{ with $related }}
<div class="section pb-0"> <div class="section pb-0">
<h2 class="h3 mb-12">{{ i18n "related_posts" }}</h2> <h2 class="h3 mb-12">{{ i18n "related_posts" }}</h2>
<div class="row"> <div class="row">
{{ $related := (where site.RegularPages "Section" "in" site.Params.mainSections) | intersect (where site.RegularPages ".Title" "!=" .Title) | union (site.RegularPages.Related . ) }} {{ range . }}
{{ range first 3 $related }}
<div class="lg:col-4"> <div class="lg:col-4">
{{ partial "components/blog-card" . }} {{ partial "components/blog-card" . }}
</div> </div>
{{ end }} {{ end }}
</div> </div>
</div> </div>
{{ end }}
</div> </div>
</section> </section>
{{ end }} {{ end }}

View File

@ -119,6 +119,28 @@ https://github.com/zeon-studio/hugoplate/assets/58769763/c260c0ae-91be-42ce-b8db
--- ---
## 📝 Customization
We have added a lot of customization options in this template. You can customize almost everything you want. Let's see what you can customize:
### 👉 Site Config
You can change the site configuration from the `hugo.toml` file. You can change the site title, baseURL, language, theme, plugins, and more.
### 👉 Site Params
You can customize all the parameters from `config/_default/params.toml` file. Including `logo`, `favicon`, `search`, `seo metadata` and more.
### 👉 Colors and Fonts
You can change the colors and fonts from the `data/theme.json` file. You can change the primary color, secondary color, and more. Also you can change the font family and font size from here.
### 👉 Social Links
You can change the social links from the `data/social.json` file. You can add your social links here, and it will automatically show on the site.
---
## 🛠 Advanced Usage ## 🛠 Advanced Usage
We have added some custom scripts to make your life easier. You can use these scripts to help you with your development. We have added some custom scripts to make your life easier. You can use these scripts to help you with your development.