Eleventy Crash Course #4 - The 11ty Data Cascade & Fetching Data From An API

Поделиться
HTML-код
  • Опубликовано: 22 ноя 2024

Комментарии • 23

  • @brandongrainger
    @brandongrainger 2 года назад +7

    I've been loving this 11ty series. I've checked out a lot of others and this series has been by far the easiest to follow along, understand, and the most applicable. Congratulations to you and your wife!

    • @jaydanurwin
      @jaydanurwin  2 года назад +1

      Thanks Brandon! I'm just hoping to share some of what I've learned about these new-ish frameworks in an approachable way so it's great to hear it's helping you out!

  • @wesonweb
    @wesonweb Год назад

    I’m just starting to use 11ty and this is a great series you’ve done . Very clear and informative!

  • @lacikawiz8369
    @lacikawiz8369 2 года назад +5

    @19:00 The reason you were getting an empty result because you forgot the "await" in front of the EleventyFetch function call. So "response" was a Promise object. Since a Promise object doesn't have a "results" key, it returned an undefined. Because Eleventy resolves the Promises during the data cascade, in the template you had the actual data, not the Promise object and there, you were able to find the "results" key.

    • @jaydanurwin
      @jaydanurwin  2 года назад

      Good catch, sometimes the multitasking of recording, coding, and reading notes makes you forget the simple stuff 😅

  • @french6ko
    @french6ko Год назад

    Thanks Jaydan, it was helpful

  • @davidpaez_co
    @davidpaez_co Год назад

    Jayden, thank you so much for sharing these videos. I'm loving Eleventy

  • @GH-pu3xc
    @GH-pu3xc 2 года назад +1

    Jayden! this is epic. Being able manage the data in the JSON file is so cool!

    • @jaydanurwin
      @jaydanurwin  2 года назад

      I agree it's pretty awesome! Having a single template for large amounts of data is a definite game changer

  • @lacikawiz8369
    @lacikawiz8369 2 года назад +1

    You could actually just write {% Card card %} and it will work too (just tried it) (@6:30)

  • @eanappi
    @eanappi 2 года назад

    Hi Jaydan ... this videos is out of correct playlist

    • @jaydanurwin
      @jaydanurwin  2 года назад

      Thanks for the reminder to add it Ernesto!

  • @JohnB5290
    @JohnB5290 2 года назад

    Thank you. This is awesome.

  • @amit_yadav
    @amit_yadav 2 года назад +1

    In getTopStories() function, JSON was not parsed at that time that's why "articles.results" not worked.

    • @davidpaez_co
      @davidpaez_co Год назад

      If he had used an await before that EleventyFetch. Would that have worked?

  • @shakt77
    @shakt77 2 года назад

    Belated Congratulations on becoming a dad!

  • @emile6913
    @emile6913 Год назад

    Do you have to run the build every day for this to update on production server?

  • @l_combo
    @l_combo 2 года назад

    What about setting up some tests to run at build time to troubleshoot valid data e.g. YML etc so that you get accurate troubleshooting where the errors are coming from.

  • @boyanbalev4428
    @boyanbalev4428 2 года назад

    Congrats on he kid man! You are awesome continue!

    • @jaydanurwin
      @jaydanurwin  2 года назад +1

      Thank you! She should be in the next couple hours as of me writing this! 🙌🏼 I definitely will keep em coming 👍🏼

  • @davidarnold5982
    @davidarnold5982 2 года назад

    thank you exatly what I needed to familliarise myself,
    Do you have advice on improving the time to first paint for eleventy. Obviously caching can only take you so far. I am going critical CSS, light and dark. Trying to keep script requests small.

    • @jaydanurwin
      @jaydanurwin  2 года назад

      I'm glad to hear the course is helping you out! My first recommendation would be to prefetch your critical CSS if it's loading as an external link file like it is in our example. My second, which is more effort, would be to set up 11ty's build process to inline and minify your styles.

  • @Jerry-e7p
    @Jerry-e7p 2 года назад

    thank you~~!!