vitepress-plugin-auto-sidebar icon indicating copy to clipboard operation
vitepress-plugin-auto-sidebar copied to clipboard

[Idea] What about implementing Frontmatter for a custom title and ordering?

Open jannis6023 opened this issue 2 years ago • 7 comments

Would be SOOO NICE! Then it would be soo much useful in combination with Netlify CMS / Decap CMS!

Thanks a lot for this great lib!

jannis6023 avatar Apr 26 '23 17:04 jannis6023

Hey @jannis6023,

thank you for your feedback, I'm glad if the lib helps you! I would be happy to check your wish to integrate Frontmatter. Can you create me an example, what is the advantage and how to operate this? I would like to get an impression of it first. Thanks.

JonathanSchndr avatar Apr 27 '23 06:04 JonathanSchndr

Hi there, I was looking also for this option too. For example I added the position: number attribute to each document inside the frontmatter definition, so that I can use it when creating category pages:

---
categoryTitle: 'page category'
excerpt: 'page content excerpt'
position: 0
breadcrumb:
  - path: '/en/'
    text: 'Home'
  - path: ''
    text: 'page breadcrumb title'
---

In my project I created an ìndex.md page inside each documentation folder, so that it serves as a category index and helps me order the content folder.

isorna avatar Apr 28 '23 09:04 isorna

Hi there, I used your plugin as an inspiration for my own version, using front-matter for custom fields like link text and docs order. Here it's just in case it can help you:

Auto generate Vitepress sidebars using front-matter for link text and ordering

isorna avatar May 05 '23 09:05 isorna

Hi there, I used your plugin as an inspiration for my own version, using front-matter for custom fields like link text and docs order. Here it's just in case it can help you:

Auto generate Vitepress sidebars using front-matter for link text and ordering

If you want you are welcome to create a PR ❤️

JonathanSchndr avatar May 05 '23 09:05 JonathanSchndr

I've just found another plugin that does exactly this, we're on the same wave it seems : https://github.com/Stuyk/vitepress-sidebar-builder

isorna avatar May 05 '23 09:05 isorna

#9 - maybe the first idea to integrate frontmatter. more ideas are welcome :)

JonathanSchndr avatar Apr 03 '24 07:04 JonathanSchndr

I'm author of #9 and I'm sorry I missed this issue. Now we can customize titles of pages with frontmatter and useFrontmatter option. I think it's also nice to implement ordering by frontmatter.

nandenjin avatar Apr 05 '24 06:04 nandenjin

So this one should be fixed, no?

Abdillah avatar Feb 14 '25 02:02 Abdillah