Pelican 静态站点生成器更改字体大小
Pelican static site generator change fontsize
谁能给我一些关于如何使用 CSS 更改 Pelican 站点的字体大小的提示。我使用 pelican-bootstrap3 主题。
我不想分叉和修改主题。我想使用 custom.css 功能更改尺寸。
感谢您的帮助
马蒂亚斯
查看 github 上的 pelican-bootstrap-3 帮助页面。
您可以制作一个 custom.css 文件,如下所示:
html {
font-size:150%
}
诀窍是将您的 custom.css 文件放在您的内容文件夹中,并告诉 pelican 它在哪里,然后它应该放在您的输出中的什么位置。您还必须告诉 pelican-bootstrap-3 主题这个文件在哪里,它会将它添加到渲染输出中的 headers。
首先,通常您会在您的内容文件夹中创建一个名为 extras 的文件夹,并将您的 custom.css 文件放在那里。这是 github 页面上的路径符号的来源:
extras/custom.css
您现在必须编辑您的 pelicanconf.py
文件以告诉 pelican 该文件所在的位置,并将此信息提供给 pelican-bootstrap-3。将此添加到您的:
# 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'
谁能给我一些关于如何使用 CSS 更改 Pelican 站点的字体大小的提示。我使用 pelican-bootstrap3 主题。
我不想分叉和修改主题。我想使用 custom.css 功能更改尺寸。
感谢您的帮助 马蒂亚斯
查看 github 上的 pelican-bootstrap-3 帮助页面。
您可以制作一个 custom.css 文件,如下所示:
html {
font-size:150%
}
诀窍是将您的 custom.css 文件放在您的内容文件夹中,并告诉 pelican 它在哪里,然后它应该放在您的输出中的什么位置。您还必须告诉 pelican-bootstrap-3 主题这个文件在哪里,它会将它添加到渲染输出中的 headers。
首先,通常您会在您的内容文件夹中创建一个名为 extras 的文件夹,并将您的 custom.css 文件放在那里。这是 github 页面上的路径符号的来源:
extras/custom.css
您现在必须编辑您的 pelicanconf.py
文件以告诉 pelican 该文件所在的位置,并将此信息提供给 pelican-bootstrap-3。将此添加到您的:
# 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'