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

Creating Blog Site with Gatsby (USING HTML) #13151

Closed
zsubzwary opened this issue Apr 5, 2019 · 5 comments
Closed

Creating Blog Site with Gatsby (USING HTML) #13151

zsubzwary opened this issue Apr 5, 2019 · 5 comments
Labels
type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@zsubzwary
Copy link

Summary

I just recently discovered this project and quite liked it!! 😇

Now my question is that I am going to be building a static blog site, How should I do it ???
I followed the Starter Blog but I didn’t liked the idea of writing my blog content in markdown file, I want a full control over my content with HTML tags !!

How can I go about that ?

I thought of creating a simple HELLO WORLD project and then creating .js file for every new post that I make, how about that? (but how am I going to handle the pagination in that case ?)

@imrankhokhar
Copy link

I was going to ask same question but you got it first, Now lets wait for someone to respond.

@LekoArts LekoArts added the type: question or discussion Issue discussing or asking a question about Gatsby label Apr 5, 2019
@LekoArts
Copy link
Contributor

LekoArts commented Apr 5, 2019

I just recently discovered this project and quite liked it!!

Cool, glad to hear that!

I didn’t liked the idea of writing my blog content in markdown file, I want a full control over my content with HTML tags !!

What do you mean with full control? The markdown syntax is pretty straight forward and corresponds to certain HTML tags in the end, so e.g. # will always be a <h1> tag. You can also write HTML in markdown if you want.

With MDX you can also modify the native HTML tags with your React components/customizations: https://www.gatsbyjs.org/docs/mdx/customizing-components/

IMO there really shouldn't be a need to write your blogposts in plain JS but I'm happy to hear your concerns :) MD/MDX will give you a much better authoring experience

@zsubzwary
Copy link
Author

zsubzwary commented Apr 5, 2019

there really shouldn't be a need to write your blogposts in plain JS

What if I want to inject some JS in only one blog post?? (how is that possible with markdown?)

@janosh
Copy link
Contributor

janosh commented Apr 5, 2019

@zsubzwary That's exactly what mdx is for. Take a look:

@zsubzwary
Copy link
Author

@janosh Thank you very much this MDX looks promising !!
I will look into it soon !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
Development

No branches or pull requests

4 participants