🐛 🔥 Fixed flinks page in multiple languages.

This commit is contained in:
elkan1788 2025-01-25 20:52:11 +08:00
parent 6d65d92943
commit abec39b9ec
10 changed files with 98 additions and 4 deletions

5
.gitignore vendored
View File

@ -5,6 +5,9 @@ exampleSite/*
# Exclude special files in content folder
exampleSite/content/**/
!exampleSite/content
!exampleSite/content/flinks
!exmapleSite/content/flinks.md
!exampleSite/content/about
!exmapleSite/content/about.md
!exampleSite/content/archives
!exampleSite/content/post
@ -24,6 +27,8 @@ exampleSite/content/**/
!exampleSite/startup.sh
data/*
!data/flinks
!data/flinks.yaml
!data/config.yaml
!data/resources.yaml

View File

@ -0,0 +1,27 @@
---
title: "About Hugo NexT Organization"
date: 2025-01-25T18:00:52+08:00
lastmod: 2025-01-25T18:00:52+08:00
share: false
followme: false
nav: false
copyright: false
url: about.html
---
The `Hugo NexT` organization is jointly established by numerous friends from around the world who are fond of the `NexT` theme and style. The aim is to continue promoting and enhancing this theme within the `Hugo` engine. We warmly welcome you to join us!
# Our Vision
Continuing the classic black-and-white color scheme of `NexT`, it maintains simple usability and powerful functionality.
# Usage Feedback
- Join the online discussions on [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) or [Gitter](https://gitter.im/hugo-next/community) :beers:
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) Submit a bug report :bug:
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) to propose new feature ideas :sparkles:
> [!INFO]
> Chinese's users can also join the QQ group for communication: 604710815

View File

@ -24,4 +24,5 @@ url: about.html
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) 提交错误报告 :bug:
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) 表新功能的想法 :sparkles:
> [!INFO]
> 同时国内用户也可加入 QQ 群交流: 604710815

View File

@ -0,0 +1,3 @@
---
date: 2025-01-25T20:46:25+08:00
---

View File

@ -0,0 +1,14 @@
---
title: "Demo Sites"
type: flinks
url: flinks.html
---
If you want to exchange friendly links on this site, please leave your site information in the comment section. The format reference is as follows:
```yaml
- name: Hugo-NexT
desc: Hugo NexT Official Site.
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
link: https://hugo-next.eu.org
```

View File

@ -0,0 +1,37 @@
# 友情链接
# Friend's links
- FLinksTitle: Office Demo Site
FLinksDesc: Example content from the official theme.
FLinksList:
- name: Hugo
desc: The fastest website construction framework in the world!
avatar: https://gohugo.io/favicon-32x32.png
link: https://gohugo.io
timeout: 2
visible: true
- name: Hugo-NexT
desc: Hugo NexT Official Site
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
link: https://hugo-next.eu.org
timeout: 2
visible: true
- name: Fanmeng Star Dust Space Station
desc: Even ordinary people have their own dreams!
avatar: https://elkan1788.github.io/imgs/avatar.png
link: https://lisenhui.cn
timeout: 2
visible: true
- FLinksTitle: Hugo NexT Fan Groups
FLinksDesc: Exciting presentation from Hugo NexT theme enthusiasts!
FLinksList:
- name: Ahaji
desc: The first Hugo NexT loyal fan user on the entire network!
avatar: https://a.happy2008.top/imgs/stayhome-small.png
link: https://a.happy2008.top/
timeout: 2
visible: true

View File

@ -7,7 +7,13 @@
<div class="flinks-block">
<h1 class="flinks-block-title">{{ .Title }}</h1>
<div class="flinks-lists">
{{ range .Site.Data.flinks }}
{{ $flinksData := "" }}
{{ if .IsTranslated }}
{{ $flinksData = index .Site.Data.flinks .Lang }}
{{ else }}
{{ $flinksData = .Site.Data.flinks }}
{{ end }}
{{ range $flinksData }}
<div class="flinks-list">
<div class="flinks-list-title">{{ .FLinksTitle | safeHTML }}</div>
<div class="flinks-list-desc">{{ .FLinksDesc | safeHTML }}</div>

View File

@ -18,18 +18,19 @@
</div>
{{ end }}
{{/** Post summary **/}}
{{ $summary := default .Site.Params.PostMeta.summary .Params.Summary }}
{{ if $summary }}
{{ if .Site.Params.PostMeta.summary }}
{{ with .Params.Description }}
<div class="post-summary-wrapper">
<div class="summary-title">
<span><i class="fa-solid fa-list"></i></span>
<span>{{ T "PostMeta.summary.title" }}</span>
</div>
<div class="summary-content">
{{ default .Summary .Params.Summary }}
{{ . }}
</div>
</div>
{{ end }}
{{ end }}
{{/** Started use the read more content anchor the need
Hugo framework min marjo version greater than 0.134.0 **/}}
{{ .Summary }}