Skip to content

bug: All internal links rendered without href attribute #172

@amirhossein-unlimit

Description

@amirhossein-unlimit

Environment

  • shadcn-docs-nuxt: 1.1.1
  • Nuxt: 3.17.6
  • vue: ^3.5.17,
  • Node: 22.x

Describe the bug

Every link that should be generated by the theme (Sidebar navigation items, Hero CTA, Breadcrumbs, etc.) is rendered as a plain tag without an href attribute.
Result: the element is visible, but clicking it does absolutely nothing – no navigation, no full reload, no JavaScript error.
Typing the path manually in the address bar still works and the page loads correctly.
Inspecting the DOM shows:

<a class="...">Get Started</a>   <!-- missing href -->

Reproduction

Minimal fresh setup:
npx nuxi@latest init -t github:ZTL-UwU/shadcn-docs-nuxt-starter
cd [project-name]
npm run dev

1.content
content/
1.frameworks/
_dir.yml
1.vue.md
2.nuxt.md

2._dir.yml
title: Folder
icon: lucide:folder
navigation.redirect: /frameworks/vue
navBadges:

  • value: New
    type: lime
    sidebar:
    style: group
    collapse: false

3.nuxt.config.ts

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  ssr: true,
  extends: ["shadcn-docs-nuxt"],
  app: {
    head: {
      htmlAttrs: {
        lang: "fa",
      },
    },
  },
  i18n: {
    defaultLocale: "fa",
    locales: [],
  },
  compatibilityDate: "2024-07-06",
});

Expected behavior
Links must contain the correct href="/intro" (or the generated route) and trigger SPA navigation.

Additional context

No custom components override.
No ssr: false.
No JavaScript errors in console.

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions