hexo-theme-yelee
hexo-theme-yelee copied to clipboard
Hugo 主题迁移
你好, 非常喜欢这款主题,但是我是GO语言爱好者,使用Hugo, 作者这款主题可以迁移到Hugo吗
@sanghai @MOxFIVE
- 作者是否有支持hugo的计划?
- 因为非常喜欢这个主题,所以最近打算在hugo环境高仿一个,是否会涉及版权问题?
老铁 我大致防了一版 基本的功能满足我个人使用了 地址:https://github.com/NightFarmer/hugo-theme-yelee
我博客已经从hexo换到hugo了 效果就是这样https://www.nightfarmer.top/
多谢老铁啊, 终于可以使用这个主题了
有一个问题:
我Hugo server -D 的时候提示
uilding sites … ERROR 2018/08/09 21:24:23 Failed to render "taxonomy/tag.terms.html": reflect: Zero(nil) ERROR 2018/08/09 21:24:23 Stack Trace: goroutine 58 [running]: github.com/gohugoio/hugo/hugolib.stackTrace(0x4b0, 0x4c95113, 0x17) /private/tmp/hugo-20180801-41150-1lexkxf/hugo-0.46/src/github.com/gohugoio/hugo/hugolib/page.go:280 +0x76 github.com/gohugoio/hugo/hugolib.(*Site).renderForLayouts.func1(0xc42098b8a0, 0xc420510300) /private/tmp/hugo-20180801-41150-1lexkxf/hugo-0.46/src/github.com/gohugoio/hugo/hugolib/site.go:1742 +0x135
另外我点击所有文章和关于我(/post/ /about/)显示404错误。 能帮忙再看一下吗?
@sanghai 这个错看上去有点迷 我猜是有些文档的tag格式和hugo不太匹配 hexo中tag:xxx这样没问题 hugo只能[xxx]这样写
post的话需要把博客文档放在/content/post下才能显示 about需要/content/about/index.md或者/content/about.md 要不然找不着
还有就是<!--more-->
的写法
hexo中<!-- more -->
这样写没问题 但是hugo不允许有空格 而且上下需要存在空行 要不然识别不到
hugo的markdown应该是要比hexo的要严格一些 ,图片、列表这些语法都需要前后有空行要不然会存在格式错乱或者识别不到的问题
@NightFarmer 你好 我的博客是放在/content/post目录下的(hugo new post/first.md) 点击左侧标题栏的时候还是提示404 我的文件组织目录是 content/post/ public/MY_GIT 你的config.toml文件配置能展示一下吗,我在想是不是我的这个配置文件有哪里不正确?
我用的json格式 你可以用你习惯的格式来写
{
"languageCode" : "zh-cnzh-cn",
"theme" : "hugo-theme-yelee",
"title" : "NightFarmer's Blog",
"disablePathToLower" : true,
"params": {
"aboutme": "全栈扫地工",
"friends": {
"ice1000": "http://ice1000.org/",
"yeungkc": "https://yeungkc.com/",
"GitHub": "https://pages.github.com/"
},
"subnav": {
"Email": "mailto:[email protected]",
"GitHub": "https://github.com/NightFarmer"
},
"menu": [
{
"label": "主页",
"link": "/"
},
{
"label": "所有文章",
"link": "/archives/"
},
{
"label": "标签云",
"link": "/tags/"
},
{
"label": "关于我",
"link": "/about/"
}
]
}
}
你好
我运行hugo server --theme=hugo-theme-yelee --buildDrafts 报错如下:
Building sites … ERROR 2018/08/11 13:34:57 Failed to render "taxonomy/tag.terms.html": reflect: Zero(nil) ERROR 2018/08/11 13:34:57 Stack Trace: goroutine 196 [running]: github.com/gohugoio/hugo/hugolib.stackTrace(0x4b0, 0x4c95113, 0x17) /private/tmp/hugo-20180801-41150-1lexkxf/hugo-0.46/src/github.com/gohugoio/hugo/hugolib/page.go:280 +0x76 github.com/gohugoio/hugo/hugolib.(*Site).renderForLayouts.func1(0xc42088d8a0, 0xc420228300) /private/tmp/hugo-20180801-41150-1lexkxf/hugo-0.46/src/github.com/gohugoio/hugo/hugolib/site.go:1742 +0x135 panic(0x4b12440, 0x4e17240) /usr/local/Cellar/go/1.10.3/libexec/src/runtime/panic.go:502 +0x229 text/template.errRecover(0xc42088d790) /usr/local/Cellar/go/1.10.3/libexec/src/text/template/exec.go:143 +0x1ba panic(0x4b12440, 0x4e17240) /usr/local/Cellar/go/1.10.3/libexec/src/runtime/panic.go:502 +0x229 reflect.Zero(0x0, 0x0, 0x0, 0x0, 0x0) /usr/local/Cellar/go/1.10.3/libexec/src/reflect/value.go:2171 +0x107 text/template.(*state).validateType(0xc42088d710, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4205fcda0) /usr/local/Cellar/go/1.10.3/libexec/src/text/template/exec.go:696 +0x6b2 text/template.(*state).evalArg(0xc42088d710, 0x4c43cc0, 0xc4203bc000, 0x16, 0x0, 0x0, 0x4e28d80, 0xc4205dfb80, 0x94, 0x0, ...) /usr/local/Cellar/go/1.10.3/libexec/src/text/template/exec.go:745 +0x751 text/templ Total in 20 ms Error: Error building site: logged 2 error(s)
尝试着在layouts/目录下添加post目录,添加index.html也不起作用.
@sanghai 确实看不出来什么问题 或者你创建一个新项目然后把md文件逐一放进去 看看到底是哪个文件出了问题?或者把我博客的工程文件发你参考一下?
嗯嗯 你的工程文件发我一下 我试试
994336359
邮箱:[email protected]
Signature is customized by Netease Mail Master
在2018年08月13日 09:07,ZhangFan 写道: @sanghai 确实看不出来什么问题 或者你创建一个新项目然后把md文件逐一放进去 看看到底是哪个文件出了问题?或者把我博客的工程文件发你参考一下?
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/MOxFIVE/hexo-theme-yelee","title":"MOxFIVE/hexo-theme-yelee","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/MOxFIVE/hexo-theme-yelee"}},"updates":{"snippets":[{"icon":"PERSON","message":"@NightFarmer in #234: @sanghai 确实看不出来什么问题 或者你创建一个新项目然后把md文件逐一放进去 看看到底是哪个文件出了问题?或者把我博客的工程文件发你参考一下?"}],"action":{"name":"View Issue","url":"https://github.com/MOxFIVE/hexo-theme-yelee/issues/234#issuecomment-412385077"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/MOxFIVE/hexo-theme-yelee/issues/234#issuecomment-412385077", "url": "https://github.com/MOxFIVE/hexo-theme-yelee/issues/234#issuecomment-412385077", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [MOxFIVE/hexo-theme-yelee] Hugo 主题迁移 (#234)", "sections": [ { "text": "", "activityTitle": "ZhangFan", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@NightFarmer", "facts": [
] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "IssueComment",\n"repositoryFullName": "MOxFIVE/hexo-theme-yelee",\n"issueId": 234,\n"IssueComment": "{{IssueComment.value}}"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "IssueClose",\n"repositoryFullName": "MOxFIVE/hexo-theme-yelee",\n"issueId": 234\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/MOxFIVE/hexo-theme-yelee/issues/234#issuecomment-412385077" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "MuteNotification",\n"threadId": 346653636\n}" } ], "themeColor": "26292E" } ]
@sanghai 我把blog托管放开了 你直接clone吧 主题也需要重新clone
https://gitee.com/NightFarmer/hugoblog
你好,邮件我收到了,我运行过程中遇到了如下问题: `hugo new site github.io cd github.io & git clone https://github.com/${MYGIT} ./public git clone https://github.com/NightFarmer/hugo-theme-yelee ./themes hugo new post/first.md
hugo server --theme=hugo-theme-yelee --buildDrafts
邮件我收到了, 你的工程目录运行良好,但是对你的content目录下修改下,
mv content content_bck && mkdir content
hugo server --theme=${THEME} --buildDrafts` 就会出现一样的问题
你能按照hugo官方的流程尝试一下吗?
·
- hugo new site mysite && cd mysite
- hugo clone ${THEME}
- hugo new post/first.md
- configure your hugo config file to set theme = ${THEME}
- hugo server --theme=${THEME} --buildDrafts `
@sanghai
你的问题我这边重现了,原因是标签云页面出现了空指针,也就是博文的tags属性没有设置,我刚刚修复了这个问题,你重新pull一下应该就可以了。
你好,博客列表显示正常了,效果非常棒,很喜欢这个效果 还有个习惯问题,打开博客如何修改为当前页面打开?我的习惯还是当前页面打开显示文章。 另外about me 页面404,如何解决? 还有这个怎么清空? 本站到访数: 437728 , 本页阅读量: 2933
当前页打开需要设置open_in_new
为false
aboutme页面可以尝试新增文件/content/about/index.md
本站到访数量是根据url自动获取的 localhost是所有人共享的 发布到服务器上就会根据域名重新计算了。