From f32aa30f2f0722fb659a22ddc57cdf3bd79a4ab5 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 23 May 2025 15:07:50 +0200 Subject: Add blog pages, content and standardlayout --- src/content/blog/getting-started-with-astro.md | 48 +++++++++ src/content/blog/integrating-react-with-astro.md | 81 +++++++++++++++ src/content/blog/tailwind-css-in-astro.md | 122 +++++++++++++++++++++++ src/content/config.ts | 19 ++++ src/layouts/StandardLayout.astro | 51 ++++++++++ src/pages/blog/[slug].astro | 67 +++++++++++++ src/pages/blog/index.astro | 48 +++++++++ src/pages/index.astro | 83 +++++++++++++-- 8 files changed, 511 insertions(+), 8 deletions(-) create mode 100644 src/content/blog/getting-started-with-astro.md create mode 100644 src/content/blog/integrating-react-with-astro.md create mode 100644 src/content/blog/tailwind-css-in-astro.md create mode 100644 src/content/config.ts create mode 100644 src/layouts/StandardLayout.astro create mode 100644 src/pages/blog/[slug].astro create mode 100644 src/pages/blog/index.astro diff --git a/src/content/blog/getting-started-with-astro.md b/src/content/blog/getting-started-with-astro.md new file mode 100644 index 0000000..dadcdcd --- /dev/null +++ b/src/content/blog/getting-started-with-astro.md @@ -0,0 +1,48 @@ +--- +title: "Getting Started with Astro" +description: "Learn how to build fast websites with Astro's innovative multi-page approach." +pubDate: 2025-05-20 +image: "https://images.unsplash.com/photo-1614728263952-84ea256f9679?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80" +author: "Astro Developer" +tags: ["astro", "web development", "javascript"] +--- + +# Getting Started with Astro + +Astro is a modern web framework that allows you to build faster websites with less client-side JavaScript. It's perfect for content-focused websites like blogs, marketing sites, and portfolios. + +## Why Astro? + +Astro offers several advantages over traditional frameworks: + +- **Performance First**: Astro websites are designed to be lightning-fast by default. +- **Content-Focused**: Built with content-heavy websites in mind. +- **Server-First**: Generates HTML on the server, not in the browser. +- **Easy to Use**: Familiar syntax that combines the best parts of HTML, JSX, and markdown. +- **Fully Featured**: Includes everything you need for production. + +## Basic Example + +Here's a simple Astro component: + +```astro +--- +// Your component script goes here +const greeting = "Hello, Astro!"; +--- + +
This is my first Astro site.
+
+ Getting a new business off the ground is a lot of hard work. Here are five ideas you can use to find your first customers.
++ {new Date(post.data.pubDate).toLocaleDateString('en-US', { + year: 'numeric', + month: 'long', + day: 'numeric' + })} +
+{post.data.description}
+Read more →
+No blog posts found. Check back soon!
++ A modern framework for building fast, content-focused websites. +
+