hugo-next / hugo-theme-next Goto Github PK
View Code? Open in Web Editor NEWEasily & powerful theme for Hugo engine.
Home Page: https://hugo-next.eu.org
License: MIT License
Easily & powerful theme for Hugo engine.
Home Page: https://hugo-next.eu.org
License: MIT License
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
在暗色背景下,鼠标选中文本,希望这段文本能够明显的区分于其他普通文本
在某一层级,支持层级导航覆盖全局导航, 层级导航配置支持多种,
有全局配置, 也有本地配置, 配置有默认路径(同一个文件夹在一个导航内),也可以手动配置(在当前文件夹创建index.config 或者其他方式声明), 也可以配置Tag(将这个Tag的所有页面配置路径合并为一个导航,排序有更新时间,创建时间, 指定排序字段(在每个文章的开头 --- 内配置)), 也可以配置类别,一个类别的文章在一起,使用类别筛选/或Tag筛选时,默认本地导航替换全局导航。
全局导航、本地导航 上级导航、下级导航 之间可以配置组合关系,
导航和 文章内导航共存, 可以放在左右两边,或者上下两边。
就像书本一样, 在文章内有索引, 子章节有索引, 章节有索引, 有书架(全局导航),里面有很多书
这个功能的另一种实现方式是增加分类和Tag的功能, 分类和Tag可以配置索引规则。 在某一个分类或者Tag页面,可以自定义列表展示样式, 排序等, 使得分类或者Tag有序(多层级)。
如果这两种实现都实现,效果会很好。参考一个博客网站 这类似于Tag, 这是自定义导航
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
(Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.)
请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
请描述你想实现的预期效果 (Please describe the expected behavior what you want)
正确加载pageview count
请同时提供网站链接、屏幕截图和源码地址 (Please provide your site links, screenshots and code repository)
waline开启pageview,views不可加载,直到滑动页面到底部,waline comment加载成功之后view count才可加载成功。应该是waline懒加载导致的问题,可能的解决方案是单独加载waline pageview js
提供主题
config.yaml
中修改过的部分内容 (Paste ONLY CHANGED CONFIGURATION fromconfig.yaml
)
waline:
serverURL: https://xxx.vercel.app
cssUrl: https://unpkg.com/@waline/client@v2/dist/waline.css
pageSize: 10 # Pagination size
lang: en-US
commentCount: true
pageView: true
wordLimit: 200
requiredMeta: ['nick', 'mail']
例如:操作系统、浏览器等 (e.g. Browser, System)
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
Tag与Category显示原始Term,而非小写正则化后的Tag。
修改比较容易,layouts/_default/terms.html
:
<a class="category-list-link" href="{{ "/categories/" | relLangURL }}{{ $name | urlize | lower }}" data-pjax-state="">{{ $name }}</a>
换成:
<a class="category-list-link" href="{{ "/categories/" | relLangURL }}{{ $name | urlize | lower }}" data-pjax-state="">{{ .Page.Title }}</a>
这里的.Page.Title
比较费解
plantuml 文本绘图类似 mermaid 但是支持的图形类型更多, 不仅仅是uml图, 可以使用plantuml官方的渲染网址,也可以自搭建,(可以指定服务器地址), 可以渲染为svg或者其他图片格式(可以指定渲染格式)
hugo版本:hugo_extended_0.110.0_windows-amd64
执行命令:hugo server
Start building sites …
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended windows/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio
ERROR 2023/01/21 20:36:07 render of "taxonomy" failed: "C:\site\saniye.cn\themes\Hugo NexT\layouts_default\baseof.html:1:21": execute of template failed: template: _default/terms.html:1:21: executing "_default/terms.html" at <partialCached "init.html" .>: error calling partialCached: "C:\site\saniye.cn\themes\Hugo NexT\layouts\partials\init.html:22:14": execute of template failed: template: partials/init.html:22:14: executing "partials/init.html" at <index .Site.Data.resources.vendors $vendor>: error calling index: value is nil; should be of type string
ERROR 2023/01/21 20:36:07 render of "taxonomy" failed: "C:\site\saniye.cn\themes\Hugo NexT\layouts_default\baseof.html:1:21": execute of template failed: template: _default/terms.html:1:21: executing "_default/terms.html" at <partialCached "init.html" .>: error calling partialCached: "C:\site\saniye.cn\themes\Hugo NexT\layouts\partials\init.html:22:14": execute of template failed: template: partials/init.html:22:14: executing "partials/init.html" at <index .Site.Data.resources.vendors $vendor>: error calling index: value is nil; should be of type string
Error: Error building site: failed to render pages: render of "home" failed: "C:\site\saniye.cn\themes\Hugo NexT\layouts_default\baseof.html:1:21": execute of template failed: template: index.html:1:21: executing "index.html" at <partialCached "init.html" .>: error calling partialCached: "C:\site\saniye.cn\themes\Hugo NexT\layouts\partials\init.html:22:14": execute of template failed: template: partials/init.html:22:14: executing "partials/init.html" at <index .Site.Data.resources.vendors $vendor>: error calling index: value is nil; should be of type string
集成 mermaid
插件实现
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
(Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.)
请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
请描述你想实现的预期效果 (Please describe the expected behavior what you want)
去掉不必要的livre script
生成的网站中包括livre头:
<script src="/livereload.js?mindelay=10&v=2&port=8903&path=livereload" data-no-instant defer></script> | |
请同时提供网站链接、屏幕截图和源码地址 (Please provide your site links, screenshots and code repository)
config.yaml中已disable livere,没有相关配置enable
grep了整个repo,并未发现相关js的存在。可能是:./assets/js/third-party/comments/livere.js
提供主题
config.yaml
中修改过的部分内容 (Paste ONLY CHANGED CONFIGURATION fromconfig.yaml
)
active: waline
storage: false
例如:操作系统、浏览器等 (e.g. Browser, System)
构建提示错误
Error: Error building site: TOCSS: failed to transform "main.scss" (text/x-scss): "/home/xxx/blog/themes/hugo-theme-next/assets/css/main.scss:66:25": Invalid CSS after "...ettings_layout:": expected expression (e.g. 1px, bold), was ";"
hugo v0.101.0 extended
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
defaultContentLanguage是en,post中同时有a.md
和a.en.md
,则只会生成a.html
(这个是Hugo处理多语言的问题),a.en.html
会缺失。在其他主题也存在同样问题,应该是Hugo的通用问题。
目前的解决方案是将defaultContentLanguage设为zh-CN。
参考:
https://gohugo.io/content-management/multilingual/#localizing-permalinks
Because paths and filenames are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory)
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
(Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.)
请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
请描述你想实现的预期效果 (Please describe the expected behavior what you want)
前提:siteState.statistic.enable=false
(隐藏了侧边栏的站点统计区块);且 comments.enable=false
(未开启评论功能)。
预期:单篇文章的浏览数,要么所有地方都不显示,要么所有地方都正确显示。
鉴于侧边栏已经隐藏了浏览量,只需要看单篇文章的浏览数显示,主要在这两类页面:
A、首页单篇文章概要:即 /
或 page/x/
,文章列表中的每一块概要区域,标题处显示的浏览数字。
B、单独文章页:即 /posts/文章名称.html
,唯一的那个文章标题下方的浏览数字。
尝试对以下3个配置项进行true/false改动:
三项开关排列组合,并观察上述两类页面表现,未能配置出预期效果。
(站点尚未发布,在本机上测试的)
1:true, 2:true, 3:true
时:1:false, 2:false, 3:false
时:1:true, 2:false, 3:false
时:1:true, 2:false, 3:true
时:1:true, 2:true, 3:false
时:1:false, 2:true, 3:true
时:1:false, 2:false, 3:true
时:1:false, 2:true, 3:false
时:唯有F
的情况才 勉强符合 预期,没有明显的错误观感……
这也是根据 ./exampleSite
中的 config 文件注释,反复试验多次才做到的。
上述用例 希望对作者有用哈,多谢你的劳动,带来这么酷的主题。
hugo-next theme 分支版本:为 main 当前最新提交 86b9b5a
hugo版本:v0.107.0+extended
例如:操作系统、浏览器等 (e.g. Browser, System)
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
支持谷歌adsense umami
支持谷歌adsense umami
支持谷歌adsense umami
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
主页显示每篇文章的评论数和阅读数,如有性能考虑,可以使用设置选择性开启。
块级公式显示正常,行内公式未正常显示
md内容:
$$ E=MC2 $$
$ y=x+10 $
请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
应该正常显示行内公式
macbook air m1
chrome浏览器
提供主题
config.yaml
中修改过的部分内容 (Paste ONLY CHANGED CONFIGURATION fromconfig.yaml
)
math: mathjax
macos
chrome
windows和linux环境下编译都报了这个错
$ ~/mysite/hugo-next-exmaple# hugo server
Building sites … ERROR 2022/07/24 14:55:53 render of "page" failed: execute of template failed: template: _default/single.html:1:4: executing "_default/single.html" at <partial "init.html" .>: error calling partial: "/root/mysite/hugo-next-exmaple/themes/hugo-theme-next/layouts/partials/init.html:3:11": execute of template failed: template: partials/init.html:3:11: executing "partials/init.html" at <hugo>: can't evaluate field IsExtended in type interface {}
ERROR 2022/07/24 14:55:53 render of "page" failed: execute of template failed: template: _default/single.html:1:4: executing "_default/single.html" at <partial "init.html" .>: error calling partial: "/root/mysite/hugo-next-exmaple/themes/hugo-theme-next/layouts/partials/init.html:3:11": execute of template failed: template: partials/init.html:3:11: executing "partials/init.html" at <hugo>: can't evaluate field IsExtended in type interface {}
ERROR 2022/07/24 14:55:53 render of "page" failed: execute of template failed: template: _default/single.html:1:4: executing "_default/single.html" at <partial "init.html" .>: error calling partial: "/root/mysite/hugo-next-exmaple/themes/hugo-theme-next/layouts/partials/init.html:3:11": execute of template failed: template: partials/init.html:3:11: executing "partials/init.html" at <hugo>: can't evaluate field IsExtended in type interface {}
ERROR 2022/07/24 14:55:53 render of "page" failed: execute of template failed: template: _default/single.html:1:4: executing "_default/single.html" at <partial "init.html" .>: error calling partial: "/root/mysite/hugo-next-exmaple/themes/hugo-theme-next/layouts/partials/init.html:3:11": execute of template failed: template: partials/init.html:3:11: executing "partials/init.html" at <hugo>: can't evaluate field IsExtended in type interface {}
Built in 95 ms
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:1:4: executing "_default/single.html" at <partial "init.html" .>: error calling partial: "/root/mysite/hugo-next-exmaple/themes/hugo-theme-next/layouts/partials/init.html:3:11": execute of template failed: template: partials/init.html:3:11: executing "partials/init.html" at <hugo>: can't evaluate field IsExtended in type interface {}
$ ~/mysite/hugo-next-exmaple# hugo version
Hugo Static Site Generator v0.68.3/extended linux/amd64 BuildDate: 2020-03-25T06:15:45Z
YAML
作为配置语法兼容原 NexT
参数Waline
、LiveRe
、Artalk
、Utterances
和 Giscus
评论插件Waline
的文章访问统计请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
TagCloud目前随机指定css class tag-cloud-{0}
,可按Tag频次进行字号大小排序
exampleSite目录中没有config文件夹
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
Show related posts in the sidebar or post end
我的hugo版本:
hugo v0.92.2-CDF6A0D6+extended windows/amd64 BuildDate=2022-02-11T14:17:39Z VendorInfo=gohugoio
$ hugo server
Start building sites …
hugo v0.92.2-CDF6A0D6+extended windows/amd64 BuildDate=2022-02-11T14:17:39Z VendorInfo=gohugoio
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:6:5: executing "main" at <partial "post.html" (dict "ctx" . "IsHome" false)>: error calling partial: execute of template failed: template: partials/post.html:19:9: executing "partials/post.html" at <partial "post/header.html" (dict "ctx" .ctx "IsHome" .IsHome)>: error calling partial: execute of template failed: template: partials/post/header.html:29:7: executing "partials/post/header.html" at <partial "post/header_meta/categories.html" .>: error calling partial: "C:\Hugo\hugo-next-exmaple\themes\hugo-theme-next\layouts\partials\post\header_meta\categories.html:2:35": execute of template failed: template: partials/post/header_meta/categories.html:2:35: executing "partials/post/header_meta/categories.html" at <len .Params.categories>: error calling len: reflect: call of reflect.Value.Type on zero Value
Built in 77 ms
Originally posted by @luqicoder in #13
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
参考Hugo官方的主题生成站点,发现Hugo的主题除了git submodule模式引入之外,还支持使用Golang 的模块管理功能导入,考虑引入此功能,便于Golang用户使用。
无
完善站点统计功用,支持多种不同的方案
请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。
(Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)
category和tags中不能有特殊字符,比如"C#"。
参考:https://discourse.gohugo.io/t/keep-special-characters-in-url-path/28025/3
更换成新的仓库链接报下面的错误。
运行指令:hugo server -D
hugo 版本:hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended darwin/amd64
Start building sites …
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended darwin/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio
ERROR 2022/06/22 10:03:57 render of "page" failed: "/Users/gclm/blog/themes/hugo-theme-next/layouts/_default/baseof.html:6:18": execute of template failed: template: _default/single.html:6:18: executing "_default/single.html" at <index $vendors $pluginVen>: error calling index: value is nil; should be of type string
ERROR 2022/06/22 10:03:57 render of "taxonomy" failed: "/Users/gclm/blog/themes/hugo-theme-next/layouts/_default/baseof.html:6:18": execute of template failed: template: _default/terms.html:6:18: executing "_default/terms.html" at <index $vendors $pluginVen>: error calling index: value is nil; should be of type string
ERROR 2022/06/22 10:03:57 render of "section" failed: "/Users/gclm/blog/themes/hugo-theme-next/layouts/_default/baseof.html:6:18": execute of template failed: template: _default/section.html:6:18: executing "_default/section.html" at <index $vendors $pluginVen>: error calling index: value is nil; should be of type string
ERROR 2022/06/22 10:03:57 render of "term" failed: "/Users/gclm/blog/themes/hugo-theme-next/layouts/_default/baseof.html:6:18": execute of template failed: template: _default/taxonomy.html:6:18: executing "_default/taxonomy.html" at <index $vendors $pluginVen>: error calling index: value is nil; should be of type string
Error: Error building site: failed to render pages: render of "term" failed: "/Users/gclm/blog/themes/hugo-theme-next/layouts/_default/baseof.html:6:18": execute of template failed: template: _default/taxonomy.html:6:18: executing "_default/taxonomy.html" at <index $vendors $pluginVen>: error calling index: value is nil; should be of type string
Built in 30 ms
自己擅自修改怕跟不上版本,谢谢
Succeed: disable page view on HOME page
Failed: disable page view on POST page
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
(Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.)
请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
请描述你想实现的预期效果 (Please describe the expected behavior what you want)
菜单项的图标和文字分别各自对齐
请同时提供网站链接、屏幕截图和源码地址 (Please provide your site links, screenshots and code repository)
浏览首页就可以看到问题
提供主题
config.yaml
中修改过的部分内容 (Paste ONLY CHANGED CONFIGURATION fromconfig.yaml
)
使用默认配置
例如:操作系统、浏览器等 (e.g. Browser, System)
Windows10
Chrome 104.0.5112.101(正式版本) (64 位)
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
(Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.)
请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
请描述你想实现的预期效果 (Please describe the expected behavior what you want)
可以配置一个自动标题目录开关,新建hugo博客的使用自动生成,从别的主题转过来就用之前的,这样不用每篇文章都改。
另外,如果可以添加Header部分放置菜单栏,侧边栏就放置个人信息和文章信息就更好了
请同时提供网站链接、屏幕截图和源码地址 (Please provide your site links, screenshots and code repository)
提供主题
config.yaml
中修改过的部分内容 (Paste ONLY CHANGED CONFIGURATION fromconfig.yaml
)
例如:操作系统、浏览器等 (e.g. Browser, System)
实现文章大纲目录有序号,同时可以滚动跟随
现有的评论插件是同步加载的方式,当评论插件加载失败时,会影响到页面上各种交互的功能,比如:
优化方案(思路):通过动态方式异步加载,待页面加载完成后再开始
希望提供rss支持
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.