diff --git a/.gitignore b/.gitignore
index 8c9526d..fc75fa0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@ exampleSite/content/**/
!exmapleSite/content/about.md
!exampleSite/content/archives
!exampleSite/content/post
+!exampleSite/content/post/image-viewer
# Exclude special files in data folder
!exampleSite/data
diff --git a/README.md b/README.md
index 6f8cea4..0ff2f94 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
[中文](https://github.com/hugo-next/hugo-theme-next/blob/main/README.zh.md) | [English](#)
-
+
## Hugo NexT
@@ -10,7 +10,9 @@
> All page designs & configuration compatibility with Hexo NexT, it's very easy migrate your site from Hexo to Hugo and enjoy yourself.
-[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
+[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [](https://github.com/hugo-next/hugo-theme-next/releases) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
+
+
## 🎨 4 Scheme
@@ -21,10 +23,10 @@
## 👀 Live Preview
-| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status |
-| :---: | :---: | :---: | :---: | :---: | :---: |
+| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status |
+| :---------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------------: | :------------------------------------------------: | :-------------------------------------------------------------------------------------------------: |
| Preliminary | [Gemini](https://preview.hugo-next.eu.org/) | [Muse](https://preview.hugo-next.eu.org/muse/) | [Mist](https://preview.hugo-next.eu.org/mist/) | [Pisces](https://preview.hugo-next.eu.org/pisces/) |  |
-| Production | [Gemini](https://hugo-next.eu.org/) | [Muse](https://hugo-next.eu.org/muse/) | [Mist](https://hugo-next.eu.org/mist/) | [Pisces](https://hugo-next.eu.org/pisces/) |  |
+| Production | [Gemini](https://hugo-next.eu.org/) | [Muse](https://hugo-next.eu.org/muse/) | [Mist](https://hugo-next.eu.org/mist/) | [Pisces](https://hugo-next.eu.org/pisces/) |  |
> - Preliminary: all new feature developments will be previewed as soon as possible.
> - Production: Only the features that are tested stably and meet the requirements will be officially released.
@@ -33,12 +35,11 @@
Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` software in your PC.
-
-### 📰 Use Template
+### 📰 Use Template
If there your first time build blog site, Recommended use template of `Github` which can easily create your site code. Click & visit this repository: [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter), then click the green button which name call `Use this template` upper right corner on the page. Just like below image:
-
+
After do that click the green button which name call `Create repository from template`, then will create your site code automatic, and clone it on your PC environment.
@@ -53,6 +54,16 @@ $ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ 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
```shell
@@ -74,6 +85,13 @@ $ cd hugo-next-exmaple
$ 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
There had ready a new post template for you, It is recommended to use the following Hugo command to quickly create a new post:
@@ -81,12 +99,12 @@ There had ready a new post template for you, It is recommended to use the follo
```sh
$ hugo new posts/hello-world.md
```
+
> **Note**
> By defalut `hugo new` command will create new post under `content` root directory, so in here `posts` were you custom subfolder in `content` directory.
All front matter parameters's description in post as below:
-
```yml
---
title: "{{ replace .Name "-" " " | title }}"
@@ -170,13 +188,16 @@ That's my hobby to develop `Hugo NexT` theme, thanks all people who gived the do
List of Donors(Order desc by Date):
-| Donation time | Donors | Donation mode | Donation content | Message |
-| :-------: | ------ | ------ | ---- | ---- |
-| 2023.06.01 | **霖 | alipay | RMB 10.00 | / |
-| 2022.11.15 | f888 | xianyu | RMB 6.20 | Good luck. |
-| 2022.09.30 | *軒 | wechat pay | RMB 66.66 | Hope it could help more people. |
-| 2022.09.30 | N*l | wechat pay | RMB 20.00 | / |
-| 2022.07.09 | *风 | wechat pay | RMB 10.00 | / |
-| 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. |
-| 2022.02.28 | *娇 | wechat pay | RMB 5.00 | / |
-| 2021.12.21 | z*y | wechat pay | RMB 18.88 | / |
\ No newline at end of file
+| Donation time | Donors | Donation mode | Donation content | Message |
+| :-----------: | ------ | ------------- | ---------------- | -------------------------------------------------------------------------- |
+| 2024.05.11 | *祥 | alipay | RMB 66.66 | Thank you for creating such a great theme. |
+| 2023.07.25 | *五 | alipay | RMB 50.00 | I really like the 'Next' theme, thank you, let me buy you a cup of coffee. |
+| 2023.06.01 | **霖 | alipay | RMB 10.00 | / |
+| 2022.11.15 | f888 | xianyu | RMB 6.20 | Good luck. |
+| 2022.09.30 | *軒 | wechat pay | RMB 66.66 | Hope it could help more people. |
+| 2022.09.30 | N*l | wechat pay | RMB 20.00 | / |
+| 2022.07.09 | *风 | wechat pay | RMB 10.00 | / |
+| 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. |
+| 2022.02.28 | *娇 | wechat pay | RMB 5.00 | / |
+| 2021.12.21 | z*y | wechat pay | RMB 18.88 | / |
+
diff --git a/README.zh.md b/README.zh.md
index ea54e6b..b7172fc 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -1,7 +1,7 @@
[中文](#) | [English](https://github.com/hugo-next/hugo-theme-next/blob/main/README.md)
-
+
## Hugo NexT
@@ -10,7 +10,9 @@
> 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。
-[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
+[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [](https://github.com/hugo-next/hugo-theme-next/releases) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
+
+
## 🎨 4 种页面模式
@@ -21,10 +23,10 @@
## 👀 在线预览
-| 环境 | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | 状态 |
-| :---: | :---: | :---: | :---: | :---: | :---: |
+| 环境 | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | 状态 |
+| :------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------------: | :------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
| 开发版本 | [双子座](https://preview.hugo-next.eu.org/) | [冥想](https://preview.hugo-next.eu.org/muse/) | [迷雾](https://preview.hugo-next.eu.org/mist/) | [双鱼座](https://preview.hugo-next.eu.org/pisces/) |  |
-| 正式版本 | [双子座](https://hugo-next.eu.org/) | [冥想](https://hugo-next.eu.org/muse/) | [迷雾](https://hugo-next.eu.org/mist/) | [双鱼座](https://hugo-next.eu.org/pisces/) |  |
+| 正式版本 | [双子座](https://hugo-next.eu.org/) | [冥想](https://hugo-next.eu.org/muse/) | [迷雾](https://hugo-next.eu.org/mist/) | [双鱼座](https://hugo-next.eu.org/pisces/) |  |
> - 开发版本: 所有的新功能开发都会在此第一时间发布预览
> - 正式版本: 只有测试稳定且符合要求的功能才会正式发布
@@ -37,7 +39,7 @@
如果你是初次建站的话,可以使用 `Github` 的模板功能,一键生成你的站点仓库代码。访问 [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter) 点击右上角的 `Use this template` 绿色按钮然后填写代码仓库的相关信息,参考如下:
-
+
最后点击 `Create repository from template` 绿色按钮,会直接在你的空间中生成站点代码,再把它克隆到本地进行创作。
@@ -52,6 +54,16 @@ $ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ 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
@@ -73,6 +85,13 @@ $ cd hugo-next-exmaple
$ git submodule update --remote
```
+如使用 `Hugo module`,执行如下命令:
+
+```shell
+$ cd hugo-next-exmaple
+$ hugo mod get -u
+```
+
> **Note**
> 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。
@@ -89,7 +108,6 @@ $ hugo new posts/hello-world.md
关于文章头部那些参数作用的说明参考如下:
-
```yml
---
# 文章标题
@@ -179,13 +197,16 @@ Copyright (c) 2022, hugo-next 团队
以下是打赏名单列表(按时间倒序):
-| 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 |
-| :-------: | ------ | ------ | ---- | ---- |
-| 2023.06.01 | **霖 | 支付宝 | ¥10.00 | / |
-| 2022.11.15 | f888 | 咸鱼 | ¥6.20 | 聊表心意 |
-| 2022.09.30 | *軒 | 微信支付 | ¥66.66 | 愿项目造福更多人! |
-| 2022.09.30 | N*l | 微信支付 | ¥20.00 | / |
-| 2022.07.09 | *风 | 微信支付 | ¥10.00 | / |
-| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |
-| 2022.02.28 | *娇 | 微信支付 | ¥5.00 | / |
-| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |
\ No newline at end of file
+| 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 |
+| :--------: | ------ | -------- | -------- | -------------------------------- |
+| 2024.05.11 | *祥 | 支付宝 | ¥66.66 | 感谢创作这么好的主题 |
+| 2023.07.25 | *五 | 微信支付 | ¥50.00 | 很喜欢next主题,感谢,请你喝咖啡 |
+| 2023.06.01 | **霖 | 支付宝 | ¥10.00 | / |
+| 2022.11.15 | f888 | 咸鱼 | ¥6.20 | 聊表心意 |
+| 2022.09.30 | *軒 | 微信支付 | ¥66.66 | 愿项目造福更多人! |
+| 2022.09.30 | N*l | 微信支付 | ¥20.00 | / |
+| 2022.07.09 | *风 | 微信支付 | ¥10.00 | / |
+| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |
+| 2022.02.28 | *娇 | 微信支付 | ¥5.00 | / |
+| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |
+
diff --git a/VERSION b/VERSION
index ae6e65b..3208b09 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.5.3
\ No newline at end of file
+4.6.2
\ No newline at end of file
diff --git a/assets/css/_common/outline/footer/index.scss b/assets/css/_common/outline/footer/index.scss
index be1ba96..4e200b4 100644
--- a/assets/css/_common/outline/footer/index.scss
+++ b/assets/css/_common/outline/footer/index.scss
@@ -47,6 +47,14 @@
img {
display: inline-block;
+ max-width: 50px;
+ @include mobile() {
+ max-width: 40px;
+ }
+
+ &:last-child {
+ max-height: 18px;
+ }
}
$footer_vendors_imgs_len: length($footer_vendors_imgs_width);
diff --git a/assets/css/_common/outline/header/menu.scss b/assets/css/_common/outline/header/menu.scss
index 01f4093..10d9d76 100644
--- a/assets/css/_common/outline/header/menu.scss
+++ b/assets/css/_common/outline/header/menu.scss
@@ -1,12 +1,26 @@
// Menu
// --------------------------------------------------
-.menu {
+.menu, .menu-children {
margin: 0;
padding: 1em 0;
text-align: center;
}
-.menu-item {
+.menu-children {
+ max-height: 0;
+ padding: 0;
+ overflow: hidden;
+ transition: max-height 1.5s ease-out;
+}
+
+ .menu-children {
+ &.expand {
+ max-height: 400px;
+ transition: max-height 1.5s ease-in;
+ }
+}
+
+.menu-item, .menu-child-item {
display: inline-block;
list-style: none;
margin: 0 10px;
@@ -51,6 +65,15 @@
margin-left: 0;
}
}
+
+ .menu-item-shrink-icon {
+ float: right;
+ }
+}
+
+.menu-child-item {
+ display: block;
+ margin: 0;
}
.use-motion .menu-item {
diff --git a/assets/css/_mixins.scss b/assets/css/_mixins.scss
index e0c65c5..0243dd5 100644
--- a/assets/css/_mixins.scss
+++ b/assets/css/_mixins.scss
@@ -99,7 +99,7 @@
@if $icon {
content: $icon;
}
- font-family: 'Font Awesome 5 Free';
+ font-family: 'Font Awesome 6 Free';
font-weight: 900;
}
diff --git a/assets/css/_schemes/Mist/_menu.scss b/assets/css/_schemes/Mist/_menu.scss
index 6f4ae85..3404e3d 100644
--- a/assets/css/_schemes/Mist/_menu.scss
+++ b/assets/css/_schemes/Mist/_menu.scss
@@ -34,6 +34,10 @@
}
}
+ // a + ul {
+ // top: calc(30% + 5px);
+ // }
+
.badge {
background: white;
border-radius: 10px;
@@ -41,5 +45,24 @@
padding: 1px 4px;
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
}
+
+ .menu-item-shrink-icon {
+ margin-left: 5px;
+ }
+ }
+}
+
+.menu-children {
+ display: none;
+ transition: transform 1s ease-in-out;
+ transform: translateY(-100%);
+ // position: absolute;
+ // z-index: 999;
+
+ &.expand {
+ display: block;
+ max-height: 400px;
+ transition: transform 1.5s ease-in;
+ transform: translateY(-100%);
}
}
diff --git a/assets/css/_schemes/Pisces/_menu.scss b/assets/css/_schemes/Pisces/_menu.scss
index abacc7b..f932316 100644
--- a/assets/css/_schemes/Pisces/_menu.scss
+++ b/assets/css/_schemes/Pisces/_menu.scss
@@ -43,4 +43,4 @@
top: 50%;
width: 6px;
}
-}
+}
\ No newline at end of file
diff --git a/assets/js/next-boot.js b/assets/js/next-boot.js
index 47339f6..03eeedd 100644
--- a/assets/js/next-boot.js
+++ b/assets/js/next-boot.js
@@ -17,6 +17,7 @@
NexT.boot.registerEvents = function() {
+ NexT.utils.registerMenuClick();
NexT.utils.registerImageLoadEvent();
NexT.utils.registerScrollPercent();
// NexT.utils.registerCanIUseTag();
diff --git a/assets/js/utils.js b/assets/js/utils.js
index e78675e..0cdd6bf 100644
--- a/assets/js/utils.js
+++ b/assets/js/utils.js
@@ -7,6 +7,29 @@ HTMLElement.prototype.wrap = function (wrapper) {
};
NexT.utils = {
+ registerMenuClick: function() {
+ const pMenus = document.querySelectorAll('.main-menu > li > a.menus-parent');
+ pMenus.forEach(function(item) {
+ const icon = item.querySelector('span > i');
+ var ul = item.nextElementSibling;
+
+ item.addEventListener('click', function(e) {
+ e.preventDefault();
+
+ ul.classList.toggle('expand');
+ if (ul.classList.contains('expand')) {
+ icon.className = 'fa fa-angle-down';
+ } else {
+ icon.className = 'fa fa-angle-right';
+ }
+ });
+
+ var cCls = ul.querySelectorAll('.menu-item-active');
+ if (cCls != null && cCls.length > 0) {
+ item.click();
+ }
+ });
+ },
registerImageLoadEvent: function() {
const images = document.querySelectorAll('.sidebar img, .post-block img, .vendors-list img');
@@ -35,7 +58,10 @@ NexT.utils = {
},
registerImageViewer: function() {
- new Viewer(document.querySelector('.post-body'),{ navbar:2, toolbar:2 });
+ const post_body = document.querySelector('.post-body');
+ if (post_body) {
+ new Viewer(post_body,{ navbar:2, toolbar:2 });
+ }
},
registerToolButtons: function () {
@@ -215,25 +241,25 @@ NexT.utils = {
},
getCDNResource: function (res) {
- let { plugins, router } = NexT.CONFIG.vendor;
- let { name, version, file, alias, alias_name } = res;
- let npm_name = name;
- if (alias_name) npm_name = alias_name;
+ let router = NexT.CONFIG.vendor.router;
+ let { name, version, file, alias, alias_name } = res;
+
let res_src = '';
- switch (plugins) {
- case 'cdnjs':
- case 'bootcdn':
- case 'qiniu':
- let cdnjs_name = alias || name;
- let cdnjs_file = file.replace(/^(dist|lib|source|\/js|)\/(browser\/|)/, '');
- if (cdnjs_file.indexOf('min') == -1) {
- cdnjs_file = cdnjs_file.replace(/\.js$/, '.min.js');
+
+ switch (router.type) {
+ case "modern":
+ if (alias_name) name = alias_name;
+ let alias_file = file.replace(/^(dist|lib|source|\/js|)\/(browser\/|)/, '');
+ if (alias_file.indexOf('min') == -1) {
+ alias_file = alias_file.replace(/\.js$/, '.min.js');
}
- res_src = `${router}/${cdnjs_name}/${version}/${cdnjs_file}`
+ res_src = `${router.url}/${name}/${version}/${alias_file}`;
break;
default:
- res_src = `${router}/${npm_name}@${version}/${file}`
+ if (alias) name = alias;
+ res_src = `${router.url}/${name}@${version}/${file}`;
+ break;
}
return res_src;
@@ -255,7 +281,7 @@ NexT.utils = {
const button = element.querySelector('.copy-btn');
button.addEventListener('click', () => {
const lines = element.querySelector('.code') || element.querySelector('code');
- const code = lines.innerText;
+ const code = lines.innerText.replace(/(\n{2,})/g, '\n');
if (navigator.clipboard) {
// https://caniuse.com/mdn-api_clipboard_writetext
navigator.clipboard.writeText(code).then(() => {
@@ -647,4 +673,4 @@ NexT.utils = {
intersectionObserver.observe(element);
});
}
-};
\ No newline at end of file
+};
diff --git a/data/config.yaml b/data/config.yaml
index c49db0c..9e2a348 100644
--- a/data/config.yaml
+++ b/data/config.yaml
@@ -1,5 +1,5 @@
# Hugo NexT theme's custom config
-version: 4.5.3
+version: 4.6.2
domain: hugo-next.eu.org
\ No newline at end of file
diff --git a/data/resources.yaml b/data/resources.yaml
index 5c8c52e..c0aa4c7 100644
--- a/data/resources.yaml
+++ b/data/resources.yaml
@@ -1,33 +1,79 @@
# CDN 公共资源商列表
# Public CDN vendor list
vendors:
- cdnjs: "https://cdnjs.cloudflare.com/ajax/libs"
- unpkg: "https://unpkg.com"
- bootcdn: "https://cdn.bootcdn.net/ajax/libs"
- qiniu: "https://cdn.staticfile.org"
+ - name: cdnjs
+ home: "https://cdnjs.com"
+ logo: "https://cdnjs.com/_/f7a2ebfb819c118086546e481876aef6.svg"
+ type: "modern"
+ url: "https://cdnjs.cloudflare.com/ajax/libs"
+
+ - name: unpkg
+ home: "https://unpkg.com"
+ logo: "https://unpkg.fly.dev/_client/b870d5fb04d2854d.png"
+ type: "nodejs"
+ url: "https://unpkg.com"
+
+ - name: bootcdn
+ home: "https://www.bootcdn.cn"
+ logo: "https://www.bootcdn.cn/assets/img/logo.png"
+ type: "modern"
+ url: "https://cdn.bootcdn.net/ajax/libs"
+
+ - name: staticfile
+ home: "https://staticfile.net/"
+ logo: "https://www.staticfile.net/images/logo.png"
+ type: "modern"
+ url: "https://cdn.staticfile.net"
+
+ - name: 7ed
+ home: "https://www.7ed.net"
+ logo: "https://github.com/7ednet/homepage/raw/main/_images/logo.svg"
+ type: "modern"
+ url: "https://use.sevencdn.com/ajax/libs"
+
+ - name: zstatic
+ home: "https://www.zstatic.net"
+ logo: "https://www.zstatic.net/favicon/favicon-16x16.png"
+ type: "modern"
+ url: "https://s4.zstatic.net/ajax/libs"
+
+ - name: zeyao
+ home: "https://cdn.jsdmirror.com/"
+ logo: "https://img.cuteapi.com/2023/08/29/Background.png"
+ type: "nodejs"
+ url: "https://cdn.jsdmirror.com/npm"
+
+ - name: jsdelivr
+ home: "https://www.jsdelivr.com/"
+ logo: "https://www.jsdelivr.com/assets/0c183396fdb0079ea31849b02bc5e3429f1740de/img/jsdelivr-horizontal-regular.svg"
+ type: "nodejs"
+ url: "https://cdn.jsdelivr.net/npm"
# JavaScript 资源
# JavaScript Resources
js:
- name: animejs
- version: 3.2.1
+ version: 3.2.2
file: lib/anime.min.js
+
- name: viewerjs
- version: 1.11.0
+ version: 1.11.6
file: dist/viewer.min.js
# CSS 资源
# CSS Resources
css:
- - name: '@fortawesome/fontawesome-free'
- version: 6.1.2
+ - name: font-awesome
+ version: 6.6.0
file: css/all.min.css
- alias: font-awesome
+ alias: '@fortawesome/fontawesome-free'
+
- name: animate.css
- version: 3.1.1
+ version: 4.1.1
file: animate.min.css
+
- name: viewerjs
- version: 1.11.0
+ version: 1.11.6
file: dist/viewer.min.css
# 第三方服务组件资源
@@ -51,25 +97,27 @@ addthis:
# Comment component
waline:
js:
- name: '@waline/client'
- version: 2.13.0
+ name: waline
+ version: 2.15.8
file: dist/waline.js
- alias: waline
+ alias: "@waline/client"
+
css:
- name: '@waline/client'
- version: 2.13.0
+ name: waline
+ version: 2.15.8
file: dist/waline.css
- alias: waline
+ alias: "@waline/client"
artalk:
js:
name: artalk
- version: 2.3.4
- file: dist/Artalk.js
+ version: 2.6.4
+ file: dist/Artalk.min.js
+
css:
name: artalk
- version: 2.3.4
- file: dist/Artalk.css
+ version: 2.6.4
+ file: dist/Artalk.min.css
giscus:
js: https://giscus.app/client.js
@@ -84,11 +132,12 @@ livere:
# Full text search
algolia:
name: algoliasearch
- version: 4.14.2
+ version: 4.24.0
file: dist/algoliasearch-lite.umd.js
+
instant:
name: instantsearch.js
- version: 4.49.0
+ version: 4.73.2
file: dist/instantsearch.production.min.js
plugins:
@@ -96,37 +145,45 @@ plugins:
mathjax:
js:
name: mathjax
- version: 3.2.0
+ version: 3.2.2
file: es5/tex-mml-chtml.js
+
katex:
js:
- name: katex
- version: 0.16.0
+ alias_name: KaTeX
+ version: 0.16.9
file: dist/katex.min.js
+
- name: auto-render
- alias_name: katex
- version: 0.16.0
+ alias: katex
+ alias_name: KaTeX
+ version: 0.16.9
file: dist/contrib/auto-render.min.js
+
css:
name: katex
- version: 0.16.0
+ alias_name: KaTeX
+ version: 0.16.9
file: dist/katex.min.css
+
# 画图渲染
mermaid:
js:
name: mermaid
- version: 9.1.7
+ version: 10.9.1
file: dist/mermaid.min.js
# 文章访问/评论统计
waline:
js:
- name: pageview
- alias_name: '@waline/client'
- version: 2.13.0
+ alias_name: waline
+ version: 2.15.8
file: dist/pageview.js
- alias: waline
+ alias: "@waline/client"
+
- name: comment
- alias_name: '@waline/client'
- version: 2.13.0
+ alias_name: waline
+ version: 2.15.8
file: dist/comment.js
- alias: waline
\ No newline at end of file
+ alias: "@waline/client"
\ No newline at end of file
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
index e15c471..d3f6a87 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -388,7 +388,7 @@ params:
footer:
# 启动谷歌翻译功能
# Enable google translate in footer
- translate: true
+ translate: false
# 站点开始年份,默认为当下时间的年份
# Specify the year when the site was setup.
# If not defined, current year will be used.
@@ -812,11 +812,11 @@ params:
- name: waline
title: Waline
color: "#27ae60"
- weight: 2
+ weight: 1
- name: giscus
title: Giscus
color: "#886ce4"
- weight: 1
+ weight: 2
# Waline 评论插件
# 更多配置信息请参考:https://waline.js.org/
@@ -1027,7 +1027,7 @@ params:
# - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag.
style: simple
- icons: false
+ icons: true
# 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.
lightBgOffset: 0
@@ -1103,30 +1103,18 @@ params:
# ---------------------------------------------------------------
- # CDN 服务(暂时只支持 unpkg 和 cndjs)
+ # CDN 服务
# CDN Settings
# ---------------------------------------------------------------
- vendors:
+ vendors:
# The CDN provider of NexT internal scripts.
- # Available values: local | unpkg | cdnjs | qiniu | bootcdn | custom
- # Warning: If you are using the latest master branch of NexT, please set `internal: local`
+ # Available values: local | cdn
internal: local
# The default CDN provider of third-party plugins.
- # Available values: local | unpkg | cdnjs| qiniu | bootcdn | custom
- # Dependencies for `plugins: local`: https://github.com/next-theme/plugins
- plugins: qiniu
- # TODO
+ # Available values: local | cdnjs | unpkg | jsdelivr | staticfile | bootcdn | 7ed | zstatic | zeyao | custom
+ plugins: local
# Custom CDN URL
# For example:
# custom_cdn_url: https://cdn.jsdelivr.net/npm/${npm_name}@${version}/${minified}
- # custom_cdn_url: https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${cdnjs_file}
- #custom_cdn_url:
-
- # TODO
- # Assets
- # Accelerate delivery of static files using a CDN
- # The js option is only valid when vendors.internal is local.
- css: css
- js: js
- images: imgs
\ No newline at end of file
+ # custom_cdn_url: https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${cdnjs_file}
\ No newline at end of file
diff --git a/exampleSite/content/post/custom-files.md b/exampleSite/content/post/custom-files.md
index c374deb..460c0c6 100644
--- a/exampleSite/content/post/custom-files.md
+++ b/exampleSite/content/post/custom-files.md
@@ -14,7 +14,7 @@ tags:
- 个性化
- 布局
-url: "post/custom-files.html"
+url: "demo/custom-files.html"
toc: true
---
@@ -39,7 +39,7 @@ customFilePath:
{{< /note >}}
-然后在站点的根目录下创建 `layouts/partials` 2个目录,用于存放自定布局设计文件,另外在站点根目录下创建 `statics/css` 2个目录,用于存放自定义 CSS 样式文件。一切就绪后,就可以参考如下的步骤,完成自己的设计想法。
+然后在站点的根目录下创建 `layouts/partials` 2个目录,用于存放自定布局设计文件,另外在站点根目录下创建 `static/css` 2个目录,用于存放自定义 CSS 样式文件。一切就绪后,就可以参考如下的步骤,完成自己的设计想法。
## 侧边栏设计
diff --git a/exampleSite/content/post/emoji-support.md b/exampleSite/content/post/emoji-support.md
index ebe8847..4eda136 100644
--- a/exampleSite/content/post/emoji-support.md
+++ b/exampleSite/content/post/emoji-support.md
@@ -14,7 +14,7 @@ tags:
- 表情
- emoji
-url: "post/emoji-support.html"
+url: "demo/emoji-support.html"
---
Emoji 可以通过多种方式在 Hugo 项目中启用。
diff --git a/exampleSite/content/post/hello-world.md b/exampleSite/content/post/hello-world.md
index a6e6340..0d3bfd3 100644
--- a/exampleSite/content/post/hello-world.md
+++ b/exampleSite/content/post/hello-world.md
@@ -12,7 +12,7 @@ tags:
- Hugo
- 开始
-url: post/hello-world.html
+url: demo/hello-world.html
toc: true
weight: 2
---
diff --git a/exampleSite/content/post/image-viewer.md b/exampleSite/content/post/image-viewer.md
new file mode 100644
index 0000000..19c8af2
--- /dev/null
+++ b/exampleSite/content/post/image-viewer.md
@@ -0,0 +1,40 @@
+---
+title: "图像浏览工具 "
+description: "默认会对文章内的图片, 进行图片浏览,点击图片可以查看大图,点击空白处可以关闭。"
+keywords: "image,图像,浏览器,相册"
+
+date: 2024-07-21T10:28:12+08:00
+lastmod: 2024-07-21T10:28:12+08:00
+
+categories:
+ - 示例文章
+
+tags:
+ - 图像
+ - 相册
+ - 浏览
+
+url: "demo/image-viewer.html"
+toc: false
+---
+
+本主题自带图像浏览器功能,支持对文章区域内出现的图片进行浏览,点击图片可以查看大图,点击空白处可以关闭。不需要配置任何参数,只要在文章里面相应的位置添加图片信息即可 。
+
+
+
+图像浏览器引用了 [fengyuanchen](https://fengyuanchen.github.io/) 开发的 [viewerjs](https://fengyuanchen.github.io/viewerjs/),支持显示图像名称,尺寸,旋转,缩放,播放等功能。可点击如下的示例图像查看体验:
+
+## 动物
+
+
+
+
+
+
+## 风景
+
+
+
+
+
+
diff --git a/exampleSite/content/post/image-viewer/preview_cute-scottish-fold-cat.jpg b/exampleSite/content/post/image-viewer/preview_cute-scottish-fold-cat.jpg
new file mode 100644
index 0000000..6618ddc
Binary files /dev/null and b/exampleSite/content/post/image-viewer/preview_cute-scottish-fold-cat.jpg differ
diff --git a/exampleSite/content/post/image-viewer/preview_horses.jpg b/exampleSite/content/post/image-viewer/preview_horses.jpg
new file mode 100644
index 0000000..508e79e
Binary files /dev/null and b/exampleSite/content/post/image-viewer/preview_horses.jpg differ
diff --git a/exampleSite/content/post/image-viewer/preview_luxury-resort-in-maldives.jpg b/exampleSite/content/post/image-viewer/preview_luxury-resort-in-maldives.jpg
new file mode 100644
index 0000000..aa0a7ca
Binary files /dev/null and b/exampleSite/content/post/image-viewer/preview_luxury-resort-in-maldives.jpg differ
diff --git a/exampleSite/content/post/image-viewer/preview_norway-autumn-landscape.jpg b/exampleSite/content/post/image-viewer/preview_norway-autumn-landscape.jpg
new file mode 100644
index 0000000..31b209f
Binary files /dev/null and b/exampleSite/content/post/image-viewer/preview_norway-autumn-landscape.jpg differ
diff --git a/exampleSite/content/post/image-viewer/preview_owl-family-background.jpg b/exampleSite/content/post/image-viewer/preview_owl-family-background.jpg
new file mode 100644
index 0000000..b198c90
Binary files /dev/null and b/exampleSite/content/post/image-viewer/preview_owl-family-background.jpg differ
diff --git a/exampleSite/content/post/image-viewer/preview_scottish-fold-kitten.jpg b/exampleSite/content/post/image-viewer/preview_scottish-fold-kitten.jpg
new file mode 100644
index 0000000..3882c4f
Binary files /dev/null and b/exampleSite/content/post/image-viewer/preview_scottish-fold-kitten.jpg differ
diff --git a/exampleSite/content/post/image-viewer/preview_sea-shell.jpg b/exampleSite/content/post/image-viewer/preview_sea-shell.jpg
new file mode 100644
index 0000000..86144d1
Binary files /dev/null and b/exampleSite/content/post/image-viewer/preview_sea-shell.jpg differ
diff --git a/exampleSite/content/post/image-viewer/preview_the-arch-sunset.jpg b/exampleSite/content/post/image-viewer/preview_the-arch-sunset.jpg
new file mode 100644
index 0000000..1ef9636
Binary files /dev/null and b/exampleSite/content/post/image-viewer/preview_the-arch-sunset.jpg differ
diff --git a/exampleSite/content/post/markdown-syntax.md b/exampleSite/content/post/markdown-syntax.md
index 5f813c4..974cb37 100644
--- a/exampleSite/content/post/markdown-syntax.md
+++ b/exampleSite/content/post/markdown-syntax.md
@@ -7,7 +7,7 @@ lastmod: 2022-06-03T11:52:18+08:00
publishDate: 2022-06-03T11:52:18+08:00
author: Mainroad
-originLink: https://mainroad-demo.netlify.app/post/basic-elements/
+originLink: https://mainroad-demo.netlify.app/demo/basic-elements/
categories:
- 示例文章
@@ -19,7 +19,7 @@ tags:
toc: false
draft: false
-url: post/markdown-syntax.html
+url: demo/markdown-syntax.html
---
仅以此篇文章来测试下在 `NexT` 主题中在通过 `Hugo` 引擎来建站时,是否支持 `Markdown` 文件内容中所写的各种语法,并展示下实际的效果。
@@ -208,4 +208,4 @@ Xn + Yn = Zn
比特作为信息论中的信息单位,也被称为 shannon ,以信息论领域的创始人 Claude shannon 的名字命名。
参考:
-- 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/post/basic-elements/) 内容
+- 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/demo/basic-elements/) 内容
diff --git a/exampleSite/content/post/math-formula.md b/exampleSite/content/post/math-formula.md
index e0ead99..b047921 100644
--- a/exampleSite/content/post/math-formula.md
+++ b/exampleSite/content/post/math-formula.md
@@ -15,7 +15,7 @@ tags:
- katex
-url: "post/math-formula.html"
+url: "demo/math-formula.html"
math: mathjax
---
diff --git a/exampleSite/content/post/mermaid-charts.md b/exampleSite/content/post/mermaid-charts.md
index 1aa92a2..cf426ac 100644
--- a/exampleSite/content/post/mermaid-charts.md
+++ b/exampleSite/content/post/mermaid-charts.md
@@ -13,7 +13,7 @@ tags:
- 流程图
- 时序图
-url: "post/mermaid-charts.html"
+url: "demo/mermaid-charts.html"
mermaid: true
toc: true
---
diff --git a/exampleSite/content/post/no-header-title.md b/exampleSite/content/post/no-header-title.md
index f7a6a6c..6119175 100644
--- a/exampleSite/content/post/no-header-title.md
+++ b/exampleSite/content/post/no-header-title.md
@@ -14,7 +14,7 @@ tags:
comment:
enable: false
-url: "post/no-header-title.html"
+url: "demo/no-header-title.html"
---
刘慈欣2018克拉克奖获奖感言(部分内容节选)。
diff --git a/exampleSite/content/post/shortcodes.md b/exampleSite/content/post/shortcodes.md
index 4cac174..b38c569 100644
--- a/exampleSite/content/post/shortcodes.md
+++ b/exampleSite/content/post/shortcodes.md
@@ -12,7 +12,7 @@ categories:
tags:
- 短代码
- 语法
-url: "post/shortcodes.html"
+url: "demo/shortcodes.html"
---
虽然 `Markdown` 语法已经非常丰富能够满足我们写文章的绝大部分需求,但是为更好的对文章内容进行更友好的排版,为引设计一套自定义的短语,便于在使用时能够快速引用。
@@ -66,6 +66,11 @@ url: "post/shortcodes.html"
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
{{< /note >}}
+{{< note primary >}}
+ ### Primary Header
+ **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
+{{< /note >}}
+
{{< note info >}}
### Info Header
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
@@ -84,4 +89,4 @@ url: "post/shortcodes.html"
{{< note danger >}}
### Danger Header
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
-{{< /note >}}
+{{< /note >}}
\ No newline at end of file
diff --git a/exampleSite/content/post/syntax-highlighting.md b/exampleSite/content/post/syntax-highlighting.md
index 6b91cc7..eafb9fb 100644
--- a/exampleSite/content/post/syntax-highlighting.md
+++ b/exampleSite/content/post/syntax-highlighting.md
@@ -14,7 +14,7 @@ tags:
- 高亮
- Chroma
-url: post/syntax-highlighting.html
+url: demo/syntax-highlighting.html
---
Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用 Chroma 作为代码块高亮支持,它内置在 Go 语言当中,速度是真的非常、非常快,而且最为重要的是它也兼容之前我们使用的 Pygments 方式。
diff --git a/exampleSite/content/post/table-of-content.md b/exampleSite/content/post/table-of-content.md
index 039963b..b25dda8 100644
--- a/exampleSite/content/post/table-of-content.md
+++ b/exampleSite/content/post/table-of-content.md
@@ -14,7 +14,7 @@ tags:
- 博客
toc: true
-url: post/table-of-content.html
+url: demo/table-of-content.html
---
巴顿将军说过:“衡量一个人是否成功,不是看他站到顶峰,而是从顶峰跌落之后的反弹力”,褚时健的人生便是如此,中年发家致富,名利双收,之后又跌落到谷底,等到74岁再创业,10年后带着褚橙归来,东山再起收获亿万财富,他的发展轨迹就是反弹的过程。
diff --git a/exampleSite/data/flinks.yaml b/exampleSite/data/flinks.yaml
index 78d1b96..4c756eb 100644
--- a/exampleSite/data/flinks.yaml
+++ b/exampleSite/data/flinks.yaml
@@ -8,16 +8,22 @@
desc: 世界上最快的网站建设框架!
avatar: https://gohugo.io/favicon-32x32.png
link: https://gohugo.io
+ timeout: 2
+ visible: true
- name: Hugo-NexT
desc: Hugo NexT 官方预览网站。
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
link: https://hugo-next.eu.org
+ timeout: 2
+ visible: true
- name: 凡梦星尘空间站
desc: 再平凡的人也有属于他的梦想!
- avatar: https://lisenhui.cn/imgs/avatar.png
+ avatar: https://elkan1788.github.io/imgs/avatar.png
link: https://lisenhui.cn
+ timeout: 2
+ visible: true
- FLinksTitle: Hugo NexT 粉丝群体
@@ -26,4 +32,6 @@
- name: 阿哈吉
desc: 全网首个 Hugo NexT 忠实粉丝用户
avatar: https://a.happy2008.top/imgs/stayhome-small.png
- link: https://a.happy2008.top/
\ No newline at end of file
+ link: https://a.happy2008.top/
+ timeout: 2
+ visible: true
\ No newline at end of file
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..b60b59f
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module github.com/hugo-next/hugo-theme-next
+
+go 1.18
\ No newline at end of file
diff --git a/hugo-theme-next.go b/hugo-theme-next.go
new file mode 100644
index 0000000..31341b5
--- /dev/null
+++ b/hugo-theme-next.go
@@ -0,0 +1 @@
+package hugothemenext
diff --git a/i18n/fr.yaml b/i18n/fr.yaml
new file mode 100644
index 0000000..fcd936c
--- /dev/null
+++ b/i18n/fr.yaml
@@ -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 %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"
diff --git a/images/hugo-next-primary.png b/images/hugo-next-primary.png
new file mode 100644
index 0000000..7b8fdde
Binary files /dev/null and b/images/hugo-next-primary.png differ
diff --git a/images/hugo-next-secondary.png b/images/hugo-next-secondary.png
new file mode 100644
index 0000000..eca41ba
Binary files /dev/null and b/images/hugo-next-secondary.png differ
diff --git a/images/hugo-next-symbol.png b/images/hugo-next-symbol.png
new file mode 100644
index 0000000..23f43d1
Binary files /dev/null and b/images/hugo-next-symbol.png differ
diff --git a/images/use-hugo-next-starter.png b/images/use-hugo-next-starter.png
new file mode 100644
index 0000000..45f576d
Binary files /dev/null and b/images/use-hugo-next-starter.png differ
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 85ff661..2559499 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -23,9 +23,14 @@