cd ..
nurfitra@system : ~/blog $ cat first-post.md
first-post.md
rw-r--r--

My First Blog Post

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Welcome to my new blog!

This is my first post on my new Astro blog, deployed to Cloudflare Pages.

Astro is an amazing framework for building content-focused websites. It ships zero JavaScript to the client by default, which makes it incredibly fast.

Why Cloudflare Pages?

Cloudflare Pages is a JAMstack platform for frontend developers to collaborate and deploy websites. It integrates perfectly with Astro through the @astrojs/cloudflare adapter.

Here are some benefits:

  • Global Edge Network: Your site is served from Cloudflare’s massive global network.
  • Free SSL: Automatic HTTPS for your custom domains.
  • Unlimited Bandwidth: No surprise bills for traffic spikes.
  • Server-Side Rendering (SSR): Support for dynamic routes and API endpoints.

Code Example

Here’s a quick example of a React component you could use in Astro:

import React, { useState } from 'react';

export default function Counter() {
  const [count, setCount] = useState(0);
  
  return (
    <button onClick={() => setCount(count + 1)}>
      Clicked {count} times
    </button>
  );
}

And you can embed it in your MDX files or Astro pages using the client:load directive to hydrate it on the client!

“Astro is the best way to build a website in 2026.” - A very smart person

Thanks for reading!