在 Hexo 中,发布草稿会丢弃 `category` 和 `tags` 信息
In Hexo, publishing draft discards the `category` and `tags` info
我正在使用草稿功能。觉得草稿写得够好后,就试着转成post,作者hexo publish
。
但是,此命令似乎丢弃了 tags
和 category
信息并使用了脚手架的信息。
例子
我创建的草稿如下:
---
title: My awesome post on hexo
category:
- hexo
tags:
- hexo
---
The content of this post
我的 scaffolds/post.md
看起来像:
---
title: {{ title }}
date: {{ date }}
category:
- misc
tags:
- untagged
---
在 hexo publish
之后,创建的 post 将是:
---
title: My awesome post on hexo
category:
- misc
tags:
- untagged
---
The content of this post
问题
- 是否可以使用脚手架的
tags
和category
停止hexo并在hexo publish
ing时使用草图?
原来如果不指定属性会继承草稿
因此,解决方案是从 scaffold/post.md
中删除 tags
和 category
属性
---
title: {{ title }}
date: {{ date }}
---
我正在使用草稿功能。觉得草稿写得够好后,就试着转成post,作者hexo publish
。
但是,此命令似乎丢弃了 tags
和 category
信息并使用了脚手架的信息。
例子
我创建的草稿如下:
---
title: My awesome post on hexo
category:
- hexo
tags:
- hexo
---
The content of this post
我的 scaffolds/post.md
看起来像:
---
title: {{ title }}
date: {{ date }}
category:
- misc
tags:
- untagged
---
在 hexo publish
之后,创建的 post 将是:
---
title: My awesome post on hexo
category:
- misc
tags:
- untagged
---
The content of this post
问题
- 是否可以使用脚手架的
tags
和category
停止hexo并在hexo publish
ing时使用草图?
原来如果不指定属性会继承草稿
因此,解决方案是从 scaffold/post.md
tags
和 category
属性
---
title: {{ title }}
date: {{ date }}
---