flysnow-org / comment

http://www.flysnow.org/ 博客的评论
http://www.flysnow.org/
1 stars 0 forks source link

2018/07/29/from-hexo-to-hugo #12

Open utterances-bot opened 5 years ago

utterances-bot commented 5 years ago

从Hexo迁移到Hugo-送漂亮的Hugo Theme主题 | 飞雪无情的博客

从Hexo迁移到Hugo-送漂亮的Hugo Theme主题

http://www.flysnow.org/2018/07/29/from-hexo-to-hugo.html

CaiJingLong commented 5 years ago

感谢感谢 东西不错,最近在试用,待我完成blog部署后再来感谢

flysnoworg commented 5 years ago

加油。 @CaiJingLong

houhanchao commented 5 years ago

感谢你编辑的主题! 我最近刚开始使用(https://houhanchao.github.io/),遇到一些问题。不知道能不能麻烦解答: 1 配置文件config.toml转码成UTF-8以后网页访问不了,不用UTF-8又不能显示中文,不知道是为什么。

转成UTF-8以后错误提示如下:Failed to reload config:

"C:\WeCloud\myblog2\config.toml:1:1": unmarshal failed: Near line 0 (last key parsed ''): bare keys cannot contain '\ufeff' 1 2 3 baseURL = "https://houhanchao.github.io"

languageCode = "zh-CN"

2 如何配置标签云? 我看到你说这个主题支持标签云,但没找到怎么配置。感谢。

flysnoworg commented 5 years ago

1.把Config.toml转换成无BOM的UTF-8,你的是BOM的,所以会出现这个问题。 2.在每篇MD文章离得Header Formter里设置tags=["标签1","标签2"],即可显示标签云

@houhanchao

houhanchao commented 5 years ago

太感谢了! 根据你的说明已经都设置好了,不过还有很多没设置的,希望以后还可以向你请教。

  1. 果然是BOM的问题,已经改好了
  2. 噢噢 原来你说的标签云就是显示标签。我以为是根据标签内文章的多少调整标签字体大小的那种云。

祝你新年快乐!

flysnoworg commented 5 years ago

很不错,看到你的博客已经运行起来了 👍🏻 @houhanchao

binhaifgs1 commented 5 years ago

大佬 我的网页里没有显示评论功能 需要怎样设置

flysnoworg commented 5 years ago

不是,教程参考这个 https://github.com/rujews/maupassant-hugo#utteranc @binhaifgs1

binhaifgs1 commented 5 years ago

谢谢,主题里的comments.html文件需要改吗? 另外,我用的disqus评论的时候说需要邮箱验证,发送验证邮件后收到的邮件没有验证链接。

On Mon, Jan 7, 2019, 9:25 AM 飞雪无情 <notifications@github.com wrote:

不是,教程参考这个 https://github.com/rujews/maupassant-hugo#utteranc @binhaifgs1 https://github.com/binhaifgs1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/flysnow-org/comment/issues/12#issuecomment-451795773, or mute the thread https://github.com/notifications/unsubscribe-auth/Aq3OpKPUsxMx5H3wrzARk0RNalAGE8bcks5vAqIggaJpZM4Y7X-Q .

flysnoworg commented 5 years ago

都不需要,只需要在config.toml里配置就好了。disqus被墙了,不是太好用。

zhscn commented 5 years ago

大佬,see also的链接怎么设置?

flysnoworg commented 5 years ago

目前是HUGO的算法自动生成的,会根据你的分类、标签的设置,选择最相关的文章。 目前还不能手动设置 @zhscn

zhscn commented 5 years ago

原来是这个原因。感谢指点:P

zhscn commented 5 years ago

还有一个问题,我用markdown生成的表格在blog上看是没有框线的,只有表格中的文字,这个是怎么回事?

ngnetboy commented 5 years ago

你好,我在运行的时候报错如下: PS D:\code\golang\hugo\helloworld\quickstart> hugo.exe server Building sites … WARN 2019/02/15 18:06:57 Found no layout for "taxonomyTerm", language "en", output format "HTML": crea te a template below /layouts with one of these filenames: tags/tag.terms.en.html.html, tags/terms.en.html.html, tags/lis t.en.html.html, tags/tag.terms.html.html, tags/terms.html.html, tags/list.html.html, tags/tag.terms.en.html, tags/terms. en.html, tags/list.en.html, tags/tag.terms.html, tags/terms.html, tags/list.html, taxonomy/tag.terms.en.html.html, taxon omy/terms.en.html.html, taxonomy/list.en.html.html, taxonomy/tag.terms.html.html, taxonomy/terms.html.html, taxonomy/lis t.html.html, taxonomy/tag.terms.en.html, taxonomy/terms.en.html, taxonomy/list.en.html, taxonomy/tag.terms.html, taxonom y/terms.html, taxonomy/list.html, tag/tag.terms.en.html.html, tag/terms.en.html.html, tag/list.en.html.html, tag/tag.ter ms.html.html, tag/terms.html.html, tag/list.html.html, tag/tag.terms.en.html, tag/terms.en.html, tag/list.en.html, tag/t ag.terms.html, tag/terms.html, tag/list.html, _default/tag.terms.en.html.html, _default/terms.en.html.html, _default/lis t.en.html.html, _default/tag.terms.html.html, _default/terms.html.html, _default/list.html.html, _default/tag.terms.en.h tml, _default/terms.en.html, _default/list.en.html, _default/tag.terms.html, _default/terms.html, _default/list.html WARN 2019/02/15 18:06:57 Found no layout for "taxonomyTerm", language "en", output format "HTML": create a template belo w /layouts with one of these filenames: categories/category.terms.en.html.html, categories/terms.en.html.html, categorie s/list.en.html.html, categories/category.terms.html.html, categories/terms.html.html, categories/list.html.html, categor ies/category.terms.en.html, categories/terms.en.html, categories/list.en.html, categories/category.terms.html, categorie s/terms.html, categories/list.html, taxonomy/category.terms.en.html.html, taxonomy/terms.en.html.html, taxonomy/list.en. html.html, taxonomy/category.terms.html.html, taxonomy/terms.html.html, taxonomy/list.html.html, taxonomy/category.terms .en.html, taxonomy/terms.en.html, taxonomy/list.en.html, taxonomy/category.terms.html, taxonomy/terms.html, taxonomy/lis t.html, category/category.terms.en.html.html, category/terms.en.html.html, category/list.en.html.html, category/category .terms.html.html, category/terms.html.html, category/list.html.html, category/category.terms.en.html, category/terms.en. html, category/list.en.html, category/category.terms.html, category/terms.html, category/list.html, _default/category.te rms.en.html.html, _default/terms.en.html.html, _default/list.en.html.html, _default/category.terms.html.html, _default/t erms.html.html, _default/list.html.html, _default/category.terms.en.html, _default/terms.en.html, _default/list.en.html, _default/category.terms.html, _default/terms.html, _default/list.html WARN 2019/02/15 18:06:57 Found no layout for "section", language "en", output format "HTML": create a template below /la youts with one of these filenames: post/post.en.html.html, post/section.en.html.html, post/list.en.html.html, post/post. html.html, post/section.html.html, post/list.html.html, post/post.en.html, post/section.en.html, post/list.en.html, post /post.html, post/section.html, post/list.html, section/post.en.html.html, section/section.en.html.html, section/list.en. html.html, section/post.html.html, section/section.html.html, section/list.html.html, section/post.en.html, section/sect ion.en.html, section/list.en.html, section/post.html, section/section.html, section/list.html, _default/post.en.html.htm l, _default/section.en.html.html, _default/list.en.html.html, _default/post.html.html, _default/section.html.html, _defa ult/list.html.html, _default/post.en.html, _default/section.en.html, _default/list.en.html, _default/post.html, _default /section.html, _default/list.html

skywind3000 commented 5 years ago

https://github.com/rujews/maupassant-hugo/pull/38

@ngnetboy, 可以使用我做的 PR,修复了这个问题。

651016236 commented 5 years ago

摘要文字显示不正确,默认140个字,但是显示的远远超出这个范围

flysnoworg commented 5 years ago

1.设置摘要字数,文档里有说明 2.设置分类,参考hugo的文档Front 3.只有具体文章显示阅读数,其他路径不会 @accfcx

ghost commented 5 years ago

@i-cooltea 我也遇到了同样的问题,归档的正确姿势在这里

jffree commented 5 years ago

请问一下,我的菜单和最近文章没有显示,这个该怎么设置?

flysnoworg commented 5 years ago

大佬 为什么我的归档显示不正常 ? https://i-cooltea.github.io

看下是否有对应的layout文件

flysnoworg commented 5 years ago

请问一下,我的菜单和最近文章没有显示,这个该怎么设置?

范围有点大,看看你config菜单的配置

reuixiy commented 5 years ago

我也纠结了很久.html的问题,发现无解,最后还是放弃了。关于 404,我自己测试了一下,不设置uglyurls,如果访问的 URL 有.html也并不会导致 404,仍能正常访问,所以也罢吧,不要.html

flysnoworg commented 5 years ago

Hugo里没有.html的问题 @reuixiy

reuixiy commented 5 years ago

@rujews 我说的是你文中所说的从 Hexo 迁移到 Hugo 的 URL 链接的问题,其实新的链接可以不要.html,因为并不会导致原 Hexo 博客的链接 404,这就意味着自己可以不用手动去修改每篇文章的 Front Matter 以强制指定文章的 URL,新的链接直接不要.html后缀即可。

Ryune911 commented 5 years ago

感谢,搭建完成

leeyo commented 5 years ago

你好,content/posts/ 目录下面有 index.md 、index2.md ,为什么只有index.md 才可以访问,index2.md 不能访问?

leeyo commented 5 years ago

两个文件的内容如下:

index.md

 ---
 title: "Posts"
 date: 2019-07-19T23:33:28+08:00
 draft: false
 ---

index2.md

---
title: "Index2"
date: 2019-07-19T23:34:06+08:00
draft: false
---
leeyo commented 5 years ago

我重新创建了一个blog就可以了,谢谢作者开源的主题

iFence commented 5 years ago

感谢博主,基本ok了。但是有个问题设置自定义菜单以后,归档按照您说的完成了,可以访问。但是自定义菜单“关于”,设置好后点击是空白的。但是我在content/about目录下有创建相应的md文章,请问怎么解决。

iFence commented 5 years ago

还有一个问题,请问每当写好一篇文章需要怎么上传到博客上呢?有没有简便一点的方式,是不是需要git init等好几步才能上传上去?谢谢

flysnoworg commented 5 years ago

生成html静态文件后,可以把静态文件长传到你的服务器。静态文件一般在public目录里 @iFence

fortheddy commented 5 years ago

大佬,我用了你的主题部署到github pages,在github pages settings里面绑定了自己买的域名以后主题不生效了,不绑定域名就正常。我看了github上绑定自定义域名会在repository根目录产生一个CNAME文件,是因为这个导致主题不显示么?要怎么解决?麻烦大佬指点一下,谢谢

flysnoworg commented 5 years ago

除了CNAME文件外,你还要在你的DNS服务器配置cname指向 @splintereddy

fortheddy commented 5 years ago

我已经在阿里云DNS解析里面添加了指向github.io的cname解析,现在访问域名cloudarch.tech可以打开博客,但是博客的内容是无格式的,主题显示不了(不配置自定义域名的时候把cname文件删了直接用splintereddy.github.io/cloudarch是正常显示的)。还有就是github里面自定义域名的https不能开启,显示Unavailable for your site because your domain is not properly configured to support HTTPS ,是需要我在阿里云里面先配置一个免费的ssl证书么?

fortheddy commented 5 years ago

解决了,toml文件里baseurl地址没写对。

fdgggy commented 5 years ago

你好,我设置了我的Blog, 我的预览文章的行数特别多,我看你们的都很短,搞不清楚为啥。

flysnoworg commented 5 years ago

摘要对吧?参考我这个。

hasCJKLanguage = true
summaryLength = 140
fdgggy commented 5 years ago

找了好久终于找到喜欢的主题,并成功部署,感谢 @rujews, 欢迎光临 https://fdgggy.github.io/

flysnoworg commented 5 years ago

👍🏻 @fdgggy

fdgggy commented 5 years ago

@rujews 请教个问题,markdown的目录树用[TOC]不能生成,这个主题有特殊要求?

flysnoworg commented 5 years ago

需要在front matter里配置toc=true @fdgggy

SysuJayce commented 4 years ago

@rujews 您好,首先非常感谢您所做的工作。

根据您的教程我正在尝试使用hugo搭建个人博客,但是在运行hugo server的时候会出现以下warning。

found no layout file for "HTML" for "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

虽然不影响使用,但是看起来有点膈应,而我目前还不知道应该如何解决这个warning。

网上查到的解决方案是在config中加入 disableKinds = ["page", "section", "taxonomy", "taxonomyTerm"],但是我试过之后并没有解决这个warning。

可以麻烦您抽空提供一个解决方案吗?

非常感谢!

liseen315 commented 4 years ago

呵呵哈哈

liupeidong0620 commented 4 years ago

有个问题设置自定义菜单以后,归档按照您说的完成了,可以访问。但是自定义菜单“关于”,设置好后点击是空白的。但是我在content/about目录下有创建相应的md文章,请问怎么解决。看到有人问过,但是没有看到解决方法

flysnoworg commented 4 years ago

about目录放index.md文件,index.md文件里要有内容,和普通的md文章一样 @liupeidong0620

yuhixyz commented 4 years ago

这个主题相当喜欢啊,除了代码块的白色高亮好突兀

yuhixyz commented 4 years ago

您好,我遇到了与楼上某位相同的错误found no layout file for "HTML" for "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.,这似乎最终导致了,虽然将博客部署到了阿里云上,但是除了首页,其他都会自动跳转到GitHub pages对应的位置,猜想可能是我的配置问题,希望指导。这是我的博客https://ketchuppp.xyz/

yuhixyz commented 4 years ago

可能上面说的不太详细,比如点击归档,我希望他跳转到https://ketchuppp.xyz/archives/,但他却跳转到https://ketchuppp.github.io/archives/,而前者其实是可以访问的且速度明显快,我不明白为什么会这样跳转,希望站长能帮助我

flysnoworg commented 4 years ago

你这个是config.toml里的baseUrl配置错了。要配置成你自己的域名,比如我的 baseURL = "https://www.flysnow.org" @ketchuppp