在有些常见需求中,如首页的banner,我们不能指定它的宽和高,单又需要和背景图片进行等比例地调整,且在页面窗口变化的时候仍然保持这个布局。所以我们需要以下两个方法。
参考:https://www.cnblogs.com/GinJiong/articles/5426334.html
难道到60岁再去寻找我想要的自由
缺失模块。
1、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
2、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: true
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true