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

Issue with gray-matter #1

Closed
drbazpython opened this issue Jun 29, 2021 · 1 comment
Closed

Issue with gray-matter #1

drbazpython opened this issue Jun 29, 2021 · 1 comment

Comments

@drbazpython
Copy link

within my index.js "getStaticProps" function, the const {data:frontmatter}=matter(markdownWIthMeta)
is returning
{
slug: 'test',
frontmatter: "title:Test Post date:'June 28 2021' excerpt:'This is the excerpt' cover_image:'images/posts/img1.jpg'"
}
and I cannot seem to get access to the title, date etc. as frontmatter is a string.

@drbazpython
Copy link
Author

resolved the problem:
my test.md frontmatter was of the form title:'xxxx' etc ..... should have added a space after the semicolon
doh!

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

1 participant