Merge branch 'develop'

This commit is contained in:
凡梦星尘 2022-06-16 21:02:32 +08:00
commit 846f44bf0d
19 changed files with 192 additions and 47 deletions

View File

@ -7,3 +7,10 @@ Start a new journey for Hugo's theme of NexT.
# Our Vision # Our Vision
Make `NexT` theme is easily & powerful. Make `NexT` theme is easily & powerful.
# Preview
| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status |
| :---: | :---: | :---: | :---: | :---: | :---: |
| Preliminary | [Gemini](https://hugo-next-dev.vercel.app/) | [Muse](https://hugo-next-dev.vercel.app/muse/) | [Mist](https://hugo-next-dev.vercel.app/mist/) | [Pisces](https://hugo-next-dev.vercel.app/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next-dev&style=for-the-badge) |
| Production | [Gemini](https://hugo-next-prod.vercel.app/) | [Muse](https://hugo-next-prod.vercel.app/muse/) | [Mist](https://hugo-next-prod.vercel.app/mist/) | [Pisces](https://hugo-next-prod.vercel.app/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next-prod&style=for-the-badge) |

View File

@ -15,10 +15,9 @@
margin: 24px 0 12px 0; margin: 24px 0 12px 0;
&:after{ &:after{
content: $post_end_line_tip;
font-size: .9em; font-size: .9em;
font-weight: bold; font-weight: bold;
background: #fff; background: var(--content-bg-color);
padding: 0 5px; padding: 0 5px;
z-index:2; z-index:2;
} }

View File

@ -1,7 +1,7 @@
@if $gitter_enable { @if $gitter_enable {
.gitter-open-chat-button { .gitter-open-chat-button {
$alignment: sidebar-toggle-alignment(false); $alignment: sidebar-toggle-alignment(false);
#{$alignment[0]}: auto !important; #{nth($alignment, 1)}: auto !important;
#{$alignment[1]}: 10px !important; #{nth($alignment, 2)}: 10px !important;
} }
} }

View File

@ -79,7 +79,6 @@ $motion_trans_post_header: {{ $P.motion.transition.postHeader }};
$post_edit_enable: {{ $P.postEdit.enable }}; $post_edit_enable: {{ $P.postEdit.enable }};
$post_meta_item_text: {{ $P.postMeta.itemText }}; $post_meta_item_text: {{ $P.postMeta.itemText }};
$reward_settings_animation: {{ $P.rewardSets.animation }}; $reward_settings_animation: {{ $P.rewardSets.animation }};
$post_end_line_tip: "{{ $P.postFooter.endLineTip }}";
$post_end_tag_icon: {{ $P.postFooter.tagIcon }}; $post_end_tag_icon: {{ $P.postFooter.tagIcon }};
// TODO find the paramters // TODO find the paramters

View File

@ -7,11 +7,14 @@
baseURL: / baseURL: /
theme: hugo-theme-next theme: hugo-theme-next
canonifyURLs: true
paginate: 8 paginate: 8
enableEmoji: true enableEmoji: true
relativeurls: true
# Make markdown content support HTML syntax # Make markdown content support HTML syntax
markup: markup:
goldmark: goldmark:
@ -41,11 +44,38 @@ 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
postFooter:
endLineTip: "~ End of this post ~"
#-------------------------------------- #--------------------------------------
# Menus Settings # Menus Settings
@ -911,8 +941,8 @@ params:
# Gitter Support # Gitter Support
# For more information: https://gitter.im # For more information: https://gitter.im
gitter: gitter:
enable: false enable: true
room: room: hugo-next/community
# --------------------------------------------------------------- # ---------------------------------------------------------------

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

@ -1,16 +1,20 @@
#-------------------------------------- #--------------------------------------
# English Version # English Version
#-------------------------------------- #--------------------------------------
posts: Posts:
other: Posts other: Posts
tag: Tag:
other: Tag other: Tag
tags: Tags:
other: Tags other: Tags
category: TagTitle:
other: Tag Collection
Category:
other: Category other: Category
categories: Categories:
other: Categories other: Categories
CateTitle:
other: Classify Management
AllSome: AllSome:
other: "All {{ .Some }}" other: "All {{ .Some }}"
@ -27,17 +31,17 @@ SymbolComma:
SymbolPeriod: SymbolPeriod:
other: "." other: "."
SitePostsTitle: SbPostsLable:
other: "Posts" other: "Posts"
SiteCatesTitle: SbCatesTitle:
other: "Categories" other: "Categories"
SiteTagsTitle: SbTagsTitle:
other: "Tags" other: "Tags"
TableOfContents: TableOfContents:
other: "TOC" other: "TOC"
SiteOverview: SiteOverview:
other: "Overview" other: "Overview"
RSSTitle: RSSLable:
other: "RSS Subscribe" other: "RSS Subscribe"
CCLinkTitle: CCLinkTitle:
other: "Creative Commons" other: "Creative Commons"
@ -46,16 +50,13 @@ BackTopLabel:
TagsCounterTitle: TagsCounterTitle:
zero: No tags zero: No tags
one: 1 tag in total
other: "{{ .Count }} tags in total" other: "{{ .Count }} tags in total"
CatesCounterTitle: CatesCounterTitle:
zero: No categories zero: No categories
one: 1 category in total
other: "{{ .Count }} categories in total" other: "{{ .Count }} categories in total"
ArchiveCounterTitle: ArchiveCounterTitle:
zero: No posts. zero: No posts.
one: 1 post. other: "{{ .Count }} posts in total"
other: "{{ .Count }} posts in total."
PostArchiveCheersUm: PostArchiveCheersUm:
other: Um.. other: Um..
@ -75,13 +76,15 @@ PostArchiveKeepOn:
PostStickyTitle: PostStickyTitle:
other: Strickys other: Strickys
PostPublishDate: PostPublishDate:
other: "Publish" other: "Publish on"
PostPublishTime: PostPublishTime:
other: "Create Time" other: "Create Time"
PostLastModDate: PostLastModDate:
other: "Update" other: "Update on"
PostLastModTime: PostLastModTime:
other: "Modify Time" other: "Modify Time"
PostCategory:
other: "Classify at"
PostWords: PostWords:
other: "Words" other: "Words"
PostWordCount: PostWordCount:
@ -92,8 +95,6 @@ PostReadTime:
other: "{{- .ReadingTime -}}min" other: "{{- .ReadingTime -}}min"
PostViews: PostViews:
other: "Views" other: "Views"
PostCatg:
other: "Categories"
PostTag: PostTag:
other: "Tags" other: "Tags"
PostReadMore: PostReadMore:

View File

@ -2,16 +2,20 @@
# 中文版本 # 中文版本
#-------------------------------------- #--------------------------------------
posts: Posts:
other: 文章 other: 文章
tag: Tag:
other: 标签 other: 标签
tags: Tags:
other: 标签 other: 标签
category: TagTitle:
other: 标签集锦
Category:
other: 分类 other: 分类
categories: Categories:
other: 分类 other: 分类
CateTitle:
other: 分类管理
AllSome: AllSome:
other: "所有 {{ .Some }}" other: "所有 {{ .Some }}"
@ -80,6 +84,8 @@ PostLastModDate:
other: 更新于 other: 更新于
PostLastModTime: PostLastModTime:
other: 修改时间 other: 修改时间
PostCategory:
other: "分类于"
PostWords: PostWords:
other: 字数 other: 字数
PostWordCount: PostWordCount:
@ -90,8 +96,6 @@ PostReadTime:
other: "{{- .ReadingTime -}}分钟" other: "{{- .ReadingTime -}}分钟"
PostViews: PostViews:
other: 浏览 other: 浏览
PostCatgs:
other: 分类
PostTags: PostTags:
other: 标签 other: 标签
PostReadMore: PostReadMore:
@ -131,7 +135,7 @@ RewardBitcoin:
PostCommentTitle: PostCommentTitle:
other: 评论交流 other: 评论交流
UserVistorsLabel: VisitorsLabel:
other: 总访客量 other: 总访客量
PageViewsLabel: PageViewsLabel:
other: 总访问量 other: 总访问量

View File

@ -4,7 +4,16 @@
{{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}} {{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}}
{{- define "main" }} {{- define "main" }}
<div class="post-block" lang="{{ .Site.LanguageCode }}"> <div class="post-block" lang="{{ .Site.LanguageCode }}">
<dive class="post-body"> <div class="post-header">
<h1>
{{- if eq .Data.Plural "categories" }}
{{- T "CateTitle" }}
{{- else if eq .Data.Plural "tags" }}
{{- T "TagTitle" }}
{{- end }}
</h1>
</div>
<div class="post-body">
{{- if eq .Data.Plural "categories" }} {{- if eq .Data.Plural "categories" }}
{{ $cats := .Site.Taxonomies.categories }} {{ $cats := .Site.Taxonomies.categories }}
<div class="category-all-page"> <div class="category-all-page">
@ -33,7 +42,9 @@
{{ $randNums := (seq 10) }} {{ $randNums := (seq 10) }}
{{- range $name, $items := $tags }} {{- range $name, $items := $tags }}
<a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize | lower }}">{{ $name }} <a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize | lower }}">{{ $name }}
<span class="tag-list-count"><sup>({{ len $items }})</sup></span> <span class="tag-list-count">
<sup>({{ len $items }})</sup>
</span>
</a> </a>
{{- end }} {{- end }}
</div> </div>

View File

@ -0,0 +1,6 @@
<script type="text/javascript" src="//sidecar.gitter.im/dist/sidecar.v1.js" async></script>
<script type="text/javascript">
((window.gitter = {}).chat = {}).options = {
room: {{ .Site.Params.gitter.room }}
};
</script>

View File

@ -23,3 +23,11 @@
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }} {{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}"> <link rel="stylesheet" href="{{ $css.RelPermalink }}">
<link rel="stylesheet" href="/css/hover.css"> <link rel="stylesheet" href="/css/hover.css">
{{- if .IsPage }}
<style type="text/css">
.post-footer hr:after {
content: "{{ .Site.Params.postFooter.endLineTip }}";
}
</style>
{{- end }}

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

@ -2,7 +2,7 @@
{{- if $.IsHome }} {{- if $.IsHome }}
{{- if and .Site.Params.readMoreBtn (not .Params.Expand) }} {{- if and .Site.Params.readMoreBtn (not .Params.Expand) }}
<div class="post-button"> <div class="post-button">
<a class="btn" href="{{ .Permalink }}#more" rel="contents"> <a class="btn" href="{{ .RelPermalink | relLangURL }}#more" rel="contents">
{{ T "PostReadMore" }} &raquo; {{ T "PostReadMore" }} &raquo;
</a> </a>
</div> </div>

View File

@ -21,14 +21,13 @@
<a target="_blank" href="{{ .Params.OriginLink }}" title="{{ .Title }}">{{ .Params.Link }}</a> <a target="_blank" href="{{ .Params.OriginLink }}" title="{{ .Title }}">{{ .Params.Link }}</a>
{{- else }} {{- else }}
<strong>{{ print (T "PostCRLink") (T "SymbolColon") }}</strong> <strong>{{ print (T "PostCRLink") (T "SymbolColon") }}</strong>
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Permalink }}</a> <a href="{{ .Permalink | absLangURL }}" title="{{ .Title }}">{{ .Permalink | absLangURL }}</a>
{{- end }} {{- end }}
</li> </li>
<li class="post-copyright-license"> <li class="post-copyright-license">
<strong>{{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} </strong> <strong>{{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} </strong>
{{- $ccText := .Site.Params.creativeCommons.license | upper }} {{- $ccText := .Site.Params.creativeCommons.license | upper }}
{{- $lang := .Scratch.Get "lang" }} {{- $ccLink := printf "<a target='_blank' href='https://creativecommons.org/licenses/by-nc-sa/4.0/deed.%s'>%s</a>" (substr .Site.LanguageCode 0 2) $ccText }}
{{- $ccLink := printf "<a target='_blank' href='https://creativecommons.org/licenses/by-nc-sa/4.0/deed.%s'>%s</a>" (substr $lang 0 2) $ccText }}
{{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }} {{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }}
</li> </li>
</ul> </ul>

View File

@ -12,7 +12,7 @@
<i class="fa fa-external-link-alt"></i> <i class="fa fa-external-link-alt"></i>
</a> </a>
{{- else }} {{- else }}
<a href="{{ .Permalink }}" itemprop="url" class="post-title-link">{{ .Title }}</a> <a href="{{ .RelPermalink | relLangURL }}" itemprop="url" class="post-title-link">{{ .Title }}</a>
{{- end }} {{- end }}
{{- else }} {{- else }}
{{- .Title }} {{- .Title }}

View File

@ -4,10 +4,10 @@
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-folder-open"></i> <i class="far fa-folder-open"></i>
</span> </span>
<span class="post-meta-item-text">{{- print (T "PostCatgs") (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>

View File

@ -21,6 +21,10 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Site.Params.gitter.enable }}
{{ partial "_thirdparty/chat/gitter.html" . }}
{{- end }}
<noscript> <noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div> <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript> </noscript>