Pelican静态站点生成器更改fontsize

时间:2015-05-01 12:17:50

标签: twitter-bootstrap pelican bootswatch

任何人都可以给我一个关于如何使用CSS为Pelican网站更改字体大小的提示。我使用pelican-bootstrap3主题。

我不想分叉和修改主题。我想使用custom.css功能更改大小。

感谢您的帮助 的Mathias

1 个答案:

答案 0 :(得分:2)

查看github上的pelican-bootstrap-3帮助页面。

你可以做的是制作一个如下所示的custom.css文件:

extras/custom.css

诀窍是将custom.css文件放在内容文件夹中,然后告诉pelican它在哪里,然后将它放在输出中。你还必须告诉pelican-bootstrap-3主题这个文件是什么,它会将它添加到渲染输出的标题中。

首先,通常你会在你的内容文件夹中创建一个名为extras的文件夹,并将custom.css文件放在那里。这是github页面上的路径符号出现的地方:

pelicanconf.py

您现在必须编辑# tell pelican where your custom.css file is in your content folder STATIC_PATHS = ['extras/custom.css'] # tell pelican where it should copy that file to in your output folder EXTRA_PATH_METADATA = { 'extras/custom.css': {'path': 'static/custom.css'} } # tell the pelican-bootstrap-3 theme where to find the custom.css file in your output folder CUSTOM_CSS = 'static/custom.css' 文件以告知鹈鹕此文件所在的位置,并将此信息提供给pelican-bootstrap-3。将此添加到您的:

{{1}}