Hugo loveit 主题中的样式自定义

Style Customization in a Hugo loveit theme

我是 Hugo 的新手,我想编辑由降价内容生成的一些元素的样式( table , text , Bash window )。 loveit 文档提供了这个指令:

LoveIt theme has been built to be as configurable as possible by defining custom .scss style files. The directory including the custom .scss style files is assets/css relative to your project root directory.

In assets/css/_override.scss, you can override the variables in themes/LoveIt/assets/css/_variables.scss to customize the style.

我试图覆盖 _override.scss 文件中的一些变量,但没有成功。

这后面好像是dillonzq/LoveIt issue 398

After checking again, I came to the conclusion that it works.

When I copied variables form _variables.scss, I copied them with the !default keyword and it didn't worked.
But if for $global-background-color-dark: #292a2d !default; I paste $global-background-color-dark: #ff0000; it works fine.

另请注意,在 issue 210 and 109 中,您会在 config/css/ 中看到相同的 _override.scss,因此这将是另一个测试路径(在项目的根文件夹中) .

在这两种情况下(assets/css/_override.scssconfig/css/_override.scss),我们谈论的是您自己项目的根文件夹,而不是 themes/LoveIt/...)