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

markdown 头部格式的问题 #14

Closed
HenryQW opened this issue May 3, 2020 · 2 comments
Closed

markdown 头部格式的问题 #14

HenryQW opened this issue May 3, 2020 · 2 comments

Comments

@HenryQW
Copy link

HenryQW commented May 3, 2020

        remark()
            .use(pangu)
            .process(newContent, (err, result) => {
                if (err) {
                    return Promise.reject(err);
                }
                newContent = String(result);
            });

会把头部的 (frontmatter?)

---
pageClass: routes
---

弄得很奇怪

image

image

请问有没有解决办法?

DIYgod/RSSHub#4654 (comment)

@vincentbel
Copy link
Owner

@HenryQW

---
pageClass: routes
---

这个是 frontmatter,你需要添加 frontmatter plugin 才能处理:https://github.com/remarkjs/remark-frontmatter

@HenryQW
Copy link
Author

HenryQW commented May 3, 2020

十分感谢!

@HenryQW HenryQW closed this as completed May 3, 2020
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

2 participants