Home Projects Portfolio Dashboard Export PDF Log in
Astro TypeScript

Starting Fresh: Bootstrapping a New Portfolio with Astro

Building a new personal portfolio can be a daunting task, especially when it comes to choosing the right tool for the job. For my latest project, portafolio-2024, I decided to leverage Astro to create a high-performance site that prioritizes speed and developer experience.

Why Astro for a Portfolio?

Think of Astro as a sophisticated, modular construction kit. Instead of loading an entire framework into every page, it provides a 'content-first' approach. It allows you to build using your favorite UI components while delivering a zero-JavaScript bundle by default. This makes it an ideal choice for a portfolio where performance and SEO are top priorities.

The Initial Setup

Starting a new project often feels like standing before a blank canvas. By initializing a project with the Astro CLI, I gained access to a structured file system that separates content from layout logic.

Here is a simple example of how a main page structure looks in Astro:

--- 
// Layout imports
import BaseLayout from '../layouts/BaseLayout.astro';
---

<BaseLayout title="My Portfolio">
  <h1>Welcome to my new space</h1>
  <p>Building with TypeScript and Astro.</p>
</BaseLayout>

This structure enforces a clear separation between the layout wrapping and the actual page content. By using TypeScript, I can ensure that component properties are strictly typed, reducing runtime errors significantly.

Getting Started

Starting from scratch with Astro is straightforward. The initialization process sets up the necessary configuration files, including astro.config.mjs, which manages your build settings and integrations.

The Takeaway

When beginning a new project, don't overcomplicate your stack. Use a framework like Astro that handles the heavy lifting of optimization for you. My best advice? Focus on your content first, and let the build tool manage the static site generation. I'm looking forward to seeing how this portfolio scales as I add more projects.


Generated with Gitvlg.com

Starting Fresh: Bootstrapping a New Portfolio with Astro
Cristian Ludueña

Cristian Ludueña

Author

Share: