xiaoheiah / hugo-theme-pure Goto Github PK
View Code? Open in Web Editor NEWA pure theme for Hugo
Home Page: https://themes.gohugo.io/theme/hugo-theme-pure/
License: MIT License
A pure theme for Hugo
Home Page: https://themes.gohugo.io/theme/hugo-theme-pure/
License: MIT License
I'm looking mainly for WhatsApp, Telegram icons.
Because the rss.xml is using lastBuildDate
which always change all xml files are recreated and thus needing deployment.
That date should be the date of the last commit instead of .Date.Format
which varies too much.
Building site twice should not report any changed files.
Another idempotency breaking comes from sitemap.xml
where order of seems not to be consistent, at least for the categories, where I seen random changes. Probably cased by an unsorted dictionary.
我可以在本地上渲染成功,但是部署到github page上就渲染不成功哎这个是为啥呢
在归档界面,以你的demo为例子,就是 https://xiaohei.im/hugo-theme-pure/posts/ 这个界面,如果文章的日期有2019年、2018年...,点击图标收缩,只有最上面的一个年份能收缩,而且是收缩全部年份的文章,点击2018年的图标,收缩功能无效。
报错信息:
Error: Error building site: failed to render pages: render of "section" failed: "/root/hillsbird/themes/hugo-theme-pure/layouts/_default/list.html:11:55": execute of template failed: template: _default/list.html:11:55: executing "content" at <$.RegularPages>: can't evaluate field RegularPages in type *hugolib.pageState
这是啥意思?
It would be useful to add support for github sponsorship in addition to the other two existing options. Also you may want to enable it for your theme repo too.
https://gohugo.io/hugo-pipes/introduction/
This can improve our site's performance
Referring to the following code:
The nav links have their strings swapped, the text should be as follows:
@xiaoheiAh
具体说应该不能叫做问题,是一个新手很有可能犯的小差错。
具体情况如下
在把themes中exampleSite中的config.yml文件覆盖到站点根目录后,如果直接hugo -t pure 命令渲染的话会出现只有站点的首页才被正确渲染,而其他链接点击后可以跳转但是页面没有被完整渲染。
解决方法如下
把复制出来的config文件中第一行中的 bashURL: http://example.com/ 改为 bashURL: / 保存后重新渲染一边即可解决。希望作者能把这个提示也加在readme.md 的两个版本中,后来者也能少走弯路
最后,感谢作者的辛苦付出~ 👍
New to hugo. I met problems in such:
1/ Instagram API is broken with
Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://instagram.com/p/BGvuInzyFAe/&hidecaption=1": Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BGvuInzyFAe/&hidecaption=1
Also the twitter/ Vimeo not working( only youtube still working)
I want to fix it but I can not find option/ code. ( I know it is shortcode not working but not knowing how to fix )
2/ How can I change the font size in article pages?
I want my article's main body font much larger (including markdown headings/ quote/ code fence etc. Is it possible in this theme?
3/ How can I disable tags globally?
I have disabled tags in the two sidebars, I want to disable it below the title.
I was wondering about how should we implement this?
一般来讲,只希望列出来/blog
或者/post
文件夹下的内容,其它内容属于固定页面,不需要列出,也不需要评论框。
你好,这个 hugo 主题风格很好看,我很喜欢,谢谢你能够分享出来。
请问有没有计划实现文章目录功能?
比如这个 https://blog.befovy.com/2019/12/v2-go-modules/
如果不在计划中,可否指点一下应该如何修改,我前端完全是新手
defaultContentLanguage: zh
设置了之后还是英文界面 需要什么其他的设置么
Please add the ability to search not by one, but by several tags.
Since different articles may overlap with the same tags, but different topics.
I am using htmltest to validate the build output and I found what it appears to be a bug in theme:
htmltest started at 01:37:11 on public
========================================================================
running in concurrent mode, this is experimental
categories/romanian/index.html
target is a directory, href lacks trailing slash --- categories/romanian/index.html --> /categories
categories/tools/index.html
target is a directory, href lacks trailing slash --- categories/tools/index.html --> /categories
categories/devops/index.html
target is a directory, href lacks trailing slash --- categories/devops/index.html --> /categories
categories/i18n/index.html
target is a directory, href lacks trailing slash --- categories/i18n/index.html --> /categories
categories/molecule/index.html
target is a directory, href lacks trailing slash --- categories/molecule/index.html --> /categories
categories/ansible/index.html
target is a directory, href lacks trailing slash --- categories/ansible/index.html --> /categories
categories/python/index.html
target is a directory, href lacks trailing slash --- categories/python/index.html --> /categories
categories/usability/index.html
target is a directory, href lacks trailing slash --- categories/usability/index.html --> /categories
========================================================================
I may make sense to run htmltest on example site as part of the CI testing to assure that that theme output is "more" valid ;)
Error msg: Access to XMLHttpRequest at 'https://nyte-bk201.github.io/searchindex.json' from origin 'http://nyte.xyz' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Search functioning in your site with local resources sharing but it fails when hosting in GitHub pages with domain set. Check http://nyte.xyz/ if you want more info.
I try to fix but not familiar with back-end dev.
`Building sites … ERROR 2019/12/27 15:08:31 render of "taxonomyTerm" failed: execute of template failed: template: _default/category.terms.html:30:46: executing "_default/category.terms.html" at <len .Site.Params.mainsections>: error calling len: len of untyped nil
ERROR 2019/12/27 15:08:31 render of "home" failed: execute of template failed: template: index.html:30:46: executing "index.html" at <len .Site.Params.mainsections>: error calling len: len of untyped nil
Total in 11 ms
Error: Error building site: failed to render pages: render of "taxonomyTerm" failed: execute of template failed: template: _default/tag.terms.html:30:46: executing "_default/tag.terms.html" at <len .Site.Params.mainsections>: error calling len: len of untyped nil
`
On the text, "I did note that, out of the box, LINQ’s IEnumerable.Any doesn’t do any optimization," both apostrophes generate weird spacing in the output text.
Looking at the underlying generated html, the spacing appears to be caused by a element being generated.
I have came across that when you enable uglyurl = "true"
post/category.html
post/tags.html
Does not append the .html to the URLs.
This problem happens across all the remote hosts including your demo and website:
https://xiaohei.im/hugo-theme-pure/
https://themes.gohugo.io/theme/hugo-theme-pure/
Also my site:
nyte.xyz
Confirmed in all my devices with different browsers and network environments.
Not knowing the reason but it could be a URL mistake.
The archive page: all posts in the same year are grouped together
I started using your theme at the end of last year, and created a number of posts. in the new year, I've now created two more posts, and all posts from last year are each listed in their own group, and the 2 posts from this year are in the same group.
If I change the posts from 2020 to drafts, all the posts from 2019 are all grouped together again. is this easily configurable from my side, or is this a change on the theme's side?
When I went through the files I saw a 404.html file but it didn't seem to have anything it it, do you have any plans on adding a 404 page to this theme?
So there are some basic settings that need to be configured for MathJax to run on production, I took a look at the hugo docs, the major setting that needs to be added is the support for mmark files :
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
showMathMenu: false, //disables context menu
tex2jax: {
inlineMath: [ ['$','$'], ['\\(','\\)'] ]
}
});
</script>
If you do not mention the article date a default 0001-01-01
is rendered which is at least ugly.
Some pages may not need a date and I think that the default behaviour should be to hide the date if is invalid.
This is very important for the article view where date is displayed in a very visible place. For other places like archive that is less important. Still, even in this case if rendering the date as an empty string could improve the visual look.
I get these errors when trying to build using hugo 0.62.0:
Building sites … ERROR 2019/12/30 20:18:53 render of "taxonomyTerm" failed: "C:\Users\tyler\Documents\tylerburleigh.github.io_source\themes\pure\layouts\_default\list.html:6:61": execute of template failed: template: _default\list.html:6:61: executing "content" at <.RegularPages>: can't evaluate field RegularPages in type *hugolib.pageState
ERROR 2019/12/30 20:18:53 render of "section" failed: "C:\Users\tyler\Documents\tylerburleigh.github.io_source\themes\pure\layouts\_default\list.html:6:61": execute of template failed: template: _default\list.html:6:61: executing "content" at <.RegularPages>: can't evaluate field RegularPages in type *hugolib.pageState
Total in 797 ms
Error: Error building site: failed to render pages: render of "section" failed: "C:\Users\tyler\Documents\tylerburleigh.github.io_source\themes\pure\layouts\_default\list.html:6:61": execute of template failed: template: _default\list.html:6:61: executing "content" at <.RegularPages>: can't evaluate field RegularPages in type *hugolib.pageState
WARN 2019/12/30 20:18:57 Module "pure" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Building sites … ERROR 2019/12/30 20:18:57 render of "section" failed: "C:\Users\tyler\Documents\tylerburleigh.github.io_source\themes\pure\layouts\_default\list.html:6:61": execute of template failed: template: _default\list.html:6:61: executing "content" at <.RegularPages>: can't evaluate field RegularPages in type *hugolib.pageState
ERROR 2019/12/30 20:18:57 render of "taxonomyTerm" failed: "C:\Users\tyler\Documents\tylerburleigh.github.io_source\themes\pure\layouts\_default\list.html:6:61": execute of template failed: template: _default\list.html:6:61: executing "content" at <.RegularPages>: can't evaluate field RegularPages in type *hugolib.pageState
Total in 629 ms
Error: Error building site: failed to render pages: render of "section" failed: "C:\Users\tyler\Documents\tylerburleigh.github.io_source\themes\pure\layouts\_default\list.html:6:61": execute of template failed: template: _default\list.html:6:61: executing "content" at <.RegularPages>: can't evaluate field RegularPages in type *hugolib.pageState
您好,非常喜欢您的主题。有个疑问,这样配置:
config:
toc: true
文章目录好像没有作用,请问是还要配置其它地方吗?
disqus is duplicated in multiple posts.!!
site : disqus is duplicated in multiple posts.
config : https://github.com/chlalstjd430/blog/blob/master/config.yml
when I comment on a post, it runs over multiple posts.
example..
2, but also run on other posts
Is it a problem for disqus?
Hello,
Thank you for your theme. I'm trying to setup disqus, but it seems to not inject disqus' js code.
site: https://sathyasays.com/
config: https://github.com/SathyaBhat/sathyasays.com/blob/master/config.yml#L128-L129
Looking at the source, I can see the comment section is added
<section id="comments">
<div id="disqus_thread">
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</section>
which means
https://github.com/xiaoheiAh/hugo-theme-pure/blob/master/layouts/partials/post/comment.html#L4-L7
is working but I don't know why
is not getting evaluated.
Any help is appreciated
搜索是不是需要配置 搜索没有内容
Hi, is there a way to remove :
本文链接:http://localhost:1313
版权声明:xx,均采用 CC BY 4.0 CN协议 许可协议。转载请注明出处!
In the end of the page?
The theme uses an outdated version of jquery which is now considered to have security issues. We should migrate to a supported version (3.4.1). You can use jquery-migrate, I have already tested it though and it doesn't issue any warnings, if you'd like, I can send in a pull request making the suggested changes.
您好,config.yml添加字段customFooter,但是备案信息并没有显示出来?
We should be able to disable sidebar in various pages by adding something like
---
layout: page
sidebar: false
---
....
At this moment I was not able to find any way to disable the sidebar on specific pages.
How do you set up math rendering??
hugo new site folder
cd folder
git clone <repo> ./themes/pure
copied config.yml from exampleSite
hugo new posts/test.mmark
echo \$\$a+b=c\$\$ >> ./content/posts/test.mmark
hugo server -D
but math renders as \(a+b=c\)
Also /layouts/partials/math.html
in the repo calls mathjax instead of katex, contrary to what instructions say.
Am I missing something?
To avoid the need to fork the clone to add customizations it would be useful to add ability to add a custom css file. Hugo forum has an useful thread related to this at https://discourse.gohugo.io/t/how-to-override-css-classes-with-hugo/3033
I liked this theme very much. I would like to migrate from another theme to this. I request you to specify the steps in Readme.md
错误信息:
ERROR 2019/12/30 12:53:52 render of "page" failed: "/Users/hadyang/Documents/hadyang.github.io/themes/pure/layouts/_default/single.html:4:12": execute of template failed: template: _default/single.html:4:6: executing "content" at <partial "article.html" .>: error calling partial: "/Users/hadyang/Documents/hadyang.github.io/themes/pure/layouts/partials/article.html:4:12": execute of template failed: template: partials/article.html:14:12: executing "partials/article.html" at <partial "post/category.html" .>: error calling partial: "/Users/hadyang/Documents/hadyang.github.io/themes/pure/layouts/partials/post/category.html:4:12": execute of template failed: template: partials/post/category.html:4:12: executing "partials/post/category.html" at <.>: range can't iterate over Java
Hugo版本:
Hugo Static Site Generator v0.62.0/extended darwin/amd64 BuildDate: unknown
配置文件:
baseURL: https://hadyang.github.io/
languageCode: zh-CN
title: HadYang
theme: pure
defaultContentLanguage: zh # en/zh/...
footnoteReturnLinkContents: ↩
hasCJKLanguage: true
paginate: 7
enableEmoji: true
permalinks:
posts: /:year/:month/:filename/
taxonomies:
category : categories
tag : tags
series : series
outputFormats: # use for search. recommend not to modify
SearchIndex:
mediaType: "application/json"
baseName: "searchindex"
isPlainText: true
notAlternative: true
outputs:
home: ["HTML","RSS","SearchIndex"] # recommend not to modify
# sitemap
sitemap:
changefreq: monthly
filename: sitemap.xml
priority: 0.5
menu:
main:
- identifier: home
name: Home
weight: 1
url: /
- identifier: tags
name: Tags
weight: 2
url: /tags
- identifier: categories
name: Categories
weight: 3
url: /categories
# Sidebar only the following widgets. you can remove any you don't like it.
params:
since: 2017
dateFormatToUse: "2006-01-02"
enablePostCopyright: true
# the directory under content folder that you want to render
mainSections: ["posts"]
# Enable/Disable menu icons
# Icon Reference: http://blog.cofess.com/hexo-theme-pure/iconfont/demo_fontclass.html
enableMathJax: true #Enable mathjax support, to use mathematical notations
highlightjs:
langs: ["python", "javascript"] # refer to http://staticfile.org/, search highlight.js, already have highlight.min.js
menuIcons:
enable: true # 是否启用导航菜单图标
home: icon-home-fill
archives: icon-archives-fill
categories: icon-folder
tags: icon-tags
repository: icon-project
books: icon-book-fill
links: icon-friendship
about: icon-cup-fill
# profile
profile:
enabled: true # Whether to show profile bar
avatar: avatar.png
gravatar: # Gravatar email address, if you enable Gravatar, your avatar config will be overriden
author: xiaoheiAh
author_title: author title
author_description: Good Good Study, Day Day Up~
location: Shanghai, China
follow: https://github.com/xiaoheiAh
# Social Links
social:
links:
github: https://github.com/xiaoheiAh
# weibo: http://weibo.com/{yourid}
# twitter: https://twitter.com/
# facebook: /
rss: /index.xml
link_tooltip: false # enable the social link tooltip, options: true, false
# Site
site:
logo:
enabled: true
width: 40
height: 40
url: favicon.ico
title: Hugo # 页面title
favicon: favicon.ico
board: <p>enjoy~</p> # 公告牌
# Share
# weibo,qq,qzone,wechat,tencent,douban,diandian,facebook,twitter,google,linkedin
share:
enable: true # 是否启用分享
sites: weibo,qq,wechat,facebook,twitter # PC端显示的分享图标
mobile_sites: weibo,qq,qzone # 移动端显示的分享图标
# Comment
comment:
type: # type disqus/gitalk/valine 启用哪种评论系统
disqus: your_disqus_name # enter disqus shortname here
gitalk: # gitalk. https://gitalk.github.io/
owner: #必须. GitHub repository 所有者,可以是个人或者组织。
admin: #必须. GitHub repository 的所有者和合作者 (对这个 repository 有写权限的用户)。
repo: #必须. GitHub repository.
ClientID: #必须. GitHub Application Client ID.
ClientSecret: #必须. GitHub Application Client Secret.
valine: # Valine. https://valine.js.org
appid: # your leancloud application appid
appkey: # your leancloud application appkey
notify: # mail notifier , https://github.com/xCss/Valine/wiki
verify: # Verification code
placeholder: enjoy~ # comment box placeholder
avatar: mm # gravatar style
meta: nick,mail # custom comment header
pageSize: 10 # pagination size
visitor: false # Article reading statistic https://valine.js.org/visitor.html
# Donate
donate:
enable: false
# 微信打赏
wechatpay:
qrcode: donate/wechatpayimg.png
title: 微信支付
# 支付宝打赏
alipay:
qrcode: donate/alipayimg.png
title: 支付宝
# PV
pv:
busuanzi:
enable: false # 不蒜子统计
leancloud:
enable: false # leancloud统计
app_id: # leancloud <AppID>
app_key: # leancloud <AppKey>
# wordcount
postCount:
enable: true
wordcount: true # 文章字数统计
min2read: true # read time 阅读时长预计
# config
config:
skin: # theme color default is white. other type [theme-black,theme-blue,theme-green,theme-purple]
layout: main-center # main-left main-center main-right
excerpt_link: Read More
toc: true
# Sidebar
sidebar: right
# Search
search:
enable: true # enable search. thanks for https://raw.githubusercontent.com/ppoffice/hexo-theme-icarus/master/source/js/insight.js
# Sidebar only the following widgets. you can remove any you don't like it.
widgets:
- board
- category
- tag
- recent_posts
params:
email: [email protected]
github: https://github.com/hadyang
image: resources/img/IMG_3162.JPG
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.