Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

忽略 meta data #49

Closed
hyacinthus opened this issue Nov 18, 2018 · 4 comments
Closed

忽略 meta data #49

hyacinthus opened this issue Nov 18, 2018 · 4 comments

Comments

@hyacinthus
Copy link

hyacinthus commented Nov 18, 2018

希望能忽略 markdown 前边的 metadata
类似这种:

---
layout: post
title: Blogging Like a Hacker
---
@TooBug
Copy link
Owner

TooBug commented Nov 19, 2018

这个是不是业务中自己处理再丢给wemark就好?貌似它不属于markdown解析的工作。

@hyacinthus
Copy link
Author

好吧,这个确实不是基础的 markdown 标准,只是一些地方在用。

如果觉得不合适就算啦。

我想像 jekyll 或者 hugo 那样,通过元数据去渲染标题作者时间等信息。
然后正文用您这个插件渲染。

我也考虑了一下能不能改这个插件把这些全都支持了,貌似不容易。

@hyacinthus
Copy link
Author

这个英文里更普遍的叫法是 front matter

https://github.com/jxson/front-matter

因为这个库的使用场景应该是直接读取s3这样的对象存储中的md渲染,并不经过后端,
所以引用个库解析一下,或者加个配置开关也是不错的。

还可以考虑智能的用 title 字段当成文章标题,渲染常见的时间,来源,作者等字段。。。

当然选择不解析也没什么问题。关掉这个issue就好。

@imaiya
Copy link
Contributor

imaiya commented Dec 25, 2018

这个确实是有一部分需求的,我也遇到了,不过我自己在后台处理了一下

@TooBug TooBug closed this as completed Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants