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

Key phrases

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

Hacker Newsletter #697

Friday, April 26, 2024

Don't watch the clock; do what it does. Keep going. //Sam Levenson hackernewsletter Issue #697 // 2024-04-26 // View in your browser #Favorites Lattice is the AI-powered people platform that

TikTok threatens shutdown 📱, FCC passes net neutrality 🌐, the robotics renaissance 🤖

Friday, April 26, 2024

ByteDance would rather shut down TikTok than sell the company Sign Up |Advertise|View Online TLDR Together With Plaid TLDR 2024-04-26 6 fintech predictions you need to know for 2024 (Sponsor)

📧 What's inside MMA and how it can help you

Friday, April 26, 2024

What's Inside Modular Monolith Architecture? Hey there! 👋 I wish you an excellent end to the week. What better way to spend the weekend than diving headfirst into a 12+ hour course? Well, maybe

Data Science Weekly - Issue 544

Friday, April 26, 2024

Curated news, articles and jobs related to Data Science, AI, & Machine Learning ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Develop highly relevant search applications using AI

Friday, April 26, 2024

New Elasticsearch and AI training ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ elastic | Search. Observe. Protect A world of AI possibilities door-test 2.png Explore

Stripe makes more changes

Thursday, April 25, 2024

TikTok is in trouble, and net neutrality is back View this email online in your browser By Christine Hall Thursday, April 25, 2024 Welcome back to TechCrunch PM, your home for all things startups,

💎 Issue 414 - From a Lorry Driver to Ruby on Rails Developer at 38

Thursday, April 25, 2024

This week's Awesome Ruby Newsletter Read this email on the Web The Awesome Ruby Newsletter Issue » 414 Release Date Apr 25, 2024 Your weekly report of the most popular Ruby news, articles and

💻 Issue 414 - JavaScript Features That Most Developers Don’t Know

Thursday, April 25, 2024

This week's Awesome Node.js Weekly Read this email on the Web The Awesome Node.js Weekly Issue » 414 Release Date Apr 25, 2024 Your weekly report of the most popular Node.js news, articles and

💻 Issue 407 - The Performance Impact of C++'s `final` Keyword

Thursday, April 25, 2024

This week's Awesome .NET Weekly Read this email on the Web The Awesome .NET Weekly Issue » 407 Release Date Apr 25, 2024 Your weekly report of the most popular .NET news, articles and projects

💻 Issue 414 - Everyone Has JavaScript, Right?

Thursday, April 25, 2024

This week's Awesome JavaScript Weekly Read this email on the Web The Awesome JavaScript Weekly Issue » 414 Release Date Apr 25, 2024 Your weekly report of the most popular JavaScript news, articles