💄 🐛 Fixed multi languages page display & i18n translate message.

This commit is contained in:
凡梦星尘 2022-06-13 21:22:17 +08:00
parent 48d36a2a54
commit 26030c7fcd
8 changed files with 108 additions and 6 deletions

View File

@ -41,11 +41,36 @@ languages:
languageCode: en languageCode: en
hasCJKLanguage: false hasCJKLanguage: false
weight: 2 weight: 2
menus:
main:
- identifier: home
name: Home
url: /
pre: home
weight: 1
- identifier: about
name: About
url: /about.html
pre: user
weight: 2
- identifier: archives
name: Archives
url: /posts
pre: archive
weight: 3
- identifier: commonweal
name: Commonweal 404
url: /404.html
pre: heartbeat
weight: 4
params: params:
author: Theme NexT author: Theme NexT
subtitle: Theme for Hugo subtitle: Theme for Hugo
description: Stay easily & powerful. description: Stay easily & powerful.
keywords: Hugo,NexT,Theme,easily,powerful keywords: Hugo,NexT,Theme,easily,powerful
linksSets:
icon: fa fa-globe
title: Friends
#-------------------------------------- #--------------------------------------
# Menus Settings # Menus Settings

View File

@ -0,0 +1,19 @@
---
title: "About Hugo NexT Origination"
description: ""
date: 2022-06-09T20:12:52+08:00
lastmod: 2022-06-09T20:12:52+08:00
share: false
followme: false
nav: false
copyright: false
url: about.html
---
`Hugo NexT` organization is formed by many friends from all over the world who love the theme and style of `NexT`, so that this theme can continue to be carried forward in the `Hugo` engine. Welcome to join us!
# Our vision
Keep the classic black-and-white collocation of `NexT` & keep easily and powerful features.

View File

@ -0,0 +1,58 @@
---
title: "Hello World"
description: "Descript some skill for Hugo build site."
lastmod: 2022-06-03T16:43:23+08:00
date: 2022-06-02T11:52:03+08:00
categories:
- Blog
tags:
- Hugo
- Startup
url: hello-world.html
weight: 2
---
> "Use keyword which is `weight` make post sticky to top."
[Hugo](https://gohugo.io/) is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.
<!--more-->
## Quick Start
### New Post
```shell
$ hugo new hello-world.md
```
More info: [Front formats](https://gohugo.io/content-management/formats/)
### Server
```shell
$ hugo server
```
More info: [Hugo Server](https://gohugo.io/commands/hugo_server/)
### Build
```shell
$ hugo
```
More Info: [Hugo Build](https://gohugo.io/commands/hugo/)
### Deploy
```shell
$ hugo deploy
```
More Info[Hugo Deployment](https://gohugo.io/commands/hugo_deploy/)
Enjoy your Hugo journey & good luck for you!

View File

@ -56,7 +56,7 @@ CatesCounterTitle:
other: "{{ .Count }} categories in total" other: "{{ .Count }} categories in total"
ArchiveCounterTitle: ArchiveCounterTitle:
zero: No posts. zero: No posts.
other: "{{ .Count }} posts in total." other: "{{ .Count }} posts in total"
PostArchiveCheersUm: PostArchiveCheersUm:
other: Um.. other: Um..

View File

@ -13,7 +13,7 @@
<img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}"> <img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}">
{{- end }} {{- end }}
<a href="{{ .Site.BaseURL }}" class="brand" rel="start"> <a href="{{ "/" | relLangURL }}" class="brand" rel="start">
<i class="logo-line"></i> <i class="logo-line"></i>
<h1 class="site-title">{{ $title }}</h1> <h1 class="site-title">{{ $title }}</h1>
<i class="logo-line"></i> <i class="logo-line"></i>

View File

@ -6,7 +6,7 @@
{{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }} {{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }}
{{- $active = or $active (eq .URL "/")}} {{- $active = or $active (eq .URL "/")}}
<li class="menu-item menu-item-{{ .Identifier }}"> <li class="menu-item menu-item-{{ .Identifier }}">
<a href="{{ .URL }}" class="hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section"> <a href="{{ .URL | relLangURL }}" class="hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section">
{{- if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{- .Name }} {{- if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{- .Name }}
{{- if and $ms.badges (eq .Identifier "archives" ) }} {{- if and $ms.badges (eq .Identifier "archives" ) }}
<span class="badge">{{ $.Scratch.Get "postsCount" }}</span> <span class="badge">{{ $.Scratch.Get "postsCount" }}</span>

View File

@ -7,7 +7,7 @@
<span class="post-meta-item-text">{{- print (T "PostCategory") (T "SymbolColon") -}}</span> <span class="post-meta-item-text">{{- print (T "PostCategory") (T "SymbolColon") -}}</span>
{{- range (first 1 .Params.categories) }} {{- range (first 1 .Params.categories) }}
<span itemprop="about" itemscope itemtype="http://schema.org/Thing"> <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/{{ . | urlize }}" itemprop="url" rel="index"> <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" itemprop="url" rel="index">
<span itemprop="name">{{- . -}}</span> <span itemprop="name">{{- . -}}</span>
</a> </a>
</span> </span>