Astro is so intuitive and beginner friendly. Seems like a perfect middle step after learning basic HTML to SPA framework.
@JohnnyNilsson832 жыл бұрын
Wonderful! Just the perfect in between step of static files and a SPA framework.
@DaPaBe19992 жыл бұрын
Oh my god, ASTRO is so beginner friendly, love to see more about this!
@monkyout7 ай бұрын
You are like the good teacher we all had that we always liked to learn from.
@JavArButt Жыл бұрын
I have to say, the calm way how you explain things relaxes. Also, the explanations are very clear and precise. Thank you for this very nice introduction.
@tymiller25962 жыл бұрын
WOOOWWWW!!!... I've been watching this channel for almost two years. And that's how long I've been waiting and praying for this video. Definitely my best Christmas gift. Thanks Kevin
@JamesPero2 жыл бұрын
Thanks for covering this topic Kevin! Back in the early days we would use Server Side Includes (SSI) via shtml files and apache web server. Then PHP came along and made SSI obsolete. Now we have too many ways to do it, which may or may not be a good thing.
@KevinPowell2 жыл бұрын
Yeah, at one point too many options can lead to some level of paralysis as well. I'm really enjoying Astro though, really nice dev experience!
@eddyerkelens2 жыл бұрын
Still, php rules in this as it is invicible in the html. Make it easy, split te pages in segments and autoinclude this with de htaccess.
@njwebwiz2 жыл бұрын
Yup. I use php includes for things like header, nav, footer, and anything else that appears on more than one page.
@1zanshin2 жыл бұрын
Just astro-ed an existing static site, works like a charm up till now. I am loving it! Thx Kevin!
@deborahvandervlist48562 жыл бұрын
Amazing, thank you for this video (and the tip, I had been building websites on Jekyll and Astro seems so much more flexible!) Also wanted to thank you for all the other great videos, I have learned CSS watching your channel and am now working as a Web Dev thanks to them!!
@KevinPowell2 жыл бұрын
I'm really digging Astro, but you might also really like Eleventy. It has a lot of similarities to Jekyll, so it's an easy transition, and it's much more mature than Astro at this stage, which has some benefits.
@deborahvandervlist48562 жыл бұрын
@@KevinPowell Thank you, I did have a look at it a while ago, but I wasn't sold the way I am with Astro (maybe because there was no KP video on it :D). I have actually used quite a bit of React too so the transition is actually super easy! Looking forward to seeing how it grows!
@MirceaAgrigoroaie2 жыл бұрын
JS community... Guys look we are able to convert html to templates.. we are f..AWESOME.. this is mindblowing.. Meantime... PHP since the 90's
@KevinPowell2 жыл бұрын
Oh, totally. The last 5+ years of JS frameworks have just been trying to reinvent PHP 😂. It is nice in this case when it spits out static files though
@jasperwieringa60382 жыл бұрын
This really shows the power of web-components. Interesting to see that Astro is using that under the hood. I have been working with web-components for well over a year now and I was surprised to see that there is so little to find (documentation wise) as it is allows for such a powerful way of creating framework-agnostic components. I have not used Astro myself yet, but I am pretty sure you can use named slots to create even smaller components i.e. navbar, sidebar, footer etc and slot them to your MainLayout component. Great stuff Kevin!
@nivoset Жыл бұрын
I think web components are going to be less used for people and more by frameworks.
@dangnguyen.922 жыл бұрын
simple solution for simple purpose. clean, straightfoward, understandable. thank Kevin.
@OleksandrBorysenko333 Жыл бұрын
Great! Thanks for the simple explanations. Probably in the next few weeks, I'll try to refactor my portfolio using Astro.
@Brunoenribeiro Жыл бұрын
Great content as always, Kevin! I'm glad to see more JS around here. Just a tip to fellow engineers who want to dive into more JS-heavy professional projects: please use a Node Version Manager to install Node on your machine, instead of downloading and installing it directly. It's pretty common for different projects to use different Node versions. Corey Butler's NVM for Windows makes it very easy to handle that. And Linux/Mac friends can use the original NVM, it's pure magic.
@digwillhachi2 жыл бұрын
I love your precise but simple explanations.
@aymanehrouch2 жыл бұрын
Great video Kevin, can you do more about Astro please? I like the way you break things down.
@Allformyequine2 жыл бұрын
This is great! MORE on Astro please ;-) !!
@vietvohoang4592 жыл бұрын
This is exactly what I need, thank you Kevin!
@uneamiedev2 жыл бұрын
I was on the hunt for something like this. Thank you so much 🙏🏾
@GH-pu3xc2 жыл бұрын
Fantastic stuff KP! This video really helped me understand static site generators. I'll definitely be giving it a go!
@carlosl-f24332 жыл бұрын
Looking forward to more Astro breakdowns after this. Thanx
@orincywhytedesigns2 жыл бұрын
This was so interesting, I’m not here yet but still cool to watch where my journey is going to take me.
@chrisparker85392 жыл бұрын
This is funny because at around 0:50 you said "wouldn't it be nice if we could have templates". Welcome to 30 years ago and . I sure miss the old days... With that said, this was an informative video and I will be giving Astro a try.
@bobbyb6412 Жыл бұрын
I just got into Astro, are you planing some more videos exploring components? It seems like such a good way to start without having to larn React, Svelte or any of the other frameworks.
@TheMeltzz Жыл бұрын
Thank you for making it so easy to listen and follow.
@shahrearferdousfagon94412 жыл бұрын
this was just awesome. we want sass with astro
@cabanford2 жыл бұрын
Is supported
@gulraizgull80442 жыл бұрын
thank you so much mate for providing up to date helpful and problem solving content.
@lucienchu96492 жыл бұрын
Barely see Kevin introduces external lib, but each time he brings a good one.
@cgarafulic2 жыл бұрын
Great video Kevin. I heard about Astro before but this is the first tutorial about how to get started with it, and it's really simple. Of course can grow in complexity adding more components from different frameworks, but the way it can be incorporated by people with different levels of components based frameworks knowledge with Astro is step by step. And this is the first step to get started. Thank you for recording this video, explaining it with your admirable way to teach others. You are a great teacher. I love you started with this new series of component bases frameworks. Soon you will gain another public recognition title not only as the King of CSS 🙂
@michaelgrunewalder78932 жыл бұрын
Great Tutorial - Can't wait to see more about Astro.
@kandiekane06022 жыл бұрын
Just what I was looking for. I ran into this issue just yesterday
@matthewbeardsley7004 Жыл бұрын
seems like a good alternative to react etc. for just a simple 1 pager
@pexeixv2 жыл бұрын
Kevin introduced me to 11ty a while ago and I've been using it alot. But I gotta admit it's a little janky at times. Astro looks smooth. Will try!
@brechdt2 жыл бұрын
Can you tell me the conclusion? :)
@pexeixv2 жыл бұрын
@@brechdt Definately Astro > 11ty!
@nielslytzdk2 жыл бұрын
I get a code 1 and many more errors when doing the npm install so I'm kinda stuck. It looks very interesting though, I'm all for simplicity! Always a pleasure to watch your video :D
@KevinPowell2 жыл бұрын
that's odd... it is in beta and I did have to put off creating the video for a few days, as they had a breaking change the day I was going to record, lol. Maybe try again tomorrow and see what happens?
@MidwestGomez2 жыл бұрын
Same errors here too.
@wesleysandifer61572 ай бұрын
This works a little bit like django. I love using django. I'll need to try this
@SamirPatnaik2 жыл бұрын
super helpful as always, Kevin.
@gexgex9412 жыл бұрын
Great stuff! Looking forward to new videos about Astro!
@e11world2 жыл бұрын
Awesome video Kevin! I use a similar thing but with Gulp and gulp-file-include which makes things very handy but this is also very promising. I'd like to see more on this and maybe a comparison between this and other SSG or even why you'd use this over next.js
@KevinPowell2 жыл бұрын
I like that this is tech agnostic, unlike next.js and most other similar ones today. But it could be fun to compare.
@ashbjorn2 жыл бұрын
Perhaps I missed something, but before I could follow your tutorial fully, I first had to run: npm install -g astro After that this command was OK: npm init astro
@mustaphaELHOURA2 жыл бұрын
Thank you very much sir ... With which software, you record your videos.
@BehruzbekOtayev2 жыл бұрын
Django template engine rocks this
@strange_man2 жыл бұрын
Are you olanning to do more detailed tutorial on Astro? Would be great to see
@MeepChangeling2 жыл бұрын
I solved this by making a js file that injects the HTML for my header and navbar into each page on load. That way I only have one file to edit to update my navbar. Okay, well, I have two. Since my site is split in two halves, one for world lore and one for the RPG rules for that world. But like, it works. Why should I do this instead of that?
@frugodwill Жыл бұрын
Bad for see though, web crawlers won’t pick
@mirjalolochilov84282 жыл бұрын
All your videos are coming out great
@KevinPowell2 жыл бұрын
Thanks a lot :D
@JimKernix Жыл бұрын
Are you still planning on doing another astro video? I hope so
@alwayssomewhere716 Жыл бұрын
great tutorial - subscribed
@Viralplace2 жыл бұрын
Do you prefer Astro or Eleventy?
@michaelturvey86582 жыл бұрын
Be aware: Astro is new, and it has some serious bugs and flaws. I trust the developers are working these out, but you should know going in that many seemingly obvious functionalities will break or just not work at all. For example, currently you can't make a "more articles" style sidebar if your site uses markdown files for blog posts, because the way Astro handles markdown files creates an endless loop.
@Lilliebeth0012 жыл бұрын
Thank you so much, great ... I just learned this with php
@DanteMishima2 жыл бұрын
Astro is way cool!
@31redorange082 жыл бұрын
18:20 These are hyphen-minuses, not backticks. 🤔
@outsider8632 жыл бұрын
Very interesting, I use mustache for my stuff, so that I can basically build "generic blocks" for everyday use.. I will have a look into this though thanks for the content
@azamatkozuaidarov5183 Жыл бұрын
Kevin in the whole world i do like it how you explain an everything
@cu3e Жыл бұрын
on mac You can type cmd + k to clear terminal
@farhanawan99562 жыл бұрын
Thank you so much! But can you make a video on the components
@CaliburPANDAs2 жыл бұрын
So this only benefits multi-page sites right? What about SPAs?
@badcatdesign2 жыл бұрын
Love Astro! For perhaps an even easier (and less dependency oriented) templating workflow, there are two other interesting apps. Kit55 is one and the other is a bit more polished (and native mac) CodeKit
@azamatkozuaidarov5183 Жыл бұрын
keep it up Kevin
@Stoney_Eagle2 жыл бұрын
We're all doing something similar to this with every framework, why is there still no "vanilla" way of doing this with normal html5.... I don't think it should be that hard for browser vendors to do. Get a tag declaring an import and specify a file and wrap it around, that sorta works like an with or without Javascript execution so it becomes part of the first dom level. This will also work great for svg and makes them stylable. And if security is a risk, ristrict it to same origin. Call them wrap and include 😊
@KevinPowell2 жыл бұрын
There was talk of something like includes being added to HTML, but if I'm not mistaken, it was actually Mozilla that shot it down. I don't know much about the history of that though
@Stoney_Eagle2 жыл бұрын
@@KevinPowell It would save soo many resources and compile time if here is just a native way of including stuff in the dom. Makes no sense to not do it in my opinion.
@bobshoaunng20382 жыл бұрын
Web components lets you do the same in vanilla html5
@talkdatrue2 жыл бұрын
@@bobshoaunng2038 is this approach SEO friendly?
@bobshoaunng20382 жыл бұрын
@@talkdatrue since its vanilla html, i would believe so
@AnDi-tx2xh2 жыл бұрын
Hello Kevin, It seems a bit silly to me that you and others mention this idea of having to copy html from one page to another. Sure Astro is great and I have started using it myself but lets be honest here, any developer of your experience would know that its not doom and gloom if you choose not to use Astro. You do not have to repeat your HTML. There's so many ways around that in javascript alone. Create a function which returns a template literal of your menu and then call that function in every page. Add a new menu item to your function and it will work for every page in which that function is called. This is just what came off the top of my head. I don't think astro's ultimate purpose is to prevent you from repeating your html. Its much greather than that.
@Danachew Жыл бұрын
Until the person viewing your site has javascript turned off. It's a rare case but it does happen. You know what though, it would be interesting to test your JS idea vs php vs astro and compare load times. I'd just be worried the more I'm serving things up with JS the more the site might get bogged down.
@DerLustigeAstronaut2 жыл бұрын
I absolutely love your desktop background. Can you provide a link where I can download it?
@durppp2 жыл бұрын
I tried to post a link but it didn’t go. Just google image search ‘get cape wear cape fly background’
@blackrobot138 Жыл бұрын
Hi Kevin , How can I attach SEO specific to pages. I dont want one SEO for entire website. I want the about us, contact and blog to have their own SEOs.
@welling12 жыл бұрын
I remember the days of using Dreamweavers' .DWT files to save me from many update nightmares.
@RichardWeitzmann-z2e Жыл бұрын
THANK YOU!
@MidwestGomez2 жыл бұрын
Well, I followed along exactly, got to "npm install," and was greeted with a text wall of user-unfriendly errors. I hate the command line.
@MidwestGomez2 жыл бұрын
The fix: npm init astro@latest
@andycetnarskyj28482 жыл бұрын
Astro's great but one annoying thing is that it doesn't like global styles. I tried to use it with your sass tutorials as a design system doc but hit a big issue on getting the dev server to watch for a single global style. Have you managed to get it to work?
@KevinPowell2 жыл бұрын
I didn't have any issues, though I haven't played with it in a bit now. I'll have to take a look again, but it uses Vite in the background. It could be you need to point the href to the .scss file, so Vite sees it and compiles that
@andycetnarskyj28482 жыл бұрын
@@KevinPowell cool I tried a few proposed solutions from the discord. One mentioned using a snowpack plugin. Thanks for the reply
@andycetnarskyj28482 жыл бұрын
I got it working after some help on the discord. You now just have to import the .scss file into your base layout and install sass and it compiles... win.
@frankiejrey2 жыл бұрын
I use the Pug templating system. I'm curious how Astro compares to Pug. Thank you for sharing, this is the first I've heard of Astro, and I'm now I'm curious.
@KevinPowell2 жыл бұрын
Pug is cool too!
@oliverp80062 жыл бұрын
You can use 'normal' more simple templating languages (Liquid, Nunjucks, Pug, EJS or Handlebars incl Markdown) with 11ty or the dynamic, more complex js ones with Astro
@frankiejrey2 жыл бұрын
@@KevinPowell Actual Pugs are even better!
@parthkumarchaudhary2 жыл бұрын
Awesome 👍😎
@fullpreteristnow11 ай бұрын
Terminal is also in the top menu. Isn't it the same thing? Not sure, but it seems to yield the same result.
@philip9677 Жыл бұрын
Kev what about Eleventy should we use Astro or Eleventy as a SSG
@josvelema23622 жыл бұрын
first! was waiting for this! :)) sometimes our minds are in sync :D
@dazraf2 жыл бұрын
This is what webcomponents made for.
@alwayssomewhere716 Жыл бұрын
Hi great video. Do you have a Github Link for your project
@mirjalolochilov84282 жыл бұрын
Very good luck to you Kevin
@ck00242 жыл бұрын
*Astro looks cool to learn before learning React. But I would prefer PHP.*
@KevinPowell2 жыл бұрын
Any reason why? Nice to have just some static files at the end of the day!
@djalexxxgr2 жыл бұрын
Slot element looks like a web component implemetation behind it. right?
@DanielRios5492 жыл бұрын
I like that it accept different libraries, different from Next, Nuxt, or SvelteKit, but I thought without them would be plain HTML, not .astro files, I feel strange to put the Javascript directlly in the file without a script tag like in Vue, Svelte or plain HTML, this is strange just like put the HTML in a return. But anyway, it seems to be simple just like Svelte is, and we have the option to use all of them, this is the best part.
@samuelosoba2 жыл бұрын
Thanks for video Kelvin, however, you did not explain the part of the slot tag. How exactly did you figure out that you need to add a slot tag to the MainLayout template such that the framework recognizes subsequent tags for insertion into the mainLayout template.? Is this from the documentation ? or how.?
@SarahRainsberger2 жыл бұрын
I'm not Kevin, but hope you don't mind my answering: Yes, it's in the documentation! Slots are like "children" in React. You specify wherever you want any child data inserted. The documentation is here: docs.astro.build/core-concepts/astro-components/index.html#slots Hope that helps a bit!
@sergejstojanovic25182 жыл бұрын
What do you think about tailwind, Bootstrap etc...
@jeremiahthompson822 жыл бұрын
You can use JavaScript components. That's what i do
@XandarLake12 жыл бұрын
Magic ! :)
@tofuman95262 жыл бұрын
Would you consider using astro to build a starter-template for freelance work and serve as a CMS of some sort for clients' with minimal addition/editing requirements? Thoughts?
@KevinPowell2 жыл бұрын
100% yes, though I'd integrate it with a CMS. I haven't tried with Netlify CMS, it's a little bare boned but really easy to set up (though I haven't used it with Astro)... so for something simple it might work. I'd probably be more inclined to set things up with Sanity or another CMS instead though, if it was for a client. Once you've done it once, it should be pretty simple for future projects and provides a really nice CMS.
@tummalasudhir79182 жыл бұрын
Is it a template engine like EJS, PUG, HANDLE BARS, Jinja ( for python) ?
@justinoneill28372 жыл бұрын
how would this be better then 11ty?
@badmax7319 Жыл бұрын
I want to recreate my old blog with Astro, but I want the files to end with .html. Is that possible? I've already tried with blog-post.html.mdx and [...slug].html.astro, but it just doesn't work.
@flaviomauri2 жыл бұрын
The architecture of the page, engineered with slots, reminds me a lot of the Shopify architecture. Call me old school (or ignorant) but I don't like much that this system creates all those subfolders just to store single pages. Wouldn't "pretty links" be achievable with htaccess configuration? ~ Any idea if there are even more lightweight systems to achieve modularity and templating in static sites? For as simple this is, the folder structure and base files seem just too many 😅
@veja-e-aprenda Жыл бұрын
Hi Kevin. Is there any way to build the "dist" with each html file without folder? All I wanna do is to organize html files after building.
@briankgarland2 жыл бұрын
How does Astro compare with Hugo? Hugo is great.
@kohelet9102 жыл бұрын
So cool thank you
@harri004132 жыл бұрын
What's your opinion on Hugo
@marcrasmussen4742 жыл бұрын
Where did you get that wallpaper?
@WishMasterCoder Жыл бұрын
I tried for 2 days to get Astro to work ... instead will go back to not using a framework and adding scss the normal way ... and building webpages using npm ... thanks for the vid though
@azamatkozuaidarov5183 Жыл бұрын
One of your friends recomended to me of you
@jakubfrei3757 Жыл бұрын
Wait. But as far as i know, todays web pages have one index html with header and footer and the other one are just some html elements which we add to index page with javascript and nodejs, right ? So why do we need to copy ?
@KevinPowell Жыл бұрын
Depends on your tech stack, but this was intended mostly for beginners who aren't doing that... but also, there are performance gains for serving up static sites, rather than relying on client-side rendering. That said, it really depends on the project, but a personal portfolio, or a blog, or other things that are using something like React often don't really need to be more than a simple static site, or maybe potentially something with server-side rendering.
@bramvanoverveld69822 жыл бұрын
Hi Kevin nice video! Have you heard about the framework Laravel? I really like it. Its a little complex but if you dive into it and starting to understand it, it is really helpfull!
@simpingsyndrome2 жыл бұрын
15:31 wasn't that self closing tag?, i think that's kinda similar component like NextJS or ReactJS
@chandragie2 жыл бұрын
Hey, I see that every time you switch pages the whole page re-rendered (the reload button rotated). Does this mean Astro app is not a SPA app?
@crooker22 жыл бұрын
Have you tried Statamic CMS? Such an amazing laravel-based flat file content management system (no database, very powerful and easy to build sites with) (this is not a commercial, there is a very robust free version)
@lankymoose18312 жыл бұрын
i love their website
@sergejstojanovic25182 жыл бұрын
Will you ever make videos on React? Do you even like it :(