<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matt Willis</title>
    <description>The latest articles on DEV Community by Matt Willis (@mattwillis).</description>
    <link>https://dev.to/mattwillis</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F59284%2F5a95b2a0-fe2d-4c0b-a164-21161335e7f3.jpg</url>
      <title>DEV Community: Matt Willis</title>
      <link>https://dev.to/mattwillis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mattwillis"/>
    <language>en</language>
    <item>
      <title>Blasting Off With Astro</title>
      <dc:creator>Matt Willis</dc:creator>
      <pubDate>Fri, 07 Feb 2025 02:33:40 +0000</pubDate>
      <link>https://dev.to/mattwillis/blasting-off-with-astro-c2p</link>
      <guid>https://dev.to/mattwillis/blasting-off-with-astro-c2p</guid>
      <description>&lt;h2&gt;
  
  
  3...2...1...Blast Off!
&lt;/h2&gt;

&lt;p&gt;Exciting news, my open source project to fight hate, &lt;a href="https://resistance-toolkit.com" rel="noopener noreferrer"&gt;The Resistance Toolkit&lt;/a&gt;, now has an official website / web app! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0if9gi68q9pbihcr0jz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0if9gi68q9pbihcr0jz.gif" alt="NASA rocket on the launchpad blasting off in slow motion." width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quick recap of the events to led to this moment: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I created a GitHub project that lists causes, organizations, and actions to take to support them. This is an effort to counteract all of the hate that has become emboldened in recent days.&lt;/li&gt;
&lt;li&gt;The project lived in a GitHub repo partly because I didn't feel like I had the time or resources to commit to building out an entire website or app. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I don't know about you, but in my opinion, the Web Dev &amp;amp; Javascript scene has gotten a little out of hand. I often feel paralyzed when I am starting a simple project. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does my little website need and entire WordPress backend or JS CMS equivalent? &lt;/li&gt;
&lt;li&gt;Should I choose React (Next.js now?), Vue, Angular, or Svelte? &lt;/li&gt;
&lt;li&gt;Hmmm, &lt;strong&gt;server side rendering&lt;/strong&gt;, but with server-&lt;strong&gt;less&lt;/strong&gt; functions?&lt;/li&gt;
&lt;li&gt;Don't even get me started with the umpteen JS state management libraries...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's enough to put me off of starting new projects. &lt;strong&gt;Enter Astro!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Astro, you ask?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://astro.build" rel="noopener noreferrer"&gt;Astro&lt;/a&gt; is a JavaScript web framework optimized for building fast, content-driven websites... It supports every major UI framework. Bring your existing components and take advantage of Astro's optimized client build performance.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I decided to give Astro a shot for a couple of reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It's front end framework agnostic. You can use .md, .mdx, .html, .astro, .jsx, .js (pretty much anything) to compile your website.&lt;/li&gt;
&lt;li&gt;Simple static or server side rendering.&lt;/li&gt;
&lt;li&gt;Asset handling is a breeze. Astro can handle image optimization, determine quality, and infer size of remote images. &lt;/li&gt;
&lt;li&gt;Built in view transitions (and the ability to customize them).&lt;/li&gt;
&lt;li&gt;Easy prefetching. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I was relieved that I could use the markdown files I had already created for the project. I could take my existing files, plop them in the src directory, and &lt;strong&gt;boom&lt;/strong&gt; I have the skeleton of my website up and running!&lt;/p&gt;

&lt;p&gt;However, I needed it to be a little more dynamic. So I added some Astro properties and collections to manage the 15 causes and ~60 organizations listed in the project. I could then create layouts and convert the .md files for individual causes into templates to handle dynamic routing. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;src/data //collections and types
src/causes.mdx //causes collection page
src/cause/[slug].astro //individual cause template
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I won't go into all of the details (maybe I'll do a walk through in the future) but, this allowed me to rapidly develop out the website. There are also lots of Astro and community developed plugins as well. 🥰&lt;/p&gt;

&lt;h2&gt;
  
  
  No Excuses
&lt;/h2&gt;

&lt;p&gt;I no longer have an excuse to put off starting a new project! Give Astro a try. There are a few "gotchas" that I had to deal with - like how to use vendor scripts across multiple pages and page loads. But the documentation and forums set me straight quickly. &lt;/p&gt;

&lt;h2&gt;
  
  
  Shameless Plug
&lt;/h2&gt;

&lt;p&gt;I hope you'll check out &lt;a href="https://resistance-toolkit.com" rel="noopener noreferrer"&gt;The Resistance Toolkit&lt;/a&gt;. My hope is foster a community that is passionate about fighting hate, one step at a time. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good Night, And Good Luck!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>news</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
