相关知识:
- 析构函数(
destructor
)是成员函数的一种,它的名字与类名相同,但前面要加~
,没有参数和返回值。 - 析构函数有助于在跳出程序(比如关闭文件、释放内存等)前释放资源。
- 一个类有且仅有一个析构函数。如果定义类时没写析构函数,则编译器生成默认析构函数。如果定义了析构函数,则编译器不生成默认析构函数。
- 类的析构函数是类的一种特殊的成员函数,它会在每次删除所创建的对象时执行。
自信人生二百年,会当水击三千里!
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true