OneBite.Dev - Coding blog in a bite size

🧑‍🚀 Blog for learning astro

astro blog posts, coding tips and trick in a bitesize to help you learn astro.

Render custom HTML, CSS and Javascript in Astro MDX files

Today I learn how to render custom HTML, CSS and Javascript in MDX Astro file. This is how you do it

astro

Astro error Expected ";" but found ":"

Here is how I solve error Expected ";" but found ":"

astro

Astro Content collections Guide (For beginner 2023)

Managing contents in Astro (static site generator) is now more fun and safe with content collections

astro

How to load component once in astro mdx (auto import)

Auto import any component to your mdx files. Set the component once and use it everywhere!

astro

Using highlightJS for code syntax in Astro

Today I faced a problem, where Laravel shows empty results when query a relation with eager loading. Found the solution, it was I forgot to select the id as well, so the relation didn't know what connects the second table with.

astro

How to load external script in Astro

Require is not defined! How I solve loading external javascript library in Astro that uses a require to load module inside it.

astro

Migrating Hugo site to Astro

A long time Hugo fans here. I still struggle on doing query, routing or filtering. I tried Astro and really love it. Here is how you can migrate too

astro hugo

Hugo vs Astro - which static site generator to choose in 2023

Which static site generator to choose in year 2023? should you pick the newcomer Astro or Hugo that been here for a while

astro hugo

Hugo shortcode in Astro Components

Migrating my site from Hugo to Astro, requires me to find out what is a Hugo shortcode relevant in Astro statice site generator

astro

How to create a new file in astro

To create a new file in astro site generator, we just need to create a new file inside pages folder with .astro extension

astro