ouuan / blog-comments

用作博客评论存放 | Comments of my blog
1 stars 0 forks source link

从 Hexo 到 Hugo - ouuan的博客 #45

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

从 Hexo 到 Hugo - ouuan的博客

该博客的前身是自 2018 年 12 月搭建的 hexo 博客,于 2020 年 2 月搬迁至 hugo。

https://ouuan.github.io/post/from-hexo-to-hugo/

TosakaUCW commented 4 years ago

ouuan dalao 您好, 我在 clone 了您博客的源码并尝试在本地 hugo server, 但是在编译 {{% /admonition %}} 之类的一些代码时会报错: got closing shortcode, but none is open, 请教一下如何才能正确编译 ( hugo 版本 hugo_extended_0.74.3_Windows-64bit )

ouuan commented 4 years ago

ouuan dalao 您好, 我在 clone 了您博客的源码并尝试在本地 hugo server, 但是在编译 {{% /admonition %}} 之类的一些代码时会报错: got closing shortcode, but none is open, 请教一下如何才能正确编译 ( hugo 版本 hugo_extended_0.74.3_Windows-64bit )

git submodule update --init --recursive 了吗?

TosakaUCW commented 4 years ago

ouuan dalao 您好, 我在 clone 了您博客的源码并尝试在本地 hugo server, 但是在编译 {{% /admonition %}} 之类的一些代码时会报错: got closing shortcode, but none is open, 请教一下如何才能正确编译 ( hugo 版本 hugo_extended_0.74.3_Windows-64bit )

git submodule update --init --recursive 了吗?

还是不行 , 提示 : failed to extract shortcode: template for shortcode "admonition" not found

ouuan commented 4 years ago

还是不行 , 提示 : failed to extract shortcode: template for shortcode "admonition" not found

你确认 submodule 成功初始化了吗?你看看 themes/even/layouts/shortcodes/admonition.html 是否存在。很有可能是初始化 submodule 失败了。

TosakaUCW commented 4 years ago

还是不行 , 提示 : failed to extract shortcode: template for shortcode "admonition" not found

你确认 submodule 成功初始化了吗?你看看 themes/even/layouts/shortcodes/admonition.html 是否存在。很有可能是初始化 submodule 失败了。

重新试了下, 成功了, 非常感谢, 之前忘挂代理了, 导致 submodule 初始化失败

ojbk8 commented 4 years ago

大佬 git clone了全部,生成的站点 代码复制按钮没出现 麻烦指点一下 谢谢!

ojbk8 commented 4 years ago

纠正一下问题,复制按钮是存在的 但是错位了,复制二字在代码框框外面了,左上角。

ouuan commented 4 years ago

大佬 git clone了全部,生成的站点 代码复制按钮没出现 麻烦指点一下 谢谢!

纠正一下问题,复制按钮是存在的 但是错位了,复制二字在代码框框外面了,左上角。

没代码我怎么知道..

pwwq commented 4 years ago

大佬 请问在config.toml的Params.Social里增加telegram要怎么弄,我加了后图标、链接都不显示

ouuan commented 4 years ago

大佬 请问在config.toml的Params.Social里增加telegram要怎么弄,我加了后图标、链接都不显示

https://github.com/ouuan/hugo-theme-even/blob/ed8ea9b13b445d5b8c500551e3d8107a21e8d71e/assets/sass/_iconfont.scss#L42-L123https://github.com/ouuan/hugo-theme-even/blob/master/static/fonts/iconfont/iconfont.svg 加入 telegram。

或者直接修改 https://github.com/ouuan/hugo-theme-even/blob/ed8ea9b13b445d5b8c500551e3d8107a21e8d71e/layouts/partials/footer.html#L2-L7

遇到这种问题最好自己全仓库搜索一下 bilibili(即一个可以用的图标的名字)..

TosakaUCW commented 3 years ago

Ouuan 您好,请教一下在 github action 的基础上如何加密文章

ouuan commented 3 years ago

Ouuan 您好,请教一下在 github action 的基础上如何加密文章

用个 AES256 之类的加密算法,上传加密版本,用 JavaScript 解密差不多就可以了。我没这个需求,不会去搞这个功能,你可以自己试着写一写。https://github.com/yhx-12243/OI-transit/blob/master/memos/2.html 不知道能不能参考一下。

ouuan commented 3 years ago

我是觉得要加密的东西放在本地就好了..如果是为了方便在不同的电脑上看,可以用其它服务,比如网盘,private repo 之类的。感觉不能给别人看的东西就不是放在博客上的..

TosakaUCW commented 3 years ago

谢谢 ouuan,还有个问题想请教,我在本地对 theme 文件进行了修改,本地 hugo server 出来的是修改后的文件,但是 push 到 github 上却没变 ,已经修改了 .gitmodules

ouuan commented 3 years ago

还有个问题想请教,我在本地对 theme 文件进行了修改,本地 hugo server 出来的是修改后的文件,但是 push 到 github 上却没变 ,已经修改了 .gitmodules

https://github.com/TosakaUCW/hugo_blog/tree/master/themes 这里没变。你看看 git status 有没有显示 submodules 相关。一般 .gitsubmodules 不需要手动修改。

ShuYuMo2003 commented 3 years ago

hexo 队渲染速度确确实实做了一些优化,比如加了一些缓存之类的。

但是 NexT 主题自带的 mathjax 渲染器有一些限制,导致我写公式的时候需要写一些转义…我觉得很蛋疼,现在使用 pandoc 渲染(NexT提供了相应的插件),然后渲染速度就…… 20篇左右公式比较多的文章,本机需要25s左右…

部署了 github action ,渲染需要从安装pandoc开始…… 然后跑一次大概需要3min…

https://github.com/ShuYuMo2003/MyBlogSourceFile/actions?query=workflow%3A%22Build+and+Deploy%22

/kel