Home Projects Portfolio Dashboard Export PDF Log in

Modernizing a Personal Portfolio: Streamlining Content with Astro

Building a personal portfolio is often the first place we experiment with new frameworks. Recently, I have been working on my project, portafolio-2024, focusing on how to better structure professional data and project showcases within an Astro-based architecture.

The Challenge of Content Updates

When managing a personal site, the biggest friction point is often the manual labor required to update CV details or add new project entries. If your content is tightly coupled with your UI components, every small update becomes a refactor. I wanted to move away from hardcoding these details and instead create a modular structure that allows me to scale as my project list grows.

Implementing a Data-Driven Approach

To simplify this, I moved toward a content-first approach using Astro's content collections. By treating my CV and project list as distinct data sources rather than static UI components, I gained several advantages:

  • Separation of Concerns: UI code is kept clean, while project data lives in structured markdown or JSON files.
  • Type Safety: Using TypeScript schemas ensures that my project entries always include required fields like title, date, and repository links.
  • Ease of Maintenance: Updating a project description is now just an edit to a text file rather than a dive into the component tree.

Improving the Workflow

By restructuring the project to treat the CV and portfolio as distinct entities, I was able to decouple the visual presentation from the data layer. Here is a conceptual look at how this simplifies the data flow:

// Example: Fetching project data into a UI component
import { getCollection } from 'astro:content';

const projects = await getCollection('portfolio');

// Now we can iterate over structured data instead of hardcoded arrays
projects.forEach(project => {
  console.log(project.data.title);
});

The Takeaway

Your portfolio is a reflection of your work, so treat it with the same engineering rigor as your professional projects. Start by separating your static content from your site's logic today. By using a content-first strategy in Astro, you minimize technical debt and ensure your portfolio remains easy to update as your career progresses. Give content collections a try for your next update — your future self will thank you.


Generated with Gitvlg.com

Modernizing a Personal Portfolio: Streamlining Content with Astro
Cristian Ludueña

Cristian Ludueña

Author

Share: