fix(style): bind fontcdn helper to template locals

This commit is contained in:
ppoffice 2020-04-06 17:08:59 -04:00
parent 06a10cca3c
commit 9cd422842c
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
*/
module.exports = function(hexo) {
hexo.extend.filter.register('template_locals', locals => {
const fontcdn = hexo.extend.helper.get('fontcdn').bind(hexo);
const fontcdn = hexo.extend.helper.get('fontcdn').bind(locals);
hexo.theme.config['@fontface'] = {
default: fontcdn('Ubuntu:wght@400;600&family=Source+Code+Pro', 'css2'),
cyberpunk: fontcdn('Oxanium:wght@300;400;600&family=Roboto+Mono', 'css2')