Skip to content
Type something to search...
Taxo Theme Documentation

Path Aliases & Real File Paths

Taxo uses path aliases heavily, especially in page and section files.

You will often see imports like:

import HeroSection from "@/components/sections/HeroSection.astro";

But there is no src/components/ directory. The real alias mapping lives in taxo/tsconfig.json:

"paths": {
"@/components/*": ["./src/layouts/components/*"],
"@/shortcodes/*": ["./src/layouts/shortcodes/*"],
"@/helpers/*": ["./src/layouts/helpers/*"],
"@/*": ["./src/*"]
}

What That Means

  • @/components/... really points to src/layouts/components/...
  • @/shortcodes/... really points to src/layouts/shortcodes/...
  • @/helpers/... really points to src/layouts/helpers/...

Common Examples

import Logo from "@/components/global/Logo.astro";

Actually means:

src/layouts/components/global/Logo.astro
import Accordion from "@/shortcodes/Accordion.astro";

Actually means:

src/layouts/shortcodes/Accordion.astro

Quick Navigation Cheat Sheet

  • page shell: src/layouts/Base.astro
  • headers and footers: src/layouts/components/global/
  • reusable sections: src/layouts/components/sections/
  • widgets: src/layouts/components/widgets/
  • cards: src/layouts/components/cards/
  • MDX shortcodes: src/layouts/shortcodes/

Knowing the alias map saves a lot of time when the docs or code references @/components/....