Flavio - What do you think about my new website?

Hi Reader

2 days ago I woke up with the idea of moving my website flaviocopes.com from Hugo to Astro.

It took me just a day, with a brand new theme design as well. 

In this email I'm going to detail the process and decision making, figuring it could be useful to you.

In case you don't know Astro, it's one very cool site building tool. I've been using it on many of the new websites I've created lately. I wanted to make this move since months, but I kept resisting and also I had a lot other more important things to do.

While working on my websites, my most important metric for me is DX, developer experience aka I don't want to work with bad tools.

Astro is very good on this because it allows me to build a website using UI components that I can create with its components syntax, which is JSX-like and very nice, or even React components, which can be frontend rendered or also server rendered at build time. Or any other frontend framework.

I've used this last feature to build a very cool thing.

I'm happy to tweak my pages inside VS Code, but sometimes it can get tiring, and the process makes me avoid writing a new post. I know I could use a CMS but I just won't. I want to build my own, right? Perfectly suited for me.

I'm a heavy Notion user, and I really like its authoring experience so much that I've been using it for creating all the courses I've done in the past 2 years, Bootcamp included. No tool compares to it, in my opinion.

This time I wanted to see if I could use Notion to power my blog as well. Not all of it, because the blog has over 1600 tutorials now 🤪, and it would be quite taxing if every build had to ask the Notion API for all the content. It would take a lot of time and I would have to work around rate limiting.

So instead I built a hybrid solution. 

I write new posts in Notion, and I can run a command on my computer to fetch them and transform them as markdown files on my site.

Best of both worlds: fast authoring and fast build times.

Hugo built the site in 1' 10". Astro builds the site in 2' 43".

It's more than 2x built time but.. hey, 1600 blog posts. It's a lot. It's actually much faster than some built times I hear about. 

I have more time to grab a cup of coffee before I can see the changes I push to production, but now I can do so much more, because Hugo is great and fast, but Astro is JavaScript and I can do whatever I want with it.

I didn't stop here.

I also had this idea: I want to be able to entirely build a site from a Notion page. Make that the homepage, and have sub-pages be pages on the site. 

I also wanted to optionally code the homepage with an Astro page, with code, and then have a page on Notion that could serve those sub-pages. Best of both worlds.

So when I want to add a page to the site I don't have to open my computer, VS Code, go in src/pages, create a new file, write HTML / JSX... I can just create a Notion page, even on my smartphone while I'm on a train, type the content, hit a button to trigger a new site build.

The site asks Notion which pages it has ready for publishing, fetches them at build time, and builds a static site with that content. 

I know other tools exist to make a site from Notion but the big difference with them is that this is completely customizable, developer friendly, and Notion can be just a portion of the website.

I have total control. And the rest of the site could be built in React, Svelte, whatever. Oh did I mention React that's server rendered at build time is great? I can use the React fancy features and JSX, and generate HTML that's shipped to the browser, instead of shipping React itself and client-render it. 

I'm happy with this workflow so far, and I built a few different sites using this technology. I like it. It's easy, but does not get in the way of doing whatever I want with it.

Also I think it's a refreshing approach to Web publishing. 

I can focus on the content rather than the tech stack (ironically, as I've been talking to you about the tech stack until now). Once built, it disappears behind the scenes.

Site builders are fun. I like building sites and talking about building sites. I've been working with them for a long time.

While I was doing this major rewrite of the underlying platform, I also had to migrate from a custom Hugo theme, which accumulated years and years of dust and tweaks and conditionals.

I decided to start from a blank slate approach. I had the content, and nothing else. I added Tailwind CSS, which it's something I wanted to do for ages but never had the courage to migrate the tons of lines of custom CSS I had.

Started simple, just have some basic CSS in place. And I replicated all the URL structured from before, so I won't have to deal with URL changes that could make Google angry.

The site looks clean. I wanted a minimalist UI with no fluff. The important thing is the content. I removed the sidebar. Removed the unimportant things I accumulated. I have a page with all the posts now, instead of pagination. It's great for searching. I can remove Algolia. Less code. I have a nice way to visualize tags.

Take a look.

I also have dark mode because I don't want your precious eyes to burn at night, you turn it on with your operating system settings.

Let me know what you think by replying to this email!

Oh and if you spot anything wrong with the site, tell me :)

 

Got some new blog posts for you too:

 

P.S. remember, in just 49 days we'll start the 2023 cohort of the Bootcamp, a 10-weeks long intensive online course that teaches you the fundamentals of Web Development using modern technologies, including HTML, CSS, JavaScript, Tailwind, Astro, React, Next.js, Prisma, PostgreSQL, NextAuth and much more! We'll go from zero to building websites, and then we'll focus on building web apps!

 

Have a great day!

Flavio @flaviocopes


This email was sent to you because you are subscribed to Flavio's Newsletter. If you want to stop receiving my free tutorials, click here to unsubscribe

Older messages

The 2023 Bootcamp is coming

Tuesday, December 6, 2022

Hi Reader Today I have some news on the 2023 cohort of the Bootcamp The Web Development Bootcamp is a 10-weeks long intensive online course that teaches you the fundamentals of Web Development using

LAST DAY (JS COURSE)

Friday, November 25, 2022

Hi Reader, Today is the last day to get advantage of my 35% OFF launch discount for the JavaScript Course, the new course I made to teach you this incredibly useful programming language. This course is

The JS COURSE is OPEN for SIGNUPS!

Tuesday, November 22, 2022

Hi Reader Maybe you are a complete beginner with no programming experience at all. Maybe you want to switch to programming from sales, marketing, or any kind of job. Maybe you spent 3 months, 6 months,

JavaScript Course - all the details

Tuesday, November 15, 2022

Hi Reader! Hi, today I want to talk about the upcoming JavaScript Course. Just 7 days left till the course opens! Let me write down all the facts in a list: ➡ The course will help you become better at

JavaScript Course -2 weeks

Tuesday, November 8, 2022

Hi Reader! I'm Flavio and I'm here with a new edition of my newsletter. I want to talk you about my new JavaScript Course I'm launching on November 22. But first, as I started writing I was

You Might Also Like

Charted | Global Economic Confidence in 2025, by Country 🌎

Wednesday, December 25, 2024

While emerging markets in Asia have the strongest confidence in the global economy looking ahead, European countries are most pessimistic. View Online | Subscribe | Download Our App FEATURED STORY

Top Tech Deals 🎅 Sony Headphones, iPhone Cases, 4K Projector, and More!

Wednesday, December 25, 2024

The season of giving is upon us. How-To Geek Logo December 25, 2024 Top Tech Deals: Sony Headphones, iPhone Cases, 4K Projector, and More! The season of giving is upon us. Happy Holidays! If you're

Why the Race to AGI is Humanitys Defining Moment

Wednesday, December 25, 2024

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, December 25, 2024? The

Iran's Charming Kitten Deploys BellaCPP: A New C++ Variant of BellaCiao Malware

Wednesday, December 25, 2024

THN Daily Updates Newsletter cover The Data Science Handbook, 2nd Edition ($60.00 Value) FREE for a Limited Time Practical, accessible guide to becoming a data scientist, updated to include the latest

Software Testing Weekly - Issue 251

Wednesday, December 25, 2024

GitHub Copilot is free! 🤖 View on the Web Archives ISSUE 251 December 25th 2024 COMMENT Welcome to the 251st issue! In case you missed it — GitHub Copilot is free! The free version works with Visual

Daily Coding Problem: Problem #1647 [Medium]

Tuesday, December 24, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Square. In front of you is a row of N coins, with values v 1 , v 1 , ..., v n . You are

Sentiment Analysis, Topological Sort, Web Security, and More

Tuesday, December 24, 2024

Exploring Modern Sentiment Analysis Approaches in Python #661 – DECEMBER 24, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Exploring Modern Sentiment Analysis Approaches in Python What are the

🤫 Do Not Disturb Mode Is My Secret to Sanity — 8 Gadgets I Want To See Nintendo Make

Tuesday, December 24, 2024

Also: The Best Christmas Movies to Watch on Netflix, and More! How-To Geek Logo December 24, 2024 Did You Know Their association with the Christmas season might make you think poinsettias hail from a

😱 AzureEdge.net DNS Retiring Jan. 2025, 🚀 Microsoft Phi-4 AI Outperforms, 🔒 Microsoft Secure Future Initiative

Tuesday, December 24, 2024

Blog | Advertise | View Online Your trusted source for Cloud, AI and DevOps guidance with industry expert Chris Pietschmann! Phi-4: Microsoft's New Small Language Model Outperforms Giants in AI

Mapped | The Top Health Insurance Companies by State 🏥

Tuesday, December 24, 2024

In 13 US states, a single company dominates the health insurance market, holding at least half of the total market share. View Online | Subscribe | Download Our App Presented by: Global X ETFs Power