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

Using YML files as Markdown #3195

Closed
exrishu opened this issue Dec 13, 2017 · 11 comments
Closed

Using YML files as Markdown #3195

exrishu opened this issue Dec 13, 2017 · 11 comments

Comments

@exrishu
Copy link

exrishu commented Dec 13, 2017

Hi , I am new to Gatsby trying to port my website from hugo to gatsby, But am stuck in , that how to change the YML files into markdown, In hugo there is an awesome property

|markdownify

which easily convert yml into markdown and we can also use some HTML tags inside it.
Is there is any way I can convert ?

@calcsam
Copy link
Contributor

calcsam commented Dec 13, 2017 via email

@KyleAMathews
Copy link
Contributor

For converting markdown fields in frontmatter, this would be a useful pattern to support. We'd be open to a PR adding this to gatsby-transformer-remark.

@exrishu
Copy link
Author

exrishu commented Dec 14, 2017

@calcsam Thanks for your help, but I think think is not the answer of my question, I am able to pull data from YML files successfully, I want data to be in YML file and convert it to markdown

@exrishu
Copy link
Author

exrishu commented Dec 14, 2017

@KyleAMathews I guess gatsby-transformer-remark will not recognize the file having YML extension.

@KyleAMathews
Copy link
Contributor

Oh sorry, you want gatsby-transformer-yaml.

If you haven't yet, try going through the official tutorial.

@exrishu
Copy link
Author

exrishu commented Dec 14, 2017

@KyleAMathews CheckOut this link issue-2817 . I am also facing exactly the same problem. Is there is any another way to solve this issue?

@KyleAMathews
Copy link
Contributor

This isn't supported right now — so either you can write custom code as described in that issue for handling the markdown or you can put together a PR to add support.

@exrishu
Copy link
Author

exrishu commented Dec 14, 2017

Thanks, Gonna try the custom code ...I

@calcsam
Copy link
Contributor

calcsam commented Dec 30, 2017

Closing this issue as it's contained in the linked issue.

@calcsam calcsam closed this as completed Dec 30, 2017
@avinashs735
Copy link

I am getting the same kind of problem, I am able to pull the contents of yaml using gatsby-transformer-yaml but all pulled data is rendered as plain text ,If i enter any html tag or any url it is rendered as plain text only.Is there any way that I can markdownify this yaml while using it in gatsby so that I dont get all as plain text only?

@jlengstorf
Copy link
Contributor

@avinashs735 in that case you may want to use a third-party component like https://github.com/rexxars/react-markdown

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

5 participants