Gatsby JS Crash Course

Поділитися
Вставка
  • Опубліковано 9 лют 2025

КОМЕНТАРІ • 251

  • @7XStriderX7
    @7XStriderX7 5 років тому +222

    I know it's not a new video, but here are my notes on it:
    10:00 - Helmet Plugin in gatsby-config.js for changing the title and metadata, in the .
    12:33 - Create new pages simply by generating new files in the \pages folder.
    15:03 - Create a new component.
    22:59 - VSC extension for seing a preview of any markdown file that is open.
    23:80 - Frontmatter
    26:13 - gatsby-source-filesystem (npm): File System Plugin, for accessing files in the computer, with Gatsby
    27:13 - gatsby-transformer-remark (npm): transform .md files into HTML.
    27:42 - gatsby-plugin-catch-links (npm): intercept local links from markdown files and pushes state to them.
    28:32 - After installing these plugins, we got to config them in the gatsby-config.js file.
    31:29 - Check GraphQL queries on localhost: localhost:PORT/___graphql
    35:00 - Query markdown files, to get data on GraphQL.
    42:38 - Create a template for individual posts.
    49:07 - Create pages programmatically, with the createPages API. www.gatsbyjs.org/docs/node-apis/#createPages) API. Follow this [tutorial](www.gatsbyjs.org/tutorial/part-seven
    58:22 - Deploy with Netlify.

    • @lamaruga4577
      @lamaruga4577 5 років тому +3

      I wish I saw your message before the end of the video

    • @ryanespin4071
      @ryanespin4071 4 роки тому +5

      23:08 - Frontmatter
      32:12 - To return what he has, use absolutePath instead of id

    • @ronishgaming8015
      @ronishgaming8015 4 роки тому

      18

    • @jaayaustin336
      @jaayaustin336 4 роки тому

      @@ryanespin4071 You a life saver!

  • @rodrigohernando2210
    @rodrigohernando2210 5 років тому +12

    At the time of this comment (October 2019) and for the latest versions of Gatsby CLI ( 2.8.3) and Gatsby (2.16.5), at 50:31 using boundActionsCreators will result in an error. The object should be { actions, graphql } in order for createPages to work.
    Great video Brad!!!! Is the first time I'm using Gatsby and I really enjoyed, thanks!!!

    • @armandobrito3934
      @armandobrito3934 5 років тому +1

      Also, at the time of this comment (February 2020), a few differences with the current gatsby are: Menu should go into Layout, the Layout component should be in every page (contains header and footer), in order to change bottom margin of header look into layout.css, gatsby-config.js is more populated by default, sometimes an error appears after adding plugins (the solution for this issue: github.com/gatsbyjs/gatsby/issues/18048)

  • @gauravnagar3712
    @gauravnagar3712 6 років тому +20

    Love you brad. You are such a amazing inspirational man . I watch your video in about your struggles . one thing come in my mind at that point you changed your life by your hard work and made it better

  • @heycezer
    @heycezer 6 років тому +8

    Your "crash courses" on here are simply unrivaled .. you're doing amazing!

  • @GilAguilar
    @GilAguilar 3 роки тому

    Thanks again Brad I have an upcoming talk about web accessibility. I was trying to tie documentation and engineering into my talk. Which reminded me of this crash course. I am using the same layout to help me tie the concepts together but will definitely customize it over time. Thanks for being a great inspiration to so many.
    Just like yourself I also have two boys who are on the spectrum and they show me daily so much strength, determination, and other great examples that hold me accountable. It is also why I was formally diagnosed with autism and have just kept pushing through to learn more and do more. Saw your post on Twitter and it was great to see your boy doing great things.
    Finally taking that leap of faith to put myself out there to help other developers and engineers who are also neurodivergent. Cheers and have a happy holiday :-)

  • @tom_sd3466
    @tom_sd3466 6 років тому +3

    Somethings have changed in Gatsby 2.0. So anyone following this and wondering why their header isn't showing up on about, services pages you just need to
    import Layout from '../components/Layout'; and wrap your page in a tag.
    Also this will help you out at the end if your Read More isn't linking to the post. www.gatsbyjs.org/docs/migrating-from-v1-to-v2/#rename-boundactioncreators-to-actions basically you just need to change boundActionCreators to actions and it will work.
    Thank you Brad, this tutorial was awesome!

    • @Artem-kv4er
      @Artem-kv4er 5 років тому

      thanks very much for posting this!

    • @Artem-kv4er
      @Artem-kv4er 5 років тому

      @@ShelterDogs i think his main point is that it's really lacking in documentation and is still pretty new. the question of if it is going to last or not, I think comes down to if they keep updating it. CodingPhase, obvi. an experienced developer's video seemed mostly about personal preference. I think the main takeaway is that it's silly to go down a rabbit hole and learn whatever new framework suddenly pops up for whatever reason. Gatsby has two advantages: speed and security.

  • @petecapecod
    @petecapecod 6 років тому +11

    Thank you so much 😎🙌 Can't wait for more React JS based videos. Another great crash course by Brad 🎉🐱‍👓

  • @naveencooray2733
    @naveencooray2733 5 років тому +1

    This video itself helped me build my blog entirely with gatsby. Brilliant content and explanation Brad! Keep up the good work.

  • @marktwain3083
    @marktwain3083 6 років тому +1

    I watched that other guys tutorials (LevelUpTuts) and didn't understand shit.
    I watched yours and it's all clear to me. Thanks Brad!

  • @pepeback
    @pepeback 6 років тому

    Thanks Brad for keeping us up to date on the latest technologies and trends

  • @TutorialsHub3
    @TutorialsHub3 2 роки тому

    2022 and this video still helping peoples. One of the best video to start your gatsby journey.

  • @AlanJones83
    @AlanJones83 2 роки тому

    Awesome course as usual, Thank you Brad Traversy. Always top quality learning with you.

  • @andreivandrummer
    @andreivandrummer 6 років тому +11

    FINALLY!!! I was waiting this course from you from along time!!! YEEEEEEEEEEEEEEEEEEEEY!

  • @gerryedroso1414
    @gerryedroso1414 6 років тому

    Thanks brad... Your channel has become my bible and a learning tool for a career shift. Thank you so much for bringing those awesome contents..

  • @ryanharris5968
    @ryanharris5968 4 роки тому

    Thanks so much Brad. This video is a very good introduction to Gatsby.js. What an awesome tech to whip up something quickly!

  • @misterjaypeasmith
    @misterjaypeasmith 5 років тому

    Stayed up late to watch this. Totally worth it!

    • @naynyamish270
      @naynyamish270 5 років тому

      is this tutorial had any issues with the current gatsby version today? will i be running into issues if i follow it verbatim?

  • @__greg__
    @__greg__ 6 років тому

    I'm just getting started with Gatsby and this was a very well-done crash course. Thanks!

  • @ThePaternostertje
    @ThePaternostertje 5 років тому +49

    57:30 "If you haven't used graphql before that probably confused the shit out of you", no better way to say it lmao

    • @ridl27
      @ridl27 5 років тому +1

      yea :D

  • @vicalbincooper
    @vicalbincooper 6 років тому

    Thanks Brad! Just an FYI that AWS just announced a new service similar to Netlify called Amplify Console aws.amazon.com/amplify/console/. I was reading about it and they mentioned Gatsby. It looked interesting and I wanted to learn more so I searched for it on UA-cam and, no surprise, found your video. Thanks for being one step ahead and for cranking out so much content. Would love to see a follow up where you show how to use WordPress with Gatsby

  • @MrJ-and-friends
    @MrJ-and-friends 6 років тому

    This is super handy. Appreciate the quick run through. Thinking about making a site for student projects and then enhancing to allow voting etc.

  • @KrzysiekKaminskis
    @KrzysiekKaminskis 6 років тому

    Didn't watch yet but it's just on time. Unbelievable. I've just played with gatsby and it is awesome. Gatsby Casper starter and personal blog by Greg globinski are my favorites

  • @guillermovillalta6322
    @guillermovillalta6322 5 років тому +1

    Awesome video. I was excited throughout the whole thing as I was able to follow this great example! Some syntax is deprecated but it still works like a charm. Brad, you f**king rock man!! Keep up the good work. Def new subscriber🙌

  • @CarlosMafla
    @CarlosMafla 6 років тому +1

    Thanks! you inspired me to start my channel with web development tutorials. I also love Prettier and I use it daily with VIM so I have some videos about it.

  • @alwayssomewhere716
    @alwayssomewhere716 4 роки тому

    great tutorial, I have forked the repository and using it as a boilerplate for my projects

  • @Coachhere
    @Coachhere 6 років тому

    Thank you very much Brad. The amount of work and dedication you put in these videos is incredible.

  • @ashutoshnayak609
    @ashutoshnayak609 6 років тому

    Welcome back brad , a great piece of content once again , I hope you are done with your shifting and moving up

  • @osmeig6025
    @osmeig6025 6 років тому

    Si asi enseñas en videos gratuitos, no me quiero imaginar en cursos de pago! Gracias por todos tus videos, me he vuelto un fanático de tu canal, eternas gracias, de corazón!

  • @javadoctor101
    @javadoctor101 6 років тому +37

    Just in case anyone is wondering how does graphql data gets inserted into data variable...The result of the query is automatically inserted into your React component on the data prop when you declare the query variable below the component declaration as he does in the video.

    • @otheraw5659
      @otheraw5659 6 років тому +1

      Thanks, that's the thing I am wondering while watching the video. Too many magic there

    • @svenskdod
      @svenskdod 6 років тому +1

      @@otheraw5659 If you remove the `export` from the query, you will notice that the query data is no longer on the data prop. Cool way to check if the query is working for your given page, and check for a potential false positive. Also, gives you a simple way to break it easily to understand the structure a bit.

    • @liamdavis492
      @liamdavis492 4 роки тому

      this happens @ 36:25

    • @liamdavis492
      @liamdavis492 4 роки тому

      also @ 46:37

  • @circulardep
    @circulardep 4 роки тому +45

    I think Gatsby has made an upgrade since the tutorial was made. I tried to create a page but the layout didn't apply. Then I read this from the Gatsby docs: "Gatsby does not, by default, automatically apply layouts to pages".
    So, when you create a page, the layout is not automatically applied to it by default. You have to wrap the entire JSX into a component for the layout to be applied. There are ways to automate it, but it doesn't come out-of-the-box anymore (like it did when Brad coded it).

    • @carolineold5386
      @carolineold5386 4 роки тому +1

      thank you!!

    • @Jason-bg7jc
      @Jason-bg7jc 4 роки тому +1

      Noticed this. Thanks

    • @btandayamo
      @btandayamo 4 роки тому +1

      I was going crazy looking for Layout import but I couldn't see it on the repo. Your comment save me

    • @exz1199
      @exz1199 3 роки тому

      My King

  • @kevinzhang8974
    @kevinzhang8974 6 років тому

    Thanks for this. This video seems the hardest one I had tried recently for myself ... I think part of reason I didn't learn anything about React framework yet .. and I didn't spend any time to read Gatsby.js myself ... though, I have successfully duplicated the result, I think I need go back to watch it several times to really learn Gatsby.js.

  • @Envek1
    @Envek1 6 років тому

    Thanks for the vid Brad! I keep learning react indirectly which is awesome.

  • @thefantasynuttwork
    @thefantasynuttwork 6 років тому +1

    Would definitely love a Udemy course on Gatsby!

  • @robotglock6909
    @robotglock6909 6 років тому +5

    "rfce" TAB to get a react functional component with const [file name base] = and export default [file name base]

  • @ProgramWithErik
    @ProgramWithErik 6 років тому +1

    Gatsby really is blowing up, heard it on syntax the other day. I'm guessing your a fan of the podcast too?

  • @jaychang5631
    @jaychang5631 5 років тому +28

    `rafc` for react arrow function component snippet

  • @TopicalAuthority
    @TopicalAuthority 4 роки тому

    Guys, at 27:51, after I have downloaded the "gatsby-source-filesystem", "gatsby-transformer-remark", "gatsby-plugin-catch-links" plugins, I can't start my gatsby project again. Do you know why? It says the thing below:
    The above error occurred in the component:
    in StoreStateProvider
    in App
    React will try to recreate this component tree from scratch using the error boundary you provided, App.
    ERROR
    Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.
    ERROR
    UNHANDLED REJECTION Invalid hook call. Hooks can only be called inside of the
    body of a function component. This could happen for one of the following reasons:
    1. You might have mismatching versions of React and the renderer (such as React DOM)
    2. You might be breaking the Rules of Hooks
    3. You might have more than one copy of React in the same app
    See fb.me/react-invalid-hook-call for tips about how to debug and fix
    this problem.

  • @golakjena
    @golakjena 4 роки тому +2

    You can type rafce and press tab for functional component :)

  • @foupax
    @foupax 6 років тому

    As usual, very nice course. Thanks, Brad

  • @Samuelisme
    @Samuelisme 6 років тому

    Love to see a follow up on this project with more features (creating tags page, social media support, dynamic menu etc.)

  • @johngrattan2179
    @johngrattan2179 5 років тому

    Thanks for the tutorial! Finally got my blog up and running

  • @Protoscribe
    @Protoscribe 6 років тому

    This is so something I was waiting for you to do!

  • @chrisr2442
    @chrisr2442 6 років тому

    Excellent. I'm a big fan of SSGs in general and, now, GatsbyJS after having played around with Hugo (great build speed), Jekyll, Hexo and other variants.
    It would be great to see this series continue. Perhaps a followup on typical use cases for fledgling developers? Maybe along the lines of CMS integration--headless Drupal, Wordpress, etc--for non-technical clients who require traditional editing tools.
    And Hey! Just noticed we're both in Boston. Go Sox!

  • @utube3805
    @utube3805 3 роки тому

    Brad thanks one of the better videos !

  • @אדםלוביץ
    @אדםלוביץ 4 роки тому

    I don't know what to do man, i think i'm in love with you, and i'm totally straight. Thanks you for all the things u post.

  • @ChessFlix
    @ChessFlix 4 роки тому

    Great video per usual. Thanks so much for making these amazing tutorials!

  • @divyumbhumra9750
    @divyumbhumra9750 4 роки тому

    Watching this in 2020, and it is still relevant :)

  • @cadetspiff
    @cadetspiff 6 років тому

    Awesome Brad. This is exactly the video I needed. Thanks man!

  • @FordExplorer-rm6ew
    @FordExplorer-rm6ew 5 років тому

    Gatsby is a little different on Windows but I'm sure I'll figure it out.
    Been working hard and getting good :)
    Thanks for everything brad :)

  • @jaykef
    @jaykef 4 роки тому

    You’re indeed a pro! This is just very much resourceful as all of your other tutorials I’ve watched. You’re one of my icons in this field, thanks a lot🙏

  • @Chempo
    @Chempo 6 років тому +9

    Perfect timing

  • @mattgilstrap7295
    @mattgilstrap7295 5 років тому

    Great video as always Brad.

  • @evankapantais5300
    @evankapantais5300 5 років тому +1

    me: Does entire official Gatsby walkthrough
    me: Understands jack shit
    me: Watches Brad's Gatsby crash course
    me: "Well it's all clear now"

  • @andriypolukhin
    @andriypolukhin 5 років тому

    Thank you Brad, this is a good intro to Gatsby!

  • @rubenverster250
    @rubenverster250 5 років тому

    After this course, I highly recommend The Great Gatsby Bootcamp from Andrew Mead. It uses more advanced features as well as CMS integration from Contentful for dynamic pages

  • @nicot2895
    @nicot2895 6 років тому

    Thank you, Brad. Awesome! I think an in-depth Gatsby course would be a logical and perfect next step to the MERN one? Would seriously like to see that, and would probably be on the cue to buy it :)

  • @Alessandro-nq3tm
    @Alessandro-nq3tm 6 років тому +5

    Amazing , as always!! :)

    • @TraversyMedia
      @TraversyMedia  6 років тому

      Thanks :)

    • @Alessandro-nq3tm
      @Alessandro-nq3tm 6 років тому

      I don't understand the 53:17 part: why check if there are errors? The promise will go to the .catch() if there are any. Right?

  • @kevinduck3714
    @kevinduck3714 6 років тому

    Yessssss this is awesome you are always on the new tech

  • @coreygriffin
    @coreygriffin 6 років тому

    Nice tutorial! I just used Gatsby to make my portfolio.

  • @adamgm84
    @adamgm84 6 років тому

    Beauty/10 Keep up the good work, driving mad value into the world.

  • @randith87
    @randith87 5 років тому

    I love your channel dude!

  • @khanghoangtrieu6174
    @khanghoangtrieu6174 6 років тому

    Thank you for this amazing tutorial, keep up the good work, mate.

  • @ragekagewashere
    @ragekagewashere 5 років тому +1

    Loved this. Thanks for building it.
    So many of the errors that happened here would have been solved by using TypeScript. You should consider it. Would make things a lot easier.

  • @phemartin
    @phemartin 6 років тому

    Awesome course. Thanks brad

  • @amirnoorani5017
    @amirnoorani5017 6 років тому

    Thank you Brad! I'm learning a lot from you

  • @LynxBaretta
    @LynxBaretta 5 років тому

    Great course!!!... and very well explained

  • @akhwanstudio
    @akhwanstudio 5 років тому

    what a cool frameworks, thanks man

  • @paullefebvre6667
    @paullefebvre6667 6 років тому +3

    This is f* amazing ! THANKS MY LORD !

  • @tarihart8385
    @tarihart8385 6 років тому

    Thanks for the tutorial. Keep up the good work.Waiting for your next udemy course. Also would like to see a tutorial on authentication with sailsjs

  • @onecarwood
    @onecarwood 6 років тому

    I wish I could give this ten stars!

  • @skverskk
    @skverskk 6 років тому

    Great tutorial. Luv anything with React

  • @Prince_of_all_Saiyans
    @Prince_of_all_Saiyans 6 років тому +9

    can you do a small video comparing next.js and Gatsby js ?

  • @alok2573407
    @alok2573407 6 років тому +1

    wait ended... thank you !

  • @youknowhu
    @youknowhu 4 роки тому

    1:00:14 What happened was you need to add the remote as an SSH url instead of HTTPS url for ssh keys to be used.

  • @flo_dev
    @flo_dev 5 років тому

    Thank you again for this great tutorial

  • @surajkawale2763
    @surajkawale2763 5 років тому

    No, if you change anything in the config file you don't have restart the react server. Thanks for the crash course

  • @joeyabanks
    @joeyabanks 5 років тому

    This is so helpful. Thank you!

  • @boryskuczkowski
    @boryskuczkowski 6 років тому +1

    Brad, I'm trying to add pictures to each blogpost, I was thinking about using graphql to fetch pictures from each blog post folder the same way as index.md files however I'm utterly confused with using image-sharp (as far as I am concerned markdown isn't really for images). Can't seem to grasp it, maybe you could hint at how to incorporate images.

    • @viperchaos8888
      @viperchaos8888 6 років тому

      Did you ever figure out this issue with images?

  • @viktordemydov1886
    @viktordemydov1886 6 років тому

    Thanks Brad!

  • @stavvers
    @stavvers 4 роки тому

    really great tutorial! Thank you!

  • @CarloL525
    @CarloL525 4 роки тому

    Excellent!

  • @MrMiguelapb35
    @MrMiguelapb35 4 роки тому

    Good job man, thanks a lot

  • @catalinim4227
    @catalinim4227 4 роки тому

    Thank you, this is much appreciated!

  • @Prince_of_all_Saiyans
    @Prince_of_all_Saiyans 6 років тому

    a couple of videos explanation on how to integrate this simple static "gatsby website with a wordpress backend" would be more help full, as most of them are using wordPress blogs and websites including myself and very less number of beginner-friendly tutorials exist on how to link this static website to a wordPress backend blog website

  • @mikhailbaev2707
    @mikhailbaev2707 6 років тому

    Finally! Thank you :)

  • @boscocorrea1895
    @boscocorrea1895 6 років тому

    Thank you so much Brad

  • @masrooralykhan
    @masrooralykhan 6 років тому

    Interesting brad ...keep it up

  • @shemeermali1
    @shemeermali1 6 років тому +1

    Very useful. Thank you :)

  • @enricoalbertocerri8093
    @enricoalbertocerri8093 6 років тому

    Thanks a lot! awesome as usual! Just one thing: where can I get the list of the colors with weird names "coral, tomato etc." used to style?

  • @jjjazz90
    @jjjazz90 6 років тому

    This is awesome, looking more and more into gatsbyjs and Netlify because of Brad.
    Hey brad, any more tutorials about gatsby web apps in the pipeline? maybe something on Udemy?

  • @CorporalPoon
    @CorporalPoon 6 років тому +8

    Are you making a full react + redux + backend course on udemy?

    • @TaelurAlexis
      @TaelurAlexis 6 років тому

      He just released a MERN stack course on udemy...

  • @neerajsinghtangariya2587
    @neerajsinghtangariya2587 4 роки тому

    If I want to access read more option with title then how can i do this..? where should I have to make chnages?

  • @frompina
    @frompina 5 років тому

    This was very helpful thank you!

  • @narcos1024
    @narcos1024 4 роки тому

    Thank you for this video. Really appreciate it. :)

  • @henrymunoz2035
    @henrymunoz2035 5 років тому

    Great video

  • @chawkichalladia1812
    @chawkichalladia1812 6 років тому

    nice video man keep up the good work

    • @TraversyMedia
      @TraversyMedia  6 років тому

      Thank you :)

    • @chawkichalladia1812
      @chawkichalladia1812 6 років тому

      i have a video request if it's possible. if you could do a websocket crash course with php. hope it's not too much to ask. and thank you for all the great i'm a big fan of yours and you are by far my inspiration. so thank you for everything 😄

  • @miguelalvarez4591
    @miguelalvarez4591 4 роки тому

    Thank you for this video!!

  • @PuerinTheHunter
    @PuerinTheHunter 4 роки тому

    Does each blog post need to be in a separate folder or can I place all posts in a single folder?

  • @andrewmukare3433
    @andrewmukare3433 5 років тому

    at 46:01, would this work??
    const post = data.markdownRemark.frontmatter
    then later
    {post.title}

  • @asi4ngirl
    @asi4ngirl 5 років тому

    Thanks for your course

  • @AlanSmithofficial
    @AlanSmithofficial 6 років тому

    Two questions:
    Firstly, why do you not need to query the excerpt (blog text) in the GraphQL query? Does the HTML query pull in the post text?
    Secondly, if you build a site like this for a client do you need to redeploy the website everytime a blog post is created or will the website automatically update when you push the new blog post to GitHub?
    Thanks for the great tutorial.