ZTL-UwU / shadcn-docs-nuxt

Effortless and beautiful docs template built with Nuxt Content & shadcn-vue.
https://shadcn-docs-nuxt.vercel.app/
MIT License
231 stars 36 forks source link

How to customize URL #37

Closed peoray closed 1 month ago

peoray commented 1 month ago

@ZTL-UwU how can I customize the URL as well

The path is always top level section and then the children like getting-started/introduction

Can I have like a docs/introduction, docs/components/bento-grid

This is so that the breadcrumb I'll customize will tally with the URL as well

ZTL-UwU commented 1 month ago

I think you can just create a folder called docs in the content folder.

content/
  index.md
  docs/
    introduction.md
    components/
      bento-grid.md
peoray commented 1 month ago

I'd still like it to have the top level heading though.

so:

Getting Started

Components

etc.

I'd try your suggestion and see. I wouldn't want it to be under Docs collapsible, just for the URL route

peoray commented 1 month ago

Screenshot 2024-10-09 at 6 06 17 PM

This is not the behaviour I want. Is it possible to have this without having docs as a top-level heading?

ZTL-UwU commented 1 month ago

Unfortunatly I don't think this level of customization is achievable through the file based routing system of nuxt content. As a workaround I would suggest that you maintain the side bar links manually so that you full control of the structure.

For example: https://github.com/unovue/shadcn-vue/blob/ff6d9d0da657a41582beec2b63d6b7e5683ddc8f/apps/www/.vitepress/theme/layout/MainLayout.vue

https://github.com/unovue/shadcn-vue/blob/ff6d9d0da657a41582beec2b63d6b7e5683ddc8f/apps/www/.vitepress/theme/config/docs.ts