Pelican static site generator change fontsize

余生长醉 提交于 2019-12-04 19:31:49

Check out the pelican-bootstrap-3 help page on github.

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

html {
   font-size:150%
}

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.

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

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'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!