dillonzq / LoveIt

❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://hugoloveit.com
MIT License
3.4k stars 1.08k forks source link

Style的扩展shortcode报错 #318

Open bao-wei opened 4 years ago

bao-wei commented 4 years ago

我使用style的shortcode编写如下内容: image 本地预览完全没有问题: image

但是push之后,github pages就开始报错了: image

大神,请问这个是我代码没有使用正确吗?还是github pages的问题?

bao-wei commented 4 years ago

我去掉文字加粗后又可以了😂,难道不能整段文字加粗?

bevsxyz commented 4 years ago

I don't understand why, but the site just wont build in github. In local server it runs fine

bevsxyz commented 4 years ago

I deleted all the cdn parameters and it works!

bevsxyz commented 4 years ago

from the config.toml i mean

dillonzq commented 4 years ago

@bao-wei @chain-ed-reaction Thanks for your feedback. Maybe I should test deploying on GitHub Pages. 感谢你们的反馈. 也许我应该测试一下 GitHub Pages 上的部署.

bevsxyz commented 4 years ago

It requires netlify?

dillonzq commented 4 years ago

https://github.com/gcushen/hugo-academic/issues/874 https://github.com/gcushen/hugo-academic/pull/917

dillonzq commented 4 years ago

@bao-wei 你试试把 {{< ... >}} 换成 {{% ... %}}, 或者在 strong{} 前后加空格。 总之是一个 Github pages 的 bug.

dillonzq commented 4 years ago

@chain-ed-reaction The demo site is depolyed on netlify. Github pages has a bug about {{ and }}. Maybe you can get reasons from above links.

bevsxyz commented 4 years ago

I added a .nojekyll file to the publishing directory and the example site works! The only page that was not rendered was posts. I don't know why that is the case.

bevsxyz commented 4 years ago

Ha that was an issue with my previous commit. I cleared all the files in publishing directory. And build the site again. It works like a charm!

bevsxyz commented 4 years ago

The issue is technically resolved. If you can include this piece of information in the readme regarding github pages it would be great.

the .nojekyll file simply says to github do not build the site with jekyll. We don't require that when we have already done the same with hugo.

bevsxyz commented 4 years ago

I just wasted my entire day, yesterday on this simple thing 🤣🤣🤣

bao-wei commented 4 years ago

@bao-wei 你试试把 {{< ... >}} 换成 {{% ... %}}, 或者在 strong{} 前后加空格。 总之是一个 Github pages 的 bug.

谢谢大神!但还是不行,感觉是不是在“{{ }}”不能再嵌套一个“{ }”?因为总是报错:没有正确使用“}}”结束语句。 小白瞎猜🤣,我不使用加粗字段就可以了。

还有一个问题请教一下:主题的仓库更新后,我该怎么更新我本地主题文件呢?我在themes/LoveIt路径下使用“git pull”,提示我配置文件有不一样的地方,需要确定修改后才能合并,报错是这样的: image

还请大神指教一下,感谢!!

bevsxyz commented 4 years ago

Did you try adding an empty file .nojekyll ? Here is my website. It is hosted and delivered through github pages

mxxws commented 4 years ago

@bao-wei 更新主题建议删除lovelt文件,然后使用github主题库中的release版本下载zip版本文件,解压缩后放到对应文件夹即可使用。

bao-wei commented 4 years ago

@bao-wei 更新主题建议删除lovelt文件,然后使用github主题库中的release版本下载zip版本文件,解压缩后放到对应文件夹即可使用。

感谢帮助,请问是把theme/路径下LoveIt文件夹的文件全部删除吗?我重新下载后之前的配置文件要重新配置吗?

mxxws commented 4 years ago

是的,已经在邮箱中回复了