Merge branch 'release'

This commit is contained in:
凡梦星尘 2022-07-03 10:42:36 +08:00
commit 4a0c767064
58 changed files with 1321 additions and 1063 deletions

48
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@ -0,0 +1,48 @@
---
name: 错误报告(Bug Report)
about: 没有达到预期的效果(Something isn't working as expected)
labels: bug
---
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
(Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.)
## 问题自检列表 (Issue Checklist)
> 请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
- [ ] 已使用 Hugo Extended 0.86.0 或更高的版本 (I'm using Hugo Extended version 0.86.0 or later)
- [ ] 已使用 Hugo NexT 4.0 或更高的版本 (I'm using Hugo NexT version 4.0 or later)
- [ ] 已阅读 [Hugo 故障排除](https://gohugo.io/troubleshooting/)并尝试修复无果 (I had already read the [Troubleshooting page of Hugo](https://gohugo.io/troubleshooting/))
- [ ] 已搜索过当前所有[已知问题](https://github.com/hugo-next/hugo-theme-next/issues)和[讨论区](https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a) ,但没有找到帮助 (I had already searched for current [Issues](https://github.com/hugo-next/hugo-theme-next/issues) and [Q & A](https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a), which does not help me.)
***
## 预期行为 (Expected behavior)
> 请描述你想实现的预期效果 (Please describe the expected behavior what you want)
## 实际行为 (Actual behavior)
> 请同时提供网站链接、屏幕截图和源码地址 (Please provide your site links, screenshots and code repository)
## 问题重现步骤 (Steps to reproduce the behavior)
## 环境信息 (Environment Information)
### 主题配置(Configuration)
> 提供主题 `config.yaml` 中修改过的部分内容 (Paste ONLY CHANGED CONFIGURATION from `config.yaml`)
```yaml
```
## 其他有用信息 (Other Information)
> 例如:操作系统、浏览器等 (e.g. Browser, System)

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: GitHub Discussions
url: https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a
about: 请在此处提问或回答问题(Please ask and answer questions here)

View File

@ -0,0 +1,15 @@
---
name: 新功能请求(Feature Request)
about: Suggest an idea for this project
labels: feature request
---
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
## 新功能描述 (New feature description)
## 效果参考截图 (Screenshots if it possible)

8
.gitignore vendored
View File

@ -1,6 +1,6 @@
# Ignore files in Hugo NexT theme # Ignore files in Hugo NexT theme
.hugo_build.lock exampleSite/
!exampleSite/content
exampleSite/public !exampleSite/start.sh
exampleSite/resources !exampleSite/config.yaml

119
README.md
View File

@ -1,16 +1,119 @@
# Hugo theme of NexT [中文](README.zh.md) | [English](#)
![hugo-next-primary](https://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png) <a title="Hugo NexT Website" href="https://preview.hugo-next.eu.org">
<img align="center" alt="NexT logo" width="266" src="https://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png">
</a>
Start a new journey for Hugo's theme of NexT. ## Hugo NexT
# Our Vision «Hugo NexT» is a high quality elegant [Hugo](https://gohugo.io) theme. Migrate it from `Hexo` engine themes which name is [`NexT`](https://github.com/next-theme/hexo-theme-next), keep all kind page layout designs and 4 different shcemes, start new journey with :heart: and hope you would like it.
Make `NexT` theme is easily & powerful. > All page designs & configuration compatibility with Hexo NexT, it's very easy migrate your site from Hexo to Hugo and enjoy yourself.
# Preview [![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.86.0-red?style=flat-square&logo=hugo&color=%23FF4088)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&label=gh-pg&logo=GitHub)](https://github.com/hugo-next/hugo-theme-next) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
## 4 Scheme
* :heart_decoration: Muse
* :six_pointed_star: Mist
* :pisces: Pisces
* :gemini: Gemini (**default**)
## 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://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) | | 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/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=preview-hugo-next&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) | | 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/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) |
> 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.
## Quick Start
Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` software in your PC, then use `submodule` to lead into the theme, see below commands:
```shell
$ hugo new site hugo-next-exmaple
$ cd hugo-next-exmaple
$ git init
$ hugo submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
$ cp -r themes/hugo-theme-next/exampleSite/* .
$ rm -rf config.toml
$ hugo server
```
Done that input adrress http://127.0.0.1:1313/ on browser will see the effect & good luck for you! :tada::tada::tada:
## 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:
```sh
$ hugo new posts/hello-world.md
```
Descript front matter in post as below:
```yml
---
title: "{{ replace .Name "-" " " | title }}"
description: "{{ .Name }}"
keywords: "{{replace .Name "-" ","}}"
date: {{ .Date }}
lastmod: {{ .Date }}
categories:
-
tags:
-
-
# Post's origin author name
#author:
# Post's origin link URL
#link:
# Image source link that will use in open graph and twitter card
#imgs:
# Expand content on the home page
#expand: true
# It's means that will redirecting to external links
#extlink:
# Switch to enabled or disabled comment plugins in this post
#comment:
# enable: false
# Enable table of content
#toc: false
# Absolute link for visit
#url: "{{ lower .Name }}.html"
# Sticky post set-top in home page and the smaller nubmer will more forward.
#weight: 1
---
```
## Feedback
- Join us [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) or [Gitter](https://gitter.im/hugo-next/community) to chat :beers:
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) submit a new bug :bug:
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) tell me your ideas :sparkles:
## Join us
All features development progress and new request in [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9), welcome to join us and compelete it together.
## License
[MIT License](LICENSE)
## Thanks
That's my hobby to develop `Hugo NexT` theme, thanks all people who gived the donate, and let we follow it growth up.
List of Donors(Order by Date):
| Donation time | Donors | Donation mode | Donation content | Message |
| ------- | ------ | ------ | ---- | ---- |
| 2021.12.21 | z*y | wechat pay | RMB 18.88 | / |
| 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. |

125
README.zh.md Normal file
View File

@ -0,0 +1,125 @@
[中文](#) | [English](README.md)
<a title="Hugo NexT 站点" href="https://preview.hugo-next.eu.org">
<img align="center" alt="NexT logo" width="266" src="https://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png">
</a>
## Hugo NexT
«Hugo NexT» 是一款高质量且优雅的 [Hugo](https://gohugo.io) 主题,从原来 `Hexo` 引擎的 [`NexT`](https://github.com/next-theme/hexo-theme-next) 主题中移植过来,继续保留其经典的设计和 4 种不同页面布局模式,一切因 :heart: 重新出发愿你也能喜欢。
> 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。
[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.86.0-red?style=flat-square&logo=hugo&color=%23FF4088)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&label=gh-pg&logo=GitHub)](https://github.com/hugo-next/hugo-theme-next) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
## 4 种页面模式
* :heart_decoration: 冥想 (Muse)
* :six_pointed_star: 迷雾 (Mist)
* :pisces: 双鱼座 (Pisces)
* :gemini: 双子座 (Gemini) (**默认**)
## 在线预览
| 环境 | :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/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) |
| 正式版本 | [双子座](https://hugo-next.eu.org/) | [冥想](https://hugo-next.eu.org/muse/) | [迷雾](https://hugo-next.eu.org/mist/) | [双鱼座](https://hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) |
> 开发版本: 所有的新功能开发都会在此第一时间发布预览
> 正式版本: 只有测试稳定且符合要求的功能才会正式发布
## 快速开始
在使用 `Hugo NexT` 主题之前,请确认你的电脑上已经安装 `Git``Hugo Extened` 两款软件,然后通过 `submodule` 模式引用本主题,参考如下命令:
```shell
$ hugo new site hugo-next-exmaple
$ cd hugo-next-exmaple
$ git init
$ hugo submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
$ cp -r themes/hugo-theme-next/exampleSite/* .
$ rm -rf config.toml
$ hugo server
```
打开浏览器,在地址栏输入 http://127.0.0.1:1313/ 查看主题效果,祝你好运!:tada::tada::tada:
> 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。
## 发表新文章
主题已经配置了默认的文章模板,建议使用如下 Hugo 命令快速创建新的文章:
```sh
$ hugo new posts/hello-world.md
```
关于文章头部的那些标记作用的说明参考如下:
```yml
---
# 文章标题
title: "{{ replace .Name "-" " " | title }}"
# 文章内容摘要
description: "{{ .Name }}"
# 文章内容关键字
keywords: "{{replace .Name "-" ","}}"
# 发表日期
date: {{ .Date }}
# 最后修改日期
lastmod: {{ .Date }}
# 分类
categories:
-
# 标签
tags:
-
-
# 原文作者
#author:
# 原文链接
#link:
# 图片链接用在open graph和twitter卡片上
#imgs:
# 在首页展开内容
#expand: true
# 外部链接地址,访问时直接跳转
#extlink:
# 在当前页面开启或关闭评论功能
#comment:
# enable: false
# 开启文章目录功能
#toc: false
# 绝对访问路径
#url: "{{ lower .Name }}.html"
# 开启文章置顶,数字越小越靠前
#weight: 1
---
```
## 使用反馈
- 加入 [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) 或 [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) 提交错误报告 :bug:
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) 表新功能的想法 :sparkles:
## 欢迎加入
关于本主题的开发进度和后续的发展路线图,可访问 [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9) 查看详情,也欢迎大家参与一起来完善。
## 许可证
[MIT License](LICENSE)
## 致谢
开发 `Hugo NexT` 主题原本是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,让我们一起来见证它的成长。
以下是捐助名单列表(按时间顺序):
| 捐助时间 | 捐助者 | 捐助方式 | 捐助内容 | 留言 |
| :-------: | ------ | ------ | ---- | ---- |
| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |
| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |

1
VERSION Normal file
View File

@ -0,0 +1 @@
4.0.0

View File

@ -1,5 +1,7 @@
@if $utterances_enable { // TODO maybe use for next time
.utterances { // @if $utterances_enable {
max-width: unset; // .utterances {
} // max-width: unset;
} // min-height: 300px;
// }
// }

View File

@ -21,6 +21,14 @@
@include flex-column(); @include flex-column();
@include main-container(); @include main-container();
@include mobile() {
font-size: $font-size-smaller;
}
@include mobile-small() {
font-size: $font-size-smallest;
}
@if $footer_vendors_enable { @if $footer_vendors_enable {
.vendors-list { .vendors-list {
a { a {
@ -30,6 +38,19 @@
img { img {
display: inline-block; display: inline-block;
} }
$footer_vendors_imgs_len: length($footer_vendors_imgs_width);
@if ($footer_vendors_imgs_len>0) {
@for $i from 1 through $footer_vendors_imgs_len {
a:nth-child(#{$i}) img {
width: #{nth($footer_vendors_imgs_width, $i)}px;
@include mobile() {
width: #{nth($footer_vendors_imgs_width, $i)-10}px;
}
}
}
}
} }
} }
} }
@ -40,24 +61,6 @@
} }
} }
@keyframes icon-animate {
0%, 100% {
transform: scale(1);
}
10%, 30% {
transform: scale(.9);
}
20%, 40%, 60%, 80% {
transform: scale(1.1);
}
50%, 70% {
transform: scale(1.1);
}
}
.languages { .languages {
display: inline-block; display: inline-block;
font-size: $font-size-large; font-size: $font-size-large;
@ -83,7 +86,7 @@
margin: 0 5px; margin: 0 5px;
@if $footer_icon_animated { @if $footer_icon_animated {
animation: icon-animate 1.33s ease-in-out infinite; animation: beat 1.33s ease-in-out infinite;
} }
} }

View File

@ -0,0 +1,17 @@
@keyframes beat {
0%, 100% {
transform: scale(1);
}
10%, 30% {
transform: scale(.9);
}
20%, 40%, 60%, 80% {
transform: scale(1.1);
}
50%, 70% {
transform: scale(1.1);
}
}

View File

@ -0,0 +1,3 @@
@import 'icon';
@import 'show';
@import 'hover';

View File

@ -0,0 +1,65 @@
// tabshow animation
@-moz-keyframes tabshow {
0% {
-webkit-transform: translateY(15px);
-moz-transform: translateY(15px);
-o-transform: translateY(15px);
-ms-transform: translateY(15px);
transform: translateY(15px);
}
100% {
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-o-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}
@-webkit-keyframes tabshow {
0% {
-webkit-transform: translateY(15px);
-moz-transform: translateY(15px);
-o-transform: translateY(15px);
-ms-transform: translateY(15px);
transform: translateY(15px);
}
100% {
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-o-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}
@-o-keyframes tabshow {
0% {
-webkit-transform: translateY(15px);
-moz-transform: translateY(15px);
-o-transform: translateY(15px);
-ms-transform: translateY(15px);
transform: translateY(15px);
}
100% {
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-o-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}
@keyframes tabshow {
0% {
-webkit-transform: translateY(15px);
-moz-transform: translateY(15px);
-o-transform: translateY(15px);
-ms-transform: translateY(15px);
transform: translateY(15px);
}
100% {
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-o-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}

View File

@ -43,8 +43,32 @@
margin-top: 60px; margin-top: 60px;
} }
min-height: 300px;
overflow: hidden; overflow: hidden;
.comment-loading {
@if $sidebar_position == 'right' {
padding-right: $sidebar-desktop + $sidebar-offset;
} @else {
padding-left: $sidebar-desktop + $sidebar-offset;
}
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
text-align: center;
font-size: 2em;
@include tablet-mobile() {
padding-left: 0;
padding-right: 0;
width: auto;
}
}
.comment-head { .comment-head {
margin-bottom: 20px; margin-bottom: 20px;
@ -53,6 +77,9 @@
vertical-align: middle; vertical-align: middle;
font-weight: 700; font-weight: 700;
font-size: 1.4em; font-size: 1.4em;
@include mobile-small() {
font-size: $font-size-smaller;
}
} }
@if $two_comments_enable { @if $two_comments_enable {
@ -61,16 +88,16 @@
float: right; float: right;
margin: 2px auto; margin: 2px auto;
padding: 4px 16px; padding: 4px 16px;
@include mobile-small() {
font-size: $font-size-smaller;
padding: 4px;
}
width: max-content; width: max-content;
border-radius: 8px; border-radius: 8px;
background: #eee; background: var(--card-bg-color);
.first-comment { .first-comment {
color: $first_comment_color; color: $first_comment_color;
@if $two_comments_actived==$first_comment_name {
font-weight: bold;
}
} }
.second-comment { .second-comment {
@ -82,11 +109,12 @@
} }
$switch_btn_bg_color: $first_comment_color; $switch_btn_bg_color: $first_comment_color;
$switch_btn_move_bc: $second_comment_color;
.switch-btn { .switch-btn {
position: relative; position: relative;
display: inline-block; display: inline-block;
margin: -4px 8px 0; margin: 5px;
width: 42px; width: 42px;
height: 22px; height: 22px;
border-radius: 34px; border-radius: 34px;
@ -100,6 +128,7 @@
@if $two_comments_actived==$second_comment_name { @if $two_comments_actived==$second_comment_name {
$switch_btn_bg_color: $second_comment_color; $switch_btn_bg_color: $second_comment_color;
$switch_btn_move_bc: $first_comment_color;
} }
background-color: $switch_btn_bg_color; background-color: $switch_btn_bg_color;
@ -120,6 +149,10 @@
transition: .4s transition: .4s
} }
&.move {
background-color: $switch_btn_move_bc;
}
&.move:before { &.move:before {
-webkit-transform: translateX(20px); -webkit-transform: translateX(20px);
-moz-transform: translateX(20px); -moz-transform: translateX(20px);
@ -129,6 +162,7 @@
} }
} }
} }
} }
} }

View File

@ -1,3 +1,19 @@
.highlight {
background: var(--highlight-background);
.table-container, pre {
position: relative;
}
.table-container table tbody tr {
background: none;
}
}
@if $codeblock_copy_btn_enable {
.highlight:hover .copy-btn, pre:hover .copy-btn { .highlight:hover .copy-btn, pre:hover .copy-btn {
opacity: 1; opacity: 1;
} }
@ -9,32 +25,33 @@
opacity: 0; opacity: 0;
padding: 2px 6px; padding: 2px 6px;
position: absolute; position: absolute;
right: 8px;
top: 4px;
transition: opacity $transition-ease; transition: opacity $transition-ease;
background: var(--highlight-background);
@if $codeblock_copy_btn_style == 'flat' { @if $codeblock_style == 'flat' {
background: white; background: white;
border: 0; border: 0;
font-size: $font-size-smaller; font-size: $font-size-smaller;
right: 0;
top: 0; } @else if $codeblock_style == 'mac' {
} @else if $codeblock_copy_btn_style == 'mac' {
color: var(--highlight-foreground); color: var(--highlight-foreground);
font-size: 14px; font-size: 14px;
right: 0; border-radius: 3px;
top: 2px;
} @else { } @else {
background-color: $gainsboro; background-color: $gainsboro;
background-image: linear-gradient(#fcfcfc, $gainsboro); background-image: linear-gradient(#fcfcfc, $gainsboro);
border: 1px solid #d5d5d5; border: 1px solid #d5d5d5;
border-radius: 3px; border-radius: 3px;
font-size: $font-size-smaller; font-size: $font-size-smaller;
right: 4px;
top: 8px; }
} }
} }
@if $codeblock_copy_btn_style == 'mac' { @if $codeblock_style == 'mac' {
figure.highlight { .highlight {
border-radius: 5px; border-radius: 5px;
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4); box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4);
padding-top: 30px; padding-top: 30px;
@ -46,8 +63,8 @@
&::before { &::before {
background: #fc625d; background: #fc625d;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
left: 12px;
margin-top: -20px; margin-top: -20px;
margin-left: 10px;
position: absolute; position: absolute;
@include round-icon(12px); @include round-icon(12px);
} }

View File

@ -1,58 +1,25 @@
// Use `@use` to fix issue #67 @import 'copy-code';
// TODO find way to import file by dynmatic
// @import '(theme.highlight.enable && theme.highlight.light.file) ? theme.highlight.light.file : null';
// @import '(theme.prism.enable && theme.prism.light) ? theme.prism.light : null';
// @import '(theme.prism.enable && theme.prism.number) ? theme.prism.number : null';
/* @media (prefers-color-scheme: dark) {
@import '(theme.darkmode && theme.highlight.enable && theme.highlight.dark.file) ? theme.highlight.dark.file : null';
@import '(theme.darkmode && theme.prism.enable && theme.prism.dark) ? theme.prism.dark : null';
} */
// @import 'theme.codeblock.copy_button.enable ? "copy-code" : null';
// Placeholder: %code-inline %code-block
%code-inline { %code-inline {
background: var(--highlight-background); background: var(--highlight-background);
color: var(--highlight-foreground); color: var(--highlight-foreground);
} }
%code-block { pre {
padding: 10px;
margin: 0;
}
p > code, li > code {
@extend %code-inline; @extend %code-inline;
line-height: $line-height-code-block; border-radius: 3px;
margin: 0 auto 20px; padding: 3px 6px;
}
%figcaption {
background: var(--highlight-gutter-background);
color: var(--highlight-foreground);
display: flow-root;
font-size: $table-font-size;
line-height: 1.2;
padding: .5em;
a {
color: var(--highlight-foreground);
float: right;
&:hover {
border-bottom-color: var(--highlight-foreground);
}
}
} }
pre, code { pre, code {
font-family: $code-font-family; font-family: $code-font-family;
color: #fff;
} }
code {
@extend %code-inline;
border-radius: 3px;
font-size: $table-font-size;
padding: 2px 4px;
@include word-wrap();
}
kbd { kbd {
@extend %code-inline; @extend %code-inline;
@ -62,82 +29,4 @@ kbd {
font-family: inherit; font-family: inherit;
padding: .1em .3em; padding: .1em .3em;
white-space: nowrap; white-space: nowrap;
color: #fff;
}
// `highlight.line_number: false` and `highlight.wrap: false`
// in Hexo config generates code.highlight elements
figure.highlight {
@extend %code-block;
position: relative;
pre {
border: 0;
margin: 0;
padding: 10px 0;
}
table {
border: 0;
margin: 0;
width: auto;
}
td {
border: 0;
padding: 0;
}
figcaption {
@extend %figcaption;
}
.gutter {
@include disable-user-select();
pre {
background: var(--highlight-gutter-background);
color: var(--highlight-gutter-foreground);
padding-left: 10px;
padding-right: 10px;
text-align: right;
}
}
.code pre {
padding-left: 10px;
width: 100%;
}
// See https://github.com/next-theme/hexo-theme-next/discussions/410
.marked {
background: rgba(0, 0, 0, .3);
}
}
// See https://github.com/hexojs/hexo-util/pull/229
pre .caption, pre figcaption {
@extend %figcaption;
margin-bottom: 10px;
}
.gist table {
width: auto;
td {
border: 0;
}
}
pre {
@extend %code-block;
overflow: auto;
padding: 10px;
position: relative;
code {
background: none;
padding: 0;
text-shadow: none;
}
} }

View File

@ -11,3 +11,4 @@
@import 'pagination'; @import 'pagination';
@import 'comments'; @import 'comments';
@import 'fontawesome'; @import 'fontawesome';
@import 'animation';

View File

@ -64,7 +64,7 @@
} }
@mixin sidebar-inline-links-item() { @mixin sidebar-inline-links-item() {
margin: 5px 0 0; margin: 5px 0;
a { a {
box-sizing: border-box; box-sizing: border-box;

View File

@ -75,7 +75,7 @@
@if $links_settings_layout == 'inline' { @if $links_settings_layout == 'inline' {
display: inline-block; display: inline-block;
max-width: 100%; max-width: 100%;
@include sidebar-inline-links-item(); margin: 5px;
} }
} }
@ -83,7 +83,7 @@
// Only when back2top.sidebar is true, apply the following styles // Only when back2top.sidebar is true, apply the following styles
.back-to-top { .back-to-top {
background: var(--body-bg-color); background: var(--body-bg-color);
margin: 8px - $sidebar-offset -10px -18px; margin: 8px -#{$sidebar-offset} -10px -18px;
&.back-to-top-on { &.back-to-top-on {
margin-top: 16px; margin-top: 16px;

View File

@ -23,6 +23,15 @@ $footer_icon_color: {{ $P.footer.icon.color }};
$footer_icon_animated : {{ $P.footer.icon.animated }}; $footer_icon_animated : {{ $P.footer.icon.animated }};
$footer_beian_enable : {{ $P.footer.beian.enable }}; $footer_beian_enable : {{ $P.footer.beian.enable }};
$footer_vendors_enable : {{ isset $P.footer "vendors" }}; $footer_vendors_enable : {{ isset $P.footer "vendors" }};
{{ with $P.footer.vendors }}
{{ $width := slice "start" }}
{{ range .list }}
{{ if .image }}
{{ $width = $width | append .image.width }}
{{ end }}
{{ end }}
{{ printf "$footer_vendors_imgs_width:%s;" (delimit (after 1 $width) ", ") }}
{{ end }}
// Counter // Counter
$busuanzi_enable : {{ $P.busuanzi.enable }}; $busuanzi_enable : {{ $P.busuanzi.enable }};
@ -38,12 +47,13 @@ $font_title_size: {{ default $P.font.title.size 1.375 }};
// Code & Code blocks // Code & Code blocks
// TODO find the configure variable // TODO find the configure variable
$highlight_dark_background: #000; $highlight_dark_background : #1c1b1b;
$highlight_dark_foreground: #222; $highlight_dark_foreground : #fff;
$highlight_light_background: #000; $highlight_light_background : #565656;
$highlight_light_foreground: #222; $highlight_light_foreground : #fff;
$codeblock_copy_btn_style: {{ $P.codeblock.copyBtn.style }}; $codeblock_copy_btn_enable : {{ $P.codeblock.copyBtn }};
$codeblock_style : {{ $P.codeblock.style }};
// Sidebar // Sidebar
$sidebar_offset : {{ $P.sidebar.offset }}; $sidebar_offset : {{ $P.sidebar.offset }};
@ -82,8 +92,8 @@ $reward_settings_animation: {{ $P.rewardSets.animation }};
$post_end_tag_icon : {{ $P.postFooter.tagIcon }}; $post_end_tag_icon : {{ $P.postFooter.tagIcon }};
// TODO find the paramters // TODO find the paramters
$text_align_desktop: justify; $text_align_desktop : {{ $P.textAlign.desktop }};
$text_align_mobile: justify; $text_align_mobile : {{ $P.textAlign.mobile }};
// Note // Note
$note_icons : {{ $P.note.icons }}; $note_icons : {{ $P.note.icons }};
@ -104,7 +114,9 @@ $reading_progress_reversed: {{ $P.readingProgress.reversed }};
// Thirdparty // Thirdparty
$math_mathjax_enable : {{ $P.math.mathjax.enable }}; $math_mathjax_enable : {{ $P.math.mathjax.enable }};
$related_posts_enable: {{ $P.relatedPosts.enable }}; // TODO
//$related_posts_enable : {{ $P.relatedPosts.enable }};
$related_posts_enable : false;
$pdf_enable : {{ $P.pdf.enable }}; $pdf_enable : {{ $P.pdf.enable }};
$pdf_height : {{ $P.pdf.height }}; $pdf_height : {{ $P.pdf.height }};
@ -113,16 +125,18 @@ $algolia_search_enable: {{ $P.algoliaSearch.enable }};
$local_search_enable : {{ $P.localSearch.enable }}; $local_search_enable : {{ $P.localSearch.enable }};
// Online IM // Online IM
$gitalk_enable: {{ $P.gitalk.enable }}; //$gitalk_enable : {{ $P.gitalk.enable }};
$gitalk_enable : false;
$gitter_enable : {{ $P.gitter.enable }}; $gitter_enable : {{ $P.gitter.enable }};
// Comment // Comment
$disqusjs_enable: {{ $P.disqusjs.enable }}; //$disqusjs_enable : {{ $P.disqusjs.enable }};
$livere_enable: {{ $P.livere.enable }}; $disqusjs_enable : false;
$utterances_enable: {{ $P.utterances.enable }}; $livere_enable : {{ isset $P.livere "uid" }};
$waline_enable: {{ $P.waline.enable }}; $utterances_enable : {{ isset $P.utterances "utterances" }};
$waline_enable : {{ isset $P.waline "serverurl" }};
{{- with .Site.Params.comments }} {{- with .Site.Params.comments }}
{{ $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }} {{- $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }}
$two_comments_enable : {{ $tce }}; $two_comments_enable : {{ $tce }};
{{- if $tce }} {{- if $tce }}
{{- $sortNav := sort .nav "weight" }} {{- $sortNav := sort .nav "weight" }}

View File

@ -1,66 +1,51 @@
if (!window.NexT) window.NexT = {}; if (!window.NexT) window.NexT = {};
(function() { (function() {
const className = 'next-config';
const staticConfig = {}; const siteConfig = {
let variableConfig = {}; "hostname" : "{{ .Site.BaseURL }}",
"root" : "/",
const parse = text => JSON.parse(text || '{}'); "images" : "{{ .Site.Params.images }}",
"scheme" : "{{ .Site.Params.scheme }}",
const update = name => { "darkmode" : {{ .Site.Params.darkmode }},
const targetEle = document.querySelector(`.${className}[data-name="${name}"]`); "version" : "{{ .Site.Data.config.version }}",
if (!targetEle) return; "sidebar" : {{ .Site.Params.sidebar | jsonify }},
const parsedConfig = parse(targetEle.text); "copybtn" : {{ .Site.Params.codeblock.copyBtn }},
if (name === 'main') { "bookmark" : {{ .Site.Params.bookmark | jsonify }},
Object.assign(staticConfig, parsedConfig); "comments" : {{ .Site.Params.comments | jsonify }},
} else { "lazyload" : {{ .Site.Params.lazyload }},
variableConfig[name] = parsedConfig; "pangu" : {{ .Site.Params.pangu }},
"stickytabs" : {{ .Site.Params.tabs.sticky }},
"motion" : {{ .Site.Params.motion | jsonify }},
// TODO Find prismjs
//"prism" : "",
"i18n" : {
"placeholder" : "",
"empty" : "${query}",
"hits_time" : "'${hits}', '${time}'",
"hits" : "${hits}"
},
{{- if .Site.Params.algoliaSearch.enable }}
// TODO
"algolia" : {
"appID" : "",
"apiKey" : "",
"indexName" : "",
"hits" : ""
} }
{{- end }}
{{- if .Site.Params.localSearch.enable }}
// TODO
"path" : "/search.json",
"localsearch": {{ .Site.Params.localSearch | jsonify }},
{{- end }}
"lang" : "{{ .Site.LanguageCode }}",
"permalink" : "{{ .Page.Permalink | absURL }}",
"title" : "{{ .Page.Title }}",
"isHome" : {{ .IsHome }},
"isPage" : {{ .IsPage }}
}; };
update('main'); window.CONFIG = new Proxy(siteConfig, {});
window.CONFIG = new Proxy({}, {
get(overrideConfig, name) {
let existing;
if (name in staticConfig) {
existing = staticConfig[name];
} else {
if (!(name in variableConfig)) update(name);
existing = variableConfig[name];
}
// For unset override and mixable existing
if (!(name in overrideConfig) && typeof existing === 'object') {
// Get ready to mix.
overrideConfig[name] = {};
}
if (name in overrideConfig) {
const override = overrideConfig[name];
// When mixable
if (typeof override === 'object' && typeof existing === 'object') {
// Mix, proxy changes to the override.
return new Proxy({ ...existing, ...override }, {
set(target, prop, value) {
target[prop] = value;
override[prop] = value;
return true;
}
});
}
return override;
}
// Only when not mixable and override hasn't been set.
return existing;
}
});
document.addEventListener('pjax:success', () => {
variableConfig = {};
});
})(); })();

View File

@ -82,7 +82,7 @@ NexT.motion.middleWares = {
postList: function() { postList: function() {
const sequence = []; const sequence = [];
const { post_block, post_header, post_body, coll_header } = CONFIG.motion.transition; const { postblock, postheader, postbody, collheader } = CONFIG.motion.transition;
function animate(animation, selector) { function animate(animation, selector) {
if (!animation) return; if (!animation) return;
@ -95,10 +95,10 @@ NexT.motion.middleWares = {
}); });
} }
animate(post_block, '.post-block, .pagination, .comments'); animate(postblock, '.post-block, .pagination, .post-comments');
animate(coll_header, '.collection-header'); animate(collheader, '.collection-header');
animate(post_header, '.post-header'); animate(postheader, '.post-header');
animate(post_body, '.post-body'); animate(postbody, '.post-body');
return sequence; return sequence;
}, },

View File

@ -37,20 +37,22 @@ NexT.boot.refresh = function() {
* Register JS handlers by condition option. * Register JS handlers by condition option.
* Need to add config option in Front-End at 'scripts/helpers/next-config.js' file. * Need to add config option in Front-End at 'scripts/helpers/next-config.js' file.
*/ */
CONFIG.prism && window.Prism.highlightAll(); //CONFIG.prism && window.Prism.highlightAll();
/*CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', { /*CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', {
background: 'var(--content-bg-color)' background: 'var(--content-bg-color)'
});*/ });*/
CONFIG.lazyload && window.lozad('.post-body img').observe(); CONFIG.lazyload && window.lozad('.post-body img').observe();
CONFIG.pangu && window.pangu.spacingPage(); CONFIG.pangu && window.pangu.spacingPage();
CONFIG.exturl && NexT.utils.registerExtURL(); CONFIG.isPage && NexT.utils.replacePostCRLink();
NexT.utils.registerCopyCode(); CONFIG.isPage && CONFIG.copybtn && NexT.utils.registerCopyCode();
NexT.utils.registerTabsTag(); NexT.utils.registerTabsTag();
/*NexT.utils.registerActiveMenuItem(); /*NexT.utils.registerActiveMenuItem();
NexT.utils.registerLangSelect();*/ NexT.utils.registerLangSelect();*/
NexT.utils.registerSidebarTOC(); CONFIG.isPage && NexT.utils.registerSidebarTOC();
NexT.utils.registerPostReward(); CONFIG.isPage && NexT.utils.registerPostReward();
CONFIG.isPage && NexT.utils.initCommontesDispaly();
CONFIG.isPage && NexT.utils.registerCommonSwitch();
NexT.utils.wrapTableWithBox(); NexT.utils.wrapTableWithBox();
NexT.utils.registerVideoIframe(); NexT.utils.registerVideoIframe();
}; };

View File

@ -23,35 +23,29 @@ HTMLElement.prototype.wrap = function(wrapper) {
NexT.utils = { NexT.utils = {
registerExtURL: function() { replacePostCRLink: function() {
document.querySelectorAll('span.exturl').forEach(element => { if (CONFIG.hostname.startsWith('http')) return;
const link = document.createElement('a'); // Try to support mutli domain without base URL sets.
// https://stackoverflow.com/questions/30106476/using-javascripts-atob-to-decode-base64-doesnt-properly-decode-utf-8-strings let href = window.location.href;
link.href = decodeURIComponent(atob(element.dataset.url).split('').map(c => { if (href.indexOf('#')>-1){
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); href = href.split('#')[0];
}).join('')); }
link.rel = 'noopener external nofollow noreferrer'; let postLink = document.getElementById('post-cr-link');
link.target = '_blank'; if (!postLink) return;
link.className = element.className; postLink.text = href;
link.title = element.title; postLink.href = href;
link.innerHTML = element.innerHTML;
element.parentNode.replaceChild(link, element);
});
}, },
/** /**
* One-click copy code support. * One-click copy code support.
*/ */
registerCopyCode: function() { registerCopyCode: function() {
let figure = document.querySelectorAll('figure.highlight'); let figure = document.querySelectorAll('.highlight pre');
if (figure.length === 0) figure = document.querySelectorAll('pre:not(.mermaid)'); if (figure.length === 0 || !CONFIG.copybtn) return;
figure.forEach(element => { figure.forEach(element => {
element.querySelectorAll('.code .line span').forEach(span => { let cn = element.querySelector('code').className;
span.classList.forEach(name => { // TODO seems hard code need find other ways fixed it.
span.classList.replace(name, `hljs-${name}`); if (cn == '') return;
});
});
if (!CONFIG.copycode) return;
element.insertAdjacentHTML('beforeend', '<div class="copy-btn"><i class="fa fa-copy fa-fw"></i></div>'); element.insertAdjacentHTML('beforeend', '<div class="copy-btn"><i class="fa fa-copy fa-fw"></i></div>');
const button = element.querySelector('.copy-btn'); const button = element.querySelector('.copy-btn');
button.addEventListener('click', () => { button.addEventListener('click', () => {
@ -259,6 +253,31 @@ NexT.utils = {
}); });
}, },
initCommontesDispaly: function(){
const comms = document.querySelectorAll('.comment-wrap > div');
if (comms.length<=1) return;
comms.forEach(function(item){
var dis = window.getComputedStyle(item, null).display;
item.style.display = dis;
});
},
registerCommonSwitch: function() {
const button = document.querySelector('.comment-switch .switch-btn');
if (!button) return;
const comms = document.querySelectorAll('.comment-wrap > div');
button.addEventListener('click', () => {
button.classList.toggle('move');
comms.forEach(function(item){
if (item.style.display === 'none') {
item.style.cssText = "display: block; animation: tabshow .8s";
} else {
item.style.cssText = "display: none;"
}
});
});
},
activateNavByIndex: function(index) { activateNavByIndex: function(index) {
const target = document.querySelectorAll('.post-toc li a.nav-link')[index]; const target = document.querySelectorAll('.post-toc li a.nav-link')[index];
if (!target || target.classList.contains('active-current')) return; if (!target || target.classList.contains('active-current')) return;
@ -287,7 +306,7 @@ NexT.utils = {
if (window.innerWidth < 992 || CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return; if (window.innerWidth < 992 || CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return;
// Expand sidebar on post detail page by default, when post has a toc. // Expand sidebar on post detail page by default, when post has a toc.
const hasTOC = document.querySelector('.post-toc'); const hasTOC = document.querySelector('.post-toc');
let display = CONFIG.page.sidebar; let display = CONFIG.sidebar;
if (typeof display !== 'boolean') { if (typeof display !== 'boolean') {
// There's no definition sidebar in the page front-matter. // There's no definition sidebar in the page front-matter.
display = CONFIG.sidebar.display === 'always' || (CONFIG.sidebar.display === 'post' && hasTOC); display = CONFIG.sidebar.display === 'always' || (CONFIG.sidebar.display === 'post' && hasTOC);

4
data/config.yaml Normal file
View File

@ -0,0 +1,4 @@
# Hugo NexT theme's custom config
#
version: 4.0.0

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
---
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

@ -13,7 +13,7 @@ tags:
- emoji - emoji
toc: false toc: false
url: "emoji-support.html" url: "post/emoji-support.html"
--- ---
Emoji 可以通过多种方式在 Hugo 项目中启用。 Emoji 可以通过多种方式在 Hugo 项目中启用。

View File

@ -1,58 +0,0 @@
---
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

@ -11,7 +11,7 @@ tags:
- Hugo - Hugo
- 开始 - 开始
url: hello-world.html url: post/hello-world.html
weight: 2 weight: 2
--- ---

View File

@ -17,7 +17,7 @@ tags:
toc: false toc: false
draft: false draft: false
url: markdown-syntax.html url: post/markdown-syntax.html
--- ---
仅以此篇文章来测试下在 `NexT` 主题中在通过 `Hugo` 引擎来建站时,是否支持 `Markdown` 文件内容中所写的各种语法,并展示下实际的效果。 仅以此篇文章来测试下在 `NexT` 主题中在通过 `Hugo` 引擎来建站时,是否支持 `Markdown` 文件内容中所写的各种语法,并展示下实际的效果。

View File

@ -13,7 +13,7 @@ tags:
- 高亮 - 高亮
- Chroma - Chroma
url: "syntax-highlighting.html" url: post/syntax-highlighting.html
--- ---
Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用 Chroma 作为代码块高亮支持,它内置在 Go 语言当中,速度是真的非常、非常快,而且最为重要的是它也兼容之前我们使用的 Pygments 方式。 Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用 Chroma 作为代码块高亮支持,它内置在 Go 语言当中,速度是真的非常、非常快,而且最为重要的是它也兼容之前我们使用的 Pygments 方式。

View File

@ -14,7 +14,7 @@ tags:
- 博客 - 博客
toc: true toc: true
url: "table-of-content.html" url: post/table-of-content.html
--- ---
巴顿将军说过“衡量一个人是否成功不是看他站到顶峰而是从顶峰跌落之后的反弹力”褚时健的人生便是如此中年发家致富名利双收之后又跌落到谷底等到74岁再创业10年后带着褚橙归来东山再起收获亿万财富他的发展轨迹就是反弹的过程。 巴顿将军说过“衡量一个人是否成功不是看他站到顶峰而是从顶峰跌落之后的反弹力”褚时健的人生便是如此中年发家致富名利双收之后又跌落到谷底等到74岁再创业10年后带着褚橙归来东山再起收获亿万财富他的发展轨迹就是反弹的过程。

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
# # 本地快速启动脚本
# Quick start in local.
next() { next() {
cat << EOT cat << EOT
@ -11,12 +12,12 @@ next() {
██║ ╚████║███████╗██╔╝ ██╗ ██║ ██║ ╚████║███████╗██╔╝ ██╗ ██║
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝
======================================== ========================================
NexT version $1 Hugo NexT version $1
Documentation: https://hugo-next.js.org Documentation: https://hugo-next.eu.org
======================================== ========================================
EOT EOT
} }
next V0.0.1 next `cat ../VERSION`
hugo server -D -t ../.. --port 1414 --panicOnWarning hugo server -D -t ../.. --port 1414 --panicOnWarning

View File

@ -1,20 +1,20 @@
#-------------------------------------- #--------------------------------------
# English Version # English Version
#-------------------------------------- #--------------------------------------
Posts: posts:
other: Posts other: Posts
Tag: tag:
other: Tag other: Tag
Tags: tags:
other: Tags other: Tags
TagTitle: TagTitle:
other: Tag Collection other: Tag Collection
Category: category:
other: Category other: Category
Categories: categories:
other: Categories other: Categories
CateTitle: CateTitle:
other: Classify Management other: Classification Items
AllSome: AllSome:
other: "All {{ .Some }}" other: "All {{ .Some }}"

View File

@ -2,20 +2,20 @@
# 中文版本 # 中文版本
#-------------------------------------- #--------------------------------------
Posts: posts:
other: 文章 other: 文章
Tag: tag:
other: 标签 other: 标签
Tags: tags:
other: 标签 other: 标签
TagTitle: TagTitle:
other: 标签集锦 other: 标签集锦
Category: category:
other: 分类 other: 分类
Categories: categories:
other: 分类 other: 分类
CateTitle: CateTitle:
other: 分类管理 other: 分类栏目
AllSome: AllSome:
other: "所有 {{ .Some }}" other: "所有 {{ .Some }}"

View File

@ -0,0 +1,7 @@
{{- $extURL := and .Page.Site.Params.exturl.enable (strings.HasPrefix .Destination "http") }}
<a href="{{ .Destination | safeURL }}" title="{{ .Text }}" {{ if $extURL }}rel="noopener external nofollow noreferrer" target="_blank" class=" exturl"{{ end }}>
{{ .Text | safeHTML }}
{{- if and $extURL .Page.Site.Params.exturl.icon }}
<i class="fa fa-external-link-alt"></i>
{{- end }}
</a>

View File

@ -1,22 +1,8 @@
{{- .Scratch.Set "postsCount" (len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)) -}} {{- partial "init.html" . -}}
{{- .Scratch.Set "catsCount" (len .Site.Taxonomies.categories) -}}
{{- .Scratch.Set "tagsCount" (len .Site.Taxonomies.tags) -}}
{{- $vendors := .Site.Data.resources.vendors -}}
{{- $pluginVen := .Site.Params.vendors.plugins -}}
{{- $pluginCDN := index $vendors $pluginVen -}}
{{- .Scratch.Set "pluginCDN" $pluginCDN -}}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}"> <html lang="{{ .Site.LanguageCode }}">
<head> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
{{ hugo.Generator }}
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}">
<link rel="icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.Params.favicon.small }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ .Site.Params.favicon.medium }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.favicon.appleTouchIcon }}">
{{- partial "head.html" . }} {{- partial "head.html" . }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title> <title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<noscript> <noscript>
@ -48,11 +34,11 @@
</main> </main>
<footer class="footer"> <footer class="footer">
<div class="footer-inner"> <div class="footer-inner">
{{- partial "footer" . }} {{- partial "footer.html" . }}
</div> </div>
</footer> </footer>
{{- partial "scripts" . }} {{- partialCached "scripts.html" . }}
</body> </body>
</html> </html>

View File

@ -1,4 +1,2 @@
{{- with .Site.Params.laId }} <script charset="UTF-8" id="LA_COLLECT" src="https://sdk.51.la/js-sdk-pro.min.js"></script>
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id: "{{ . }}",ck: "{{ . }}",autoTrack:true})</script> <script>LA.init({id: "{{ . }}",ck: "{{ . }}",autoTrack:true})</script>
{{- end }}

View File

@ -0,0 +1,20 @@
{{- with .Site.Params.artalk }}
<link href="//unpkg.com/artalk@2.3.4/dist/Artalk.css" rel="stylesheet">
<script src="//unpkg.com/artalk@2.3.4/dist/Artalk.js"></script>
<!-- Artalk -->
<div id="Comments"></div>
<script>
new Artalk({
el : '#Comments',
pageKey : '{{ $.Page.RelPermalink }}',
pageTitle : '{{ $.Page.Title }}',
server : '{{ .server }}',
site : '{{ .site }}',
locale : 'auto',
placeholder : '{{ .placeholder }}'
})
</script>
{{- end }}

View File

@ -0,0 +1,3 @@
<div class="comment-loading">
<i class="fa fa-sync fa-spin"></i>
</div>

View File

@ -0,0 +1,19 @@
{{- with .Site.Params.giscus }}
{{ printf "%t" (isset . "repo") }}
<div class="giscus" style="position: relative;"></div>
<script src="https://giscus.app/client.js"
data-repo="{{ .repo }}"
data-repo-id="{{ .repoId }}"
data-category="{{ .category }}"
data-category-id="{{ .categoryId }}"
data-mapping="{{ .mapping }}"
data-reactions-enabled="0"
data-emit-metadata="1"
data-input-position="{{ .inputPosition }}"
data-theme="{{ .theme }}"
data-lang="{{ $.Site.LanguageCode }}"
data-loading="lazy"
crossorigin="anonymous"
async>
</script>
{{- end }}

View File

@ -1,5 +1,5 @@
{{- with .Site.Params.utterances }} {{- with .Site.Params.utterances }}
<script src="https://utterances.njilc.com/client.js" <script src="https://utteranc.es/client.js"
repo="{{ .repo }}" repo="{{ .repo }}"
issue-term="{{ .issueTerm }}" issue-term="{{ .issueTerm }}"
label="{{ .label }}" label="{{ .label }}"

View File

@ -10,12 +10,14 @@
Waline.init({ Waline.init({
locale, locale,
el : "#waline", el : "#waline",
pageview : {{ .pageView }},
emoji : {{ .emoji }}, emoji : {{ .emoji }},
imageUploader : {{ .imgUploader }}, imageUploader : {{ .imgUploader }},
wordLimit : {{ .wordLimit }}, wordLimit : {{ .wordLimit }},
requiredMeta : {{ .requiredMeta }}, requiredMeta : {{ .requiredMeta }},
serverURL : "{{ .serverURL }}", serverURL : "{{ .serverURL }}",
lang: "{{ $.Lang }}" lang : "{{ $.Lang }}",
dark : "auto"
}); });
</script> </script>
{{- end }} {{- end }}

View File

@ -28,11 +28,15 @@
{{- if $tc }} {{- if $tc }}
{{- range $sn }} {{- range $sn }}
<div> <div>
{{- partial "_thirdparty/comment/comm_loading.html" . }}
{{- partial (printf $cp (lower .name)) $root }} {{- partial (printf $cp (lower .name)) $root }}
</div> </div>
{{- end }} {{- end }}
{{- else }} {{- else }}
<div>{{- partial (printf $cp $fc) $root }}</div> <div>
{{- partial "_thirdparty/comment/comm_loading.html" . }}
{{- partial (printf $cp $fc) $root }}
</div>
{{- end }} {{- end }}
</div> </div>
</div> </div>

View File

@ -48,8 +48,8 @@
{{- end }} {{- end }}
--> -->
*/}} */}}
{{- if .Site.Params.busuanzi.enable }} {{- with .Site.Params.busuanzi }}
{{ with .Site.Params.busuanzi }} {{- if .enable }}
<div class="busuanzi-count"> <div class="busuanzi-count">
{{- if .visitors }} {{- if .visitors }}
<span class="post-meta-item" id="busuanzi_container_site_uv" title="{{ T "VisitorsLabel" }}"> <span class="post-meta-item" id="busuanzi_container_site_uv" title="{{ T "VisitorsLabel" }}">
@ -76,12 +76,12 @@
{{- end }} {{- end }}
{{- if $ft.powered }} {{- if $ft.powered }}
<div class="powered-by"> <div class="powered-by">
{{ $pb := printf "<a href='https://gohugo.io' target='_blank'>Hugo</a> &amp; <a href='https://github.com/hugo-next' target='_blank'>NexT.%s</a>" .Site.Params.scheme }} {{ $pb := printf "<a href='https://gohugo.io' target='_blank'>Hugo</a> &amp; <a href='https://github.com/hugo-next/hugo-theme-next' target='_blank'>Hugo NexT.%s</a>" .Site.Params.scheme }}
{{- printf (T "FooterPowerby") $pb | safeHTML }} {{- printf (T "FooterPowerby") $pb | safeHTML }}
</div> </div>
{{- end }} {{- end }}
{{- if $ft.beian.enable }}
{{- with $ft.beian }} {{- with $ft.beian }}
{{- if .enable }}
<div class="beian"> <div class="beian">
<a href="https://beian.miit.gov.cn" target="_blank">{{ .icp }}</a> <a href="https://beian.miit.gov.cn" target="_blank">{{ .icp }}</a>
<img src="/imgs/gongan.png" alt="{{ .provinceAbbr }}公网安备"> <img src="/imgs/gongan.png" alt="{{ .provinceAbbr }}公网安备">
@ -90,12 +90,12 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with $ft.vendors }} {{- with $ft.vendors }}
{{ if .enable }}
<div class="vendors-list"> <div class="vendors-list">
{{- range .list }} {{- range .list }}
<a target="_blank" href="{{ .link }}" title="{{ .name }}"> <a target="_blank" href="{{ .link }}" title="{{ .name }}">
{{- if .img }} {{- if .image }}
{{ $img := split .img "||" }} <img src="{{ .image.url }}" alt="{{ .name }}" />
<img src="{{- trim (index $img 0) " " }}" width="{{- trim (index $img 1) " " -}}px" alt="{{ .name }}" />
{{- else }} {{- else }}
{{ .name }} {{ .name }}
{{- end }} {{- end }}
@ -104,3 +104,4 @@
<span>{{ .title }}</span> <span>{{ .title }}</span>
</div> </div>
{{- end }} {{- end }}
{{- end }}

View File

@ -3,6 +3,6 @@
{{- partial "head/twitter.html" . }} {{- partial "head/twitter.html" . }}
{{- partial "head/googleplus.html" . }} {{- partial "head/googleplus.html" . }}
{{- partial "head/facebook.html" . }} {{- partial "head/facebook.html" . }}
{{ partial "head/verify.html" . }} {{- partial "head/verify.html" . }}
{{- partial "head/style.html" . }} {{- partialCached "head/style.html" . }}
{{- partial "head/analytics.html" . }} {{- partialCached "head/analytics.html" . }}

View File

@ -1 +1,5 @@
{{- partial "_thirdparty/analytics/51la.html" . }} {{- with .Site.Params.analytics }}
{{- if isset . "laid" }}
{{ partial "_thirdparty/analytics/51la.html" .laId }}
{{- end }}
{{- end }}

View File

@ -1,3 +1,16 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
{{- if .Site.Params.darkmode }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.dark }}" media="(prefers-color-scheme: dark)" />
{{- else }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.light }}" media="(prefers-color-scheme: light)" />
{{- end }}
{{ hugo.Generator }}
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}">
<link rel="icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.Params.favicon.small }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ .Site.Params.favicon.medium }}">
<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 }}" />
{{- if .IsPage }} {{- if .IsPage }}
@ -15,8 +28,3 @@
{{- .Scratch.Set "metaImg" $img }} {{- .Scratch.Set "metaImg" $img }}
<meta itemprop="image" content="{{ $img | absURL }}" /> <meta itemprop="image" content="{{ $img | absURL }}" />
<meta itemprop="keywords" content="{{ if and .IsPage (isset .Params "tags")}}{{ delimit .Params.tags "," }}{{ else }}{{ .Site.Params.keywords }}{{ end }}" /> <meta itemprop="keywords" content="{{ if and .IsPage (isset .Params "tags")}}{{ delimit .Params.tags "," }}{{ else }}{{ .Site.Params.keywords }}{{ end }}" />
{{- if .Site.Params.darkmode }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.dark }}" media="(prefers-color-scheme: dark)" />
{{- else }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.light }}" media="(prefers-color-scheme: light)" />
{{- end }}

View File

@ -21,8 +21,10 @@
{{- $scss := resources.Get "css/main.scss" }} {{- $scss := resources.Get "css/main.scss" }}
{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }} {{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }} {{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
{{- if hugo.IsProduction }}
{{- $css = $css | minify | fingerprint }}
{{- end }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}"> <link rel="stylesheet" href="{{ $css.RelPermalink }}">
<link rel="stylesheet" href="/css/hover.css">
{{- if .IsPage }} {{- if .IsPage }}
<style type="text/css"> <style type="text/css">
.post-footer hr:after { .post-footer hr:after {

View File

@ -2,9 +2,8 @@
{{- $curP := .Page }} {{- $curP := .Page }}
<nav class="site-nav"> <nav class="site-nav">
<ul class="main-menu menu"> <ul class="main-menu menu">
{{- range $curP.Site.Menus.main }} {{- range .Site.Menus.main }}
{{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }} {{- $active := $curP.IsMenuCurrent "main" . }}
{{- $active = or $active (eq .URL "/")}}
<li class="menu-item menu-item-{{ .Identifier }}"> <li class="menu-item menu-item-{{ .Identifier }}">
<a href="{{ .URL | relLangURL }}" 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 }}

View File

@ -0,0 +1,14 @@
{{/* Use to defind global variables */}}
{{- if not hugo.IsExtended }}
{{- warnf "Hugo NexT 主题使用了 SCSS 框架,请到官方地址下载 Hugo Extended 版本https://github.com/gohugoio/hugo/releases" -}}
{{- errorf "Because that use SCSS framework in Hugo NexT, Please download Hugo extended version on offical site: https://github.com/gohugoio/hugo/releases" -}}
{{- end }}
{{- .Scratch.Set "postsCount" (len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)) -}}
{{- .Scratch.Set "catsCount" (len .Site.Taxonomies.categories) -}}
{{- .Scratch.Set "tagsCount" (len .Site.Taxonomies.tags) -}}
{{- $vendors := .Site.Data.resources.vendors -}}
{{- $pluginVen := .Site.Params.vendors.plugins -}}
{{- $pluginCDN := index $vendors $pluginVen -}}
{{- .Scratch.Set "pluginCDN" $pluginCDN -}}

View File

@ -21,7 +21,7 @@
<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 | absLangURL }}" title="{{ .Title }}">{{ .Permalink | absLangURL }}</a> <a id="post-cr-link" href="{{ .Permalink | absLangURL }}" title="{{ .Title }}">{{ .Permalink | absLangURL }}</a>
{{- end }} {{- end }}
</li> </li>
<li class="post-copyright-license"> <li class="post-copyright-license">

View File

@ -6,7 +6,7 @@
{{- T "RewardDonate" -}} {{- T "RewardDonate" -}}
</button> </button>
<div class="post-reward"> <div class="post-reward">
{{- range $name,$img := $.Site.Params.reward }} {{- range $name,$img := .reward }}
{{- $fw := substr $name 0 1 }} {{- $fw := substr $name 0 1 }}
{{- $pay := replace $name $fw ($fw | upper) 1 }} {{- $pay := replace $name $fw ($fw | upper) 1 }}
{{- $payName := T (printf "Reward%s" $pay) }} {{- $payName := T (printf "Reward%s" $pay) }}

View File

@ -1,27 +1,19 @@
{{- $pageViewCls := "" }}
{{- if .Site.Params.leancloudVisitors.enable }} {{- if .Site.Params.leancloudVisitors.enable }}
<span id="{{ .Permalink }}" class="post-meta-item leancloud_visitors" data-flag-title="{{ .Title }}" title="{{ T "PostViews" }}"> {{- $pageViewCls = "leancloud-visitors-count" }}
<span class="post-meta-item-icon"> {{- end }}
<i class="far fa-eye"></i> {{- if and .Site.Params.waline.enable .Site.Params.waline.pageView }}
</span> {{- $pageViewCls = "waline-pageview-count" }}
<span class="post-meta-item-text">{{- print (T "PostViews") (T "SymbolColon") -}}</span> {{- end }}
<span class="leancloud-visitors-count"></span> {{- if and .Site.Params.busuanzi.enable .Site.Params.busuanzi.postViews }}
</span> {{- $pageViewCls = "busuanzi_value_page_pv" }}
{{- end }} {{- end }}
{{- if .Site.Params.firestore.enable }}
<span class="post-meta-item" title="{{ T "PostViews" }}"> <span class="post-meta-item" title="{{ T "PostViews" }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-eye"></i> <i class="far fa-eye"></i>
</span> </span>
<span class="post-meta-item-text">{{ print (T "PostViews") (T "SymbolColon") }}</span> <span class="post-meta-item-text">
<span class="firestore-visitors-count"></span> {{ print (T "PostViews") (T "SymbolColon") }}
</span> </span>
{{- end }} <span class="{{ $pageViewCls }}" data-path="{{ .RelPermalink | relLangURL }}"><i class="fa fa-sync fa-spin"></i></span>
{{- if and .Site.Params.busuanzi.enable .Site.Params.busuanzi.postViews }}
<span class="post-meta-item" title="{{ T "PostViews" }}" id="busuanzi_container_page_pv">
<span class="post-meta-item-icon">
<i class="{{ .Site.Params.busuanzi.postViewsIcon }}"></i>
</span> </span>
<span class="post-meta-item-text">{{ print (T "PostViews") (T "SymbolColon") }}</span>
<span id="busuanzi_value_page_pv"><i class="fa fa-sync fa-spin"></i></span>
</span>
{{- end }}

View File

@ -15,83 +15,32 @@
{{- $pluginJS = replace $pluginJS "${name}" $npm }} {{- $pluginJS = replace $pluginJS "${name}" $npm }}
{{- $pluginJS = replace $pluginJS "${version}" $js.version }} {{- $pluginJS = replace $pluginJS "${version}" $js.version }}
{{- $pluginJS = replace $pluginJS "${file}" $file }} {{- $pluginJS = replace $pluginJS "${file}" $file }}
<script type="text/javascript" src="{{ $pluginJS }}"></script> <script type="text/javascript" src="{{ $pluginJS }}" defer></script>
{{- end }} {{- end }}
<script class="next-config" data-name="main" type="application/json"> {{- $config := resources.Get "js/config.js" | resources.ExecuteAsTemplate "config.js" . }}
{ {{- $motion := resources.Get "js/motion.js" }}
"hostname": "theme-next.js.org", {{- $boot := resources.Get "js/next-boot.js" }}
"root": "/", {{- $utils := resources.Get "js/utils.js" }}
"images": "/images", {{- $nextjs := (slice $config $utils $boot ) }}
"scheme": "Gemini", {{- if .Site.Params.motion.enable }}
"darkmode": true, {{ $motionjs := resources.Get "js/motion.js" }}
"version": "8.12.1", {{ $nextjs = $nextjs | append $motionjs }}
"exturl": true, {{- end }}
"sidebar": {{- if or (eq .Site.Params.shceme "Muse") (eq .Site.Params.shceme "Mist") }}
{ {{ $musejs := resources.Get "js/schemes/muse.js" }}
"position": "left", {{ $nextjs = $nextjs | append $musejs }}
"display": "post", {{- end }}
"padding": 18, {{- if .Site.Params.bookmark.enable }}
"offset": 12 {{- $bookmarkjs := resources.Get "js/bookmark.js" }}
}, {{- $nextjs = $nextjs | append $bookmarkjs }}
"copycode": {{- end }}
{ {{- if .Site.Params.pjax }}
"enable": true, {{- $pjaxjs := resources.Get "js/pjax.js" }}
"style": "default" {{- $nextjs = $nextjs | append $pjaxjs }}
}, {{- end }}
"bookmark": {{- $nextjs = $nextjs | resources.Concat "js/hugo-next.js"}}
{ {{ if hugo.IsProduction }}
"enable": false, {{- $nextjs = $nextjs | minify | fingerprint }}
"color": "#222", {{ end }}
"save": "auto" <script type="text/javascript" src="{{ $nextjs.RelPermalink }}" defer></script>
},
"mediumzoom": true,
"lazyload": false,
"pangu": false,
"comments":
{
"style": "tabs",
"active": null,
"storage": true,
"lazyload": true,
"nav": null
},
"stickytabs": false,
"motion":
{
"enable": false,
"async": false,
"transition":
{
"post_block": "fadeIn",
"post_header": "fadeInDown",
"post_body": "fadeInDown",
"coll_header": "fadeInLeft",
"sidebar": "fadeInUp"
}
},
"prism": false,
"i18n":
{
"placeholder": "Searching...",
"empty": "We didn't find any results for the search: ${query}",
"hits_time": "${hits} results found in ${time} ms",
"hits": "${hits} results found"
},
"path": "/search.json",
"localsearch":
{
"enable": true,
"trigger": "auto",
"top_n_per_article": 1,
"unescape": false,
"preload": false
}
}
</script>
{{ $config := resources.Get "js/config.js" }}
{{ $boot := resources.Get "js/next-boot.js" }}
{{ $utils := resources.Get "js/utils.js" }}
{{ $alljs := (slice $config $boot $utils) | resources.Concat "js/all.js"}}
<script defer src="{{ $alljs.RelPermalink }}"></script>

View File

@ -60,11 +60,10 @@
{{- end }} {{- end }}
</div> </div>
{{- $lang := .Scratch.Get "lang" }}
{{- with .Site.Params.creativeCommons }} {{- with .Site.Params.creativeCommons }}
{{- if .sidebar }} {{- if .sidebar }}
<div class="cc-license animated" itemprop="license"> <div class="cc-license animated" itemprop="license">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr $lang 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}"> <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr $.Site.LanguageCode 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}">
<img src="/imgs/cc/{{ .size }}/{{ replace .license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}"> <img src="/imgs/cc/{{ .size }}/{{ replace .license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">
</a> </a>
</div> </div>

View File

@ -5,8 +5,8 @@ description = "Easily & powerful theme for Hugo engine."
homepage = "https://github.com/hugo-next/hugo-theme-next" homepage = "https://github.com/hugo-next/hugo-theme-next"
tags = ["blog", "simple", "dark", "personal", "fast", "theme"] tags = ["blog", "simple", "dark", "personal", "fast", "theme"]
features = ["some", "awesome", "features"] features = ["some", "awesome", "features"]
min_version = "0.80.0" min_version = "0.86.0"
demosite = "https://lisenhui.cn" demosite = "https://preview.hugo-next.eu.org"
[author] [author]
name = "lisenhui" name = "lisenhui"