fix(style): bind fontcdn helper to template locals
This commit is contained in:
parent
06a10cca3c
commit
9cd422842c
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
module.exports = function(hexo) {
|
module.exports = function(hexo) {
|
||||||
hexo.extend.filter.register('template_locals', locals => {
|
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'] = {
|
hexo.theme.config['@fontface'] = {
|
||||||
default: fontcdn('Ubuntu:wght@400;600&family=Source+Code+Pro', 'css2'),
|
default: fontcdn('Ubuntu:wght@400;600&family=Source+Code+Pro', 'css2'),
|
||||||
cyberpunk: fontcdn('Oxanium:wght@300;400;600&family=Roboto+Mono', 'css2')
|
cyberpunk: fontcdn('Oxanium:wght@300;400;600&family=Roboto+Mono', 'css2')
|
||||||
|
|
Loading…
Reference in New Issue