You Don't Need a CMS - Use This Instead

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2024
  • Build a custom blog platform with Astro and Appwrite.
    Learn how to create a new Database in Appwrite, create new Post Documents using an Astro HTML form and SSR, get a single blog post, and get a list of blog posts to display on a blog website.
    🧰 Resources
    Tutorial: spacejelly.dev/posts/how-to-c...
    Code: github.com/colbyfayock/my-app...
    Demo: my-appwrite-blog.vercel.app/
    📺 TH-cam: th-cam.com/users/colbyfayock?sub_c...
    🐦 Twitter: / colbyfayock
    📹 Twitch: / colbyfayock
    ✉️ Newsletter: www.colbyfayock.com/newsletter/
    🎥 What I Use: www.colbyfayock.com/uses
    #colbyfayock #astro #appwrite #blog #webdevelopment
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 47

  • @colbyfayock
    @colbyfayock  5 หลายเดือนก่อน +2

    Get fresh tutorials and other free content straight to your inbox! colbyfayock.com/news

  • @kutamak-guyguy8183
    @kutamak-guyguy8183 5 หลายเดือนก่อน +1

    You explain so good. defentely one of the best teachers out there !
    Thanks !

    • @colbyfayock
      @colbyfayock  5 หลายเดือนก่อน

      thanks i appreciate that!

  • @chibichibz9998
    @chibichibz9998 4 หลายเดือนก่อน

    Very helpful Tutorial! Thank you!

    • @colbyfayock
      @colbyfayock  4 หลายเดือนก่อน

      no problem!!

  • @appwrite-steven
    @appwrite-steven 5 หลายเดือนก่อน +6

    Astro and Appwrite! What a combo! 🚀

    • @colbyfayock
      @colbyfayock  5 หลายเดือนก่อน +1

      💯🚀

  • @DennisIvy
    @DennisIvy 5 หลายเดือนก่อน +3

    Nice! I'm gonna clone this and add some auth features :) Love Astro!

    • @colbyfayock
      @colbyfayock  5 หลายเดือนก่อน +1

      its so good!

  • @eshwargetenv1
    @eshwargetenv1 3 หลายเดือนก่อน

    great video. subbed. quick question: since we are loading the posts dynamically from appwrite, astro must be set to SSR correct? We cannot use SSG anymore due to the dynamic nature of loading the articles from the database.

    • @colbyfayock
      @colbyfayock  3 หลายเดือนก่อน

      In this case, yeah ssr. BUT! You can use SSG to render the posts you just need to tell astro those paths to render docs.astro.build/en/guides/routing/#static-ssg-mode

    • @eshwargetenv1
      @eshwargetenv1 3 หลายเดือนก่อน

      @@colbyfayock I see. Gone through the article but still one question lingers. So everytime I post a new article, do I need to build astro blog repo if I want to use SSG? My article data is getting stored in the appwrite db. How can I even do this?

    • @colbyfayock
      @colbyfayock  3 หลายเดือนก่อน

      @@eshwargetenv1 yeah unfortunately Astro doesn't have a native solution right now (unless i missed an announcement) that allows you to prevent rebuilding the site with SSG, however doing a quick search, it looks like if you're deploying to Vercel, that they have a mechanism for this in their adapter: docs.astro.build/en/guides/integrations-guide/vercel/#isr
      ISR is a pattern introduced in Next.js if you're not familiar, Incremental Static Regeneration
      i haven't tried this with Astro yet, but with Next.js it works really well

  • @wchorski
    @wchorski 4 หลายเดือนก่อน

    curious to know your thoughts on open source page builders (something that's easy for a client to edit there "about" or "terms of service" page after a website has been delivered and paid for)

    • @colbyfayock
      @colbyfayock  4 หลายเดือนก่อน +1

      i generally think they're pretty great though a lot of some are somewhat limiting. i think Builder is one of the more truly visual builder solutions, though if only inline content is needed, not content design, those usually work well. i dont personally think id want to use any of them though as i like being in the code and writing in a more focused environment

  • @TessaMero
    @TessaMero 5 หลายเดือนก่อน +6

    awesome video!!! I'm never going back to using CMS's now :)

  • @RicardoGonzalez-or8ln
    @RicardoGonzalez-or8ln หลายเดือนก่อน

    Great video Colby, how qould this work in a production environment?

    • @colbyfayock
      @colbyfayock  หลายเดือนก่อน

      thank you! can you elaborate on what you mean? is there something specific you find wouldn't work or scale?

    • @RicardoGonzalez-or8ln
      @RicardoGonzalez-or8ln หลายเดือนก่อน

      @@colbyfayock sure, If I leave it as a static site in production, every vlog entry would trigger a build action?

    • @colbyfayock
      @colbyfayock  หลายเดือนก่อน

      ​@@RicardoGonzalez-or8ln unfortunately, as far as im aware, Astro doesnt have a great mechanism to only re-build the posts that changed when using SSG, so pretty much :(
      an alternative solution i think is using SSR and setting up cache policies. if deploying to Vercel, they have ISR available via their integration

  • @mattfarley6966
    @mattfarley6966 4 หลายเดือนก่อน

    What VS Code theme and Icon set are you using in this video? :)

    • @colbyfayock
      @colbyfayock  4 หลายเดือนก่อน

      Night Owl! marketplace.visualstudio.com/items?itemName=sdras.night-owl
      what icon are you referring to though?

  • @Viralplace
    @Viralplace 3 หลายเดือนก่อน

    Sorry but it's secure to put this code inside an .astro component? Client-side all can read data. I know that you said "use environment variables" but should we put this code in aws lambda, netlify function ecc?

    • @colbyfayock
      @colbyfayock  3 หลายเดือนก่อน +2

      great question! my use of environment variables isn't necessarily only to protect the values, but allow those values to more easily be referenced more than one place, where environment variables feel the most appropriate to do that, especially considering in a production environment, you may additionally want a Development environment, making those values as variables easy to swap
      as far as the values themselves, the Appwrite Web SDK is intended to be used in the client, so its safe. you can't really do anything with the database and collection ID without permissions, where if you have wide open permissions, that would be a concern, but you definitely wouldn't want to do that unless you have a good use case for it
      finally as one other point, the code on the New Post page actually runs on the server, so just pointing out in that case, unless im missing something, it wouldn't be available in the client

  • @Russia-with-krafi_bn
    @Russia-with-krafi_bn 25 วันที่ผ่านมา

    looks like it just break the base idea, this way require a server (yyou are using your own pc), that mean i need to keep running a server when i want to update a post, i was trying to use static cms with astro but i cant understand how can i do that i think netlify will not take static cms with astro, well for simplicity i think its better to use netlify cms with astro and when i have time do things manually , i wish there should option like tags or category to add myself with cms

    • @colbyfayock
      @colbyfayock  24 วันที่ผ่านมา

      unfortunately Astro doesn't yet have a good way of revalidating pages statically without rebuilding the entire site. hoping that something like that comes in the future. Netlify CMS is a bit limiting 🤷‍♂ but if it fit your project's needs, then its perfect!

  • @nemeziz_prime
    @nemeziz_prime 5 หลายเดือนก่อน

    Would you prefer this over Astro/Next + Strapi?

    • @colbyfayock
      @colbyfayock  5 หลายเดือนก่อน +3

      i haven't actually ever used strapi, ive only heard wonderful things. ive more recently worked in WordPress for both my sites and any customization has been adding plugins and basically patching over WordPress core rather than building something natively to what i need, so the authoring experience was always half-baked.
      whenever have time i'm likely jumping to a new solution, though unsure if it's a solution like this, a traditional CMS, or static MDX files, which i dont love, but might open the door for more custom in-post UIs
      my spacejelly.dev site as an example, i have a few different datapoints that i manage in WordPress, including blog posts, courses, books, and store products, so id want a way to continue managing those in an intuitive and reliable way. are there other CMSs that can do that well? not sure. but a solution like this would handle it, as you can make it what you want

    • @nemeziz_prime
      @nemeziz_prime 5 หลายเดือนก่อน +1

      @@colbyfayock thanks for sharing your views Colby. I really like how "blog ready" Appwrite is. Thanks for making this video and showing how easy it is to make a blog.

  • @teddybonzo8460
    @teddybonzo8460 4 หลายเดือนก่อน

    is gating content and password protection possible with this?

    • @colbyfayock
      @colbyfayock  4 หลายเดือนก่อน

      totally. and it depends on where you want to gate. you can gate the entire collection or you can use Document Security on a per-document basis. good timing, Appwrite just released a short about it: th-cam.com/video/jdMYzdlw_-k/w-d-xo.html

    • @colbyfayock
      @colbyfayock  4 หลายเดือนก่อน

      as far as password protection, you would either use the user's authenticated status or i would think you would need to provide a separate password storage mechanism that you would need to implement on your own, but the user auth route would be simpler and the user would only get access to the documents they have access to

  • @lostinthenarrativve
    @lostinthenarrativve 2 หลายเดือนก่อน

    What are the prerequisites to go throug this video ? Thanks!

  • @gaxve
    @gaxve 2 หลายเดือนก่อน

    Really cool tutorial, but I get this error and the slugs seem to be the same:
    Invalid query: {"method":"equal","attribute":"slug","values":["test-post"]} this is when clicking on a post to see it's content

    • @colbyfayock
      @colbyfayock  หลายเดือนก่อน +1

      hey, not sure about that error... can you show the code you're using to attempt it?

    • @gaxve
      @gaxve หลายเดือนก่อน

      @@colbyfayock no problem, fixed it, it was just bad typing 💀thanks!

  • @aniketpandharabale9860
    @aniketpandharabale9860 3 หลายเดือนก่อน

    I cannot see how slugs were generated. Not even your code

    • @colbyfayock
      @colbyfayock  3 หลายเดือนก่อน +1

      hey! so the way that these are being generated are by a dynamic route. if you look at this file: github.com/colbyfayock/my-appwrite-blog/blob/main/src/pages/posts/%5BpostSlug%5D.astro
      the name is [postSlug]. the brackets indicate that its a dynamic route, so if anyone tries to make a request to /posts/anything, it will route the request to that file, where if you look on line 9 at Astro.params, you can see where we're grabbing that postSlug value, so that we can use it to get our dynamic data

  • @advokats086
    @advokats086 2 หลายเดือนก่อน

    An update to the appwrite version has been released. Rewrite the lesson to reflect the latest update. Please !!!

    • @AbuBakr1
      @AbuBakr1 10 วันที่ผ่านมา

      lol

  • @LukeRoberts1979
    @LukeRoberts1979 หลายเดือนก่อน

    damn man I think blogs have replaced letterboxes

    • @colbyfayock
      @colbyfayock  หลายเดือนก่อน

      do you mean like the mailbox? haha or is there something else called a letterbox?

    • @LukeRoberts1979
      @LukeRoberts1979 หลายเดือนก่อน

      @@colbyfayock I mean every house has one