鹈鹕静态站点生成器更改字体大小 [英] Pelican static site generator change fontsize

查看:80
本文介绍了鹈鹕静态站点生成器更改字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以给我一个提示,说明如何使用Pelican网站的CSS更改字体大小.我使用pelican-bootstrap3主题.

Dose anyone can give me a hint on how to change the fontsize with CSS for a Pelican Site. I use the pelican-bootstrap3 theme.

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

I do not want to fork and modify the Theme. I would like to change the size with the custom.css feature.

感谢您的帮助 Mathias

thanks for the help mathias

推荐答案

查看您可以做的是创建一个如下所示的custom.css文件:

What you can do is make a custom.css file that looks like this:

html {
   font-size:150%
}

诀窍是将custom.css文件放在内容文件夹中,并告诉pelican它在哪里,然后将其放在输出中.您还必须告诉pelican-bootstrap-3主题,该文件在哪里,它将把它添加到渲染输出的标题中.

The trick is putting your custom.css file in your content folder and telling pelican where it is and then where it should be put in your output. You must also tell the pelican-bootstrap-3 theme where this file is and it will add it to the headers in your rendered output.

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

First, generally you would make a folder called extras in your content folder and put your custom.css file in there. This is where the path notation on the github page comes in:

extras/custom.css

您现在必须编辑您的pelicanconf.py文件,以告知pelican该文件位于何处,并将此信息提供给pelican-bootstrap-3.将此添加到您的:

You must now edit your pelicanconf.py file to tell pelican where this file is located, and also to give this information to pelican-bootstrap-3. Add this to yours:

# 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'

这篇关于鹈鹕静态站点生成器更改字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆