3 min de lecture

Hello World: Welcome to My Blog

My first blog post where I introduce myself and test my bunch of mdx components.

introastroweb-dev

Welcome to my blog! I’m excited to finally have a space where I can share my thoughts on web development, coding adventures, and lessons learned along the way.

Learn JavaScript, TypeScript and Node.js through various articles and videos.

Why Start a Blog?

I’ve been building things for the web for a while now, and I’ve always found that writing helps me think. Whether it’s documenting a tricky bug I solved or exploring a new technology, putting thoughts into words solidifies my understanding.

Plus, if something helped me, maybe it’ll help you too.

The best time to start a blog was yesterday. The second best time is now.

Unknown

A Quick Code Snippet

Since this is a developer blog, let’s kick things off with some code. Here’s a simple function that greets the world in style:

typescript
function greet(name: string): string {
  const greeting = `Hello, ${name}!`;
  console.log(greeting);
  return greeting;
}

greet('World');

And here’s how you might use this in a React component:

tsx
import { useState } from 'react';

export function Greeter() {
  const [name, setName] = useState('World');

  return (
    <div className="bg-card rounded-lg p-4">
      <input
        type="text"
        value={name}
        onChange={(e) => setName(e.target.value)}
        className="rounded border px-3 py-2"
        placeholder="Enter your name"
      />
      <p className="mt-4 text-xl font-bold">Hello, {name}!</p>
    </div>
  );
}

Project Structure

Here’s an example of visualizing a project structure using the FileTree component:

  • Directorysrc
    • Directorycomponents
      • Directorymdx
        • FileTree.tsx
        • Callout.tsx
        • Mermaid.tsx
      • Directoryastro
        • Figure.astro
    • Directorycontent
      • Directoryblog
        • Directoryfr
          • hello-world.mdx
        • Directoryen
          • hello-world.mdx
    • Directorylayouts
      • Layout.astro
    • Directorypages
      • index.astro

Visual Elements

Here’s an example of including images with captions:

Code on a computer screen
Writing code is both an art and a science

And here’s a Mermaid diagram showing a simple git flow:

A typical git branching workflow

You can also create flowcharts:

mermaid
The developer debugging loop

What’s Next?

I’ll be writing about:

Stay tuned, and feel free to reach out if there’s a topic you’d like me to cover.

See you in the next post!


Retour à tous les articles