🔀 Merge local & remote code, seems not good for this.

This commit is contained in:
elkan1788 2024-02-18 16:25:00 +08:00
commit 385f0f023b
25 changed files with 202 additions and 23 deletions

View File

@ -53,6 +53,16 @@ $ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ mv config.toml config.toml.backup $ mv config.toml config.toml.backup
``` ```
Or use `Hugo module` to lead into the theme, see below commands:
```shell
$ cd hugo-next-exmaple
$ hugo mod init hugo-next-exmaple
$ wget -O config.yaml https://github.com/hugo-next/hugo-theme-next/raw/main/exampleSite/config.yaml
$ sed -i 's/hugo-theme-next/github.com\/hugo-next\/hugo-theme-next\/v4/' config.yaml
$ mv config.toml config.toml.backup
```
### 💻 Preview on Local ### 💻 Preview on Local
```shell ```shell
@ -74,6 +84,13 @@ $ cd hugo-next-exmaple
$ git submodule update --remote $ git submodule update --remote
``` ```
Execute command as below if you are using `Hugo module`:
```shell
$ cd hugo-next-exmaple
$ hugo mod get -u
```
## 📝 New Post ## 📝 New Post
There had ready a new post template for you, It is recommended to use the following Hugo command to quickly create a new post: There had ready a new post template for you, It is recommended to use the following Hugo command to quickly create a new post:

View File

@ -52,6 +52,16 @@ $ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ mv config.toml config.toml.backup $ mv config.toml config.toml.backup
``` ```
或通过 `Hugo module` 模式引用本主题,参考如下命令:
```shell
$ cd hugo-next-exmaple
$ hugo mod init hugo-next-exmaple
$ wget -O config.yaml https://github.com/hugo-next/hugo-theme-next/raw/main/exampleSite/config.yaml
$ sed -i 's/hugo-theme-next/github.com\/hugo-next\/hugo-theme-next\/v4/' config.yaml
$ mv config.toml config.toml.backup
```
### 💻 本地预览 ### 💻 本地预览
```shell ```shell
@ -73,6 +83,13 @@ $ cd hugo-next-exmaple
$ git submodule update --remote $ git submodule update --remote
``` ```
如使用 `Hugo module`,执行如下命令:
```shell
$ cd hugo-next-exmaple
$ hugo mod get -u
```
> **Note** > **Note**
> 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。 > 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。

View File

@ -1 +1 @@
4.6.0 4.6.1

View File

@ -99,7 +99,7 @@
@if $icon { @if $icon {
content: $icon; content: $icon;
} }
font-family: 'Font Awesome 5 Free'; font-family: 'Font Awesome 6 Free';
font-weight: 900; font-weight: 900;
} }

View File

@ -278,7 +278,7 @@ NexT.utils = {
const button = element.querySelector('.copy-btn'); const button = element.querySelector('.copy-btn');
button.addEventListener('click', () => { button.addEventListener('click', () => {
const lines = element.querySelector('.code') || element.querySelector('code'); const lines = element.querySelector('.code') || element.querySelector('code');
const code = lines.innerText; const code = lines.innerText.replace(/(\n{2,})/g, '\n');
if (navigator.clipboard) { if (navigator.clipboard) {
// https://caniuse.com/mdn-api_clipboard_writetext // https://caniuse.com/mdn-api_clipboard_writetext
navigator.clipboard.writeText(code).then(() => { navigator.clipboard.writeText(code).then(() => {

View File

@ -1,5 +1,5 @@
# Hugo NexT theme's custom config # Hugo NexT theme's custom config
version: 4.6.0 version: 4.6.1
domain: hugo-next.eu.org domain: hugo-next.eu.org

View File

@ -20,7 +20,7 @@ js:
# CSS Resources # CSS Resources
css: css:
- name: '@fortawesome/fontawesome-free' - name: '@fortawesome/fontawesome-free'
version: 6.1.2 version: 6.4.2
file: css/all.min.css file: css/all.min.css
alias: font-awesome alias: font-awesome
- name: animate.css - name: animate.css
@ -52,12 +52,12 @@ addthis:
waline: waline:
js: js:
name: '@waline/client' name: '@waline/client'
version: 2.13.0 version: 2.15.8
file: dist/waline.js file: dist/waline.js
alias: waline alias: waline
css: css:
name: '@waline/client' name: '@waline/client'
version: 2.13.0 version: 2.15.8
file: dist/waline.css file: dist/waline.css
alias: waline alias: waline

View File

@ -153,7 +153,6 @@ menus:
pageref: /post/math-formula.html pageref: /post/math-formula.html
weight: 2 weight: 2
parent: example parent: example
parent: example
- identifier: syntax - identifier: syntax
name: 语法高亮 name: 语法高亮
pageref: /post/syntax-highlighting.html pageref: /post/syntax-highlighting.html
@ -1047,7 +1046,7 @@ params:
# - flat flat callout style with background, like on Mozilla or StackOverflow. # - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag. # - disabled disable all CSS styles import of note tag.
style: simple style: simple
icons: false icons: true
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
# Offset also applied to label tag variables. This option can work with disabled note tag. # Offset also applied to label tag variables. This option can work with disabled note tag.
lightBgOffset: 0 lightBgOffset: 0

View File

@ -39,7 +39,7 @@ customFilePath:
{{< /note >}} {{< /note >}}
然后在站点的根目录下创建 `layouts/partials` 2个目录用于存放自定布局设计文件另外在站点根目录下创建 `statics/css` 2个目录用于存放自定义 CSS 样式文件。一切就绪后,就可以参考如下的步骤,完成自己的设计想法。 然后在站点的根目录下创建 `layouts/partials` 2个目录用于存放自定布局设计文件另外在站点根目录下创建 `static/css` 2个目录用于存放自定义 CSS 样式文件。一切就绪后,就可以参考如下的步骤,完成自己的设计想法。
## 侧边栏设计 ## 侧边栏设计

View File

@ -66,6 +66,11 @@ url: "post/shortcodes.html"
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
{{< /note >}} {{< /note >}}
{{< note primary >}}
### Primary Header
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
{{< /note >}}
{{< note info >}} {{< note info >}}
### Info Header ### Info Header
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)

3
go.mod.orig Normal file
View File

@ -0,0 +1,3 @@
module github.com/hugo-next/hugo-theme-next
go 1.18

1
hugo-theme-next.go Normal file
View File

@ -0,0 +1 @@
package hugothemenext

136
i18n/fr.yaml Normal file
View File

@ -0,0 +1,136 @@
#--------------------------------------
# French Version
#--------------------------------------
archives:
other: Billets
tag:
other: Tag
tags:
other: Tags
TagTitle:
other: Liste des Tags
category:
other: Categorie
categories:
other: Categories
CateTitle:
other: Classification des items
AllSome:
other: "Total :{{ .Some }}"
Symbol:
colon: ":"
comma: ","
period: "."
Sidebar:
label:
posts: Billets
categories: Categories
tags: Tags
rss: RSS
ccommons: "Creative Commons"
toc: Sommaire
overview: "Présentation"
navToggle: "Fermer/Ouvrire la bar de navigation"
search: Chercher
Terms:
archives: "{{ .Count }} Billets au total"
categories: "{{ .Count }} Categories au total"
tags: "{{ .Count }} Tags au total"
PostArchive:
cheers:
um: Hum...
ok: Ok
nice: Cool
good: Bien
great: Génial
excellent: Excellent
keepOn: Continue de publier.╰(*°▽°*)╯
PostMeta:
sticky: Stickys
publish:
date: "Publié le "
time: "Date de création"
lastmod:
date: "Mise à jour le "
time: "Modifié le "
category: "Classé comme "
words:
title: Nb. Mots
count: "{{- .WordCount -}}"
reading:
title: "Lectures "
time: "{{- .ReadingTime -}} mins"
views: Vues
comments: Commentaires
tags: Tags
more: "Lire la suite"
edit: "Editer ce billet"
Reward:
title: Donner
wechatpay: WechatPay
alipay: Alipay
paypal: Paypal
bitcoin: Bitcoin
PostCopyRight:
title: Titre du billet
author: Autheur du billet
link: Lien du billet
origin:
author: Écrit par
link: Originellement de
license:
title: Note de Copyright
content: "Tous les articles sont sous licence <i class=\"fab fa-fw fa-creative-commons\"></i>%s."
PostFollowMe:
other: "Autres réseaux sociaux"
PostComments:
title: Commentaires
SiteInfoItems:
title: "Statistiques"
runTimes: "En cours:"
words: "Nb. Mots:"
readTimes: "Temps de lecture: "
visitors: "Visiteurs: "
pageViews: "Vues: "
todayViews: "Nombre de vues du jour: "
yesterdayViews: "Nombre de vues d'hier: "
monthViews: "Vues du mois: "
totalViews: "Total des vues: "
lastUpdate: "Dernière mise à jour: "
Footer:
powerby: "Fait par %s"
Search:
placeholder: Recherche...
empty: "Nous n'avons pas trouvé ce que vous cherchiez pour : ${query}"
hits: "${hits} resultats trouvés"
time: "${hits} resultats trouvés en ${time} ms"
DateSuffix:
years: " Années"
days: " Jours"
hours: " Heures"
mins: " Minutes"
month: " Mois"
day: " Jour"
hour: " Heur"
min: " Minute"
just: "A l'instant"
ToolBtns:
comment: "Commenter"
theme: "Changer le theme"
lang: "Traduction Multilingue"
backTop: "Remonter"

View File

@ -42,7 +42,7 @@
{{ if not (in $allSecondaryCats $primaryCategory) }} {{ if not (in $allSecondaryCats $primaryCategory) }}
<li class="category-list-item"> <li class="category-list-item">
<a class="category-list-link" href="{{ "categories/" | relURL }}{{ $primaryCategory | urlize }}"> <a class="category-list-link" href="{{ "categories/" | relURL }}{{ $primaryCategory | urlize }}/">
{{ $primaryCategory }} {{ $primaryCategory }}
<span class="category-list-count">{{ $primaryCount }}</span> <span class="category-list-count">{{ $primaryCount }}</span>
</a> </a>
@ -57,7 +57,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
<li class="category-children-list-item"> <li class="category-children-list-item">
<a class="category-list-link" href="{{ "categories/" | relURL }}{{ . | urlize }}"> <a class="category-list-link" href="{{ "categories/" | relURL }}{{ . | urlize }}/">
{{ . }} {{ . }}
<span class="category-list-count">{{ $secondaryCount }}</span> <span class="category-list-count">{{ $secondaryCount }}</span>
</a> </a>
@ -77,7 +77,7 @@
<div class="tag-cloud-tags"> <div class="tag-cloud-tags">
{{ $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 }}">{{ .Page.Title }} <a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}/">{{ .Page.Title }}
<span class="tag-list-count"> <span class="tag-list-count">
<sup>({{ len $items }})</sup> <sup>({{ len $items }})</sup>
</span> </span>

View File

@ -13,6 +13,7 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.favicon.appleTouchIcon }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.favicon.appleTouchIcon }}">
<meta itemprop="name" content="{{ .Title }}" /> <meta itemprop="name" content="{{ .Title }}" />
<meta itemprop="description" content="{{ .Description | default .Site.Params.description }}" /> <meta itemprop="description" content="{{ .Description | default .Site.Params.description }}" />
<meta name="description" content="{{ .Description | default .Site.Params.description }}" />
{{ if .IsPage }} {{ if .IsPage }}
{{ with .Date }} {{ with .Date }}
<meta itemprop="datePublished" {{ . }} /> <meta itemprop="datePublished" {{ . }} />

View File

@ -2,7 +2,7 @@
{{ with .Params.categories }} {{ with .Params.categories }}
<span class="post-meta-item"> <span class="post-meta-item">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-folder-open"></i> <i class="fas fa-solid fa-folder-open"></i>
</span> </span>
<span class="post-meta-item-text" title="{{ T "PostMeta.category" }}"> <span class="post-meta-item-text" title="{{ T "PostMeta.category" }}">
{{ print (T "PostMeta.category") (T "Symbol.colon") }} {{ print (T "PostMeta.category") (T "Symbol.colon") }}

View File

@ -1,6 +1,6 @@
<span class="post-meta-item" title="{{ T "PostComments" }}"> <span class="post-meta-item" title="{{ T "PostComments" }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-comments"></i> <i class="fas fa-solid fa-comments"></i>
</span> </span>
<span class="post-meta-item-text" title="{{ T "PostMeta.comments" }}"> <span class="post-meta-item-text" title="{{ T "PostMeta.comments" }}">
{{ print (T "PostMeta.comments") (T "Symbol.colon") }} {{ print (T "PostMeta.comments") (T "Symbol.colon") }}

View File

@ -3,7 +3,7 @@
{{ $createdTime := (.Date.Format $timeF) | default (.Date.Format $timeF) }} {{ $createdTime := (.Date.Format $timeF) | default (.Date.Format $timeF) }}
<span class="post-meta-item"> <span class="post-meta-item">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-calendar"></i> <i class="fas fa-solid fa-calendar"></i>
</span> </span>
<span class="post-meta-item-text" title="{{ T "PostMeta.publish.date" }}"> <span class="post-meta-item-text" title="{{ T "PostMeta.publish.date" }}">
{{ print (T "PostMeta.publish.date") (T "Symbol.colon") }} {{ print (T "PostMeta.publish.date") (T "Symbol.colon") }}

View File

@ -1,7 +1,7 @@
{{ if .Site.Params.postMeta.readTime }} {{ if .Site.Params.postMeta.readTime }}
<span class="post-meta-item" title="{{ T "PostMeta.reading.title" }}"> <span class="post-meta-item" title="{{ T "PostMeta.reading.title" }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-clock"></i> <i class="fas fa-solid fa-clock"></i>
</span> </span>
<span class="post-meta-item-text">{{ print (T "PostMeta.reading.title") (T "Symbol.colon") }}&asymp;</span> <span class="post-meta-item-text">{{ print (T "PostMeta.reading.title") (T "Symbol.colon") }}&asymp;</span>
<span>{{ T "PostMeta.reading.time" . }}</span> <span>{{ T "PostMeta.reading.time" . }}</span>

View File

@ -3,7 +3,7 @@
{{ $modTime := .Lastmod.Format .Site.Params.timeFormat }} {{ $modTime := .Lastmod.Format .Site.Params.timeFormat }}
<span class="post-meta-item"> <span class="post-meta-item">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i> <i class="fas fa-solid fa-calendar-check"></i>
</span> </span>
<span class="post-meta-item-text" title="{{ T "PostMeta.lastmod.date" }}"> <span class="post-meta-item-text" title="{{ T "PostMeta.lastmod.date" }}">
{{ print (T "PostMeta.lastmod.date") (T "Symbol.colon") }} {{ print (T "PostMeta.lastmod.date") (T "Symbol.colon") }}

View File

@ -7,7 +7,7 @@
{{ end }} {{ end }}
<span class="post-meta-item" title="{{ T "PostMeta.views" }}"> <span class="post-meta-item" title="{{ T "PostMeta.views" }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-eye"></i> <i class="fas fa-solid fa-eye"></i>
</span> </span>
<span class="post-meta-item-text"> <span class="post-meta-item-text">
{{ print (T "PostMeta.views") (T "Symbol.colon") }} {{ print (T "PostMeta.views") (T "Symbol.colon") }}

View File

@ -1,7 +1,7 @@
{{ if .Site.Params.postMeta.wordCount }} {{ if .Site.Params.postMeta.wordCount }}
<span class="post-meta-item" title="{{ T "PostMeta.words.title" }}"> <span class="post-meta-item" title="{{ T "PostMeta.words.title" }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-file-word"></i> <i class="fas fa-solid fa-file-word"></i>
</span> </span>
<span class="post-meta-item-text">{{ print (T "PostMeta.words.title") (T "Symbol.colon") }}</span> <span class="post-meta-item-text">{{ print (T "PostMeta.words.title") (T "Symbol.colon") }}</span>
<span>{{ T "PostMeta.words.count" . }}</span> <span>{{ T "PostMeta.words.count" . }}</span>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 KiB

After

Width:  |  Height:  |  Size: 973 KiB