You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
starlight({title: 'Leaf',social: {github: 'https://github.com/DangerMonkeys/leaf',},sidebar: [{label: 'User Guides',autogenerate: {directory: 'user-guides'},// items: [// // Each item here is one entry in the navigation menu.// { label: 'Example Guide', slug: 'guides/example' },// ],},{label: 'Developer Reference',autogenerate: {directory: 'dev-references'},},],})
Given the desire to co-locate images with the markdown docs; my folder structure looks like the following (note index.md)
I end up having an extra, un-needed layer in the sidebar. Can I configure this in some way to know if a directory doesn't have any children, and it's accessed through index.md, to remove this from the tree?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My sidebar is configured by:
Given the desire to co-locate images with the markdown docs; my folder structure looks like the following (note index.md)
![image](https://private-user-images.githubusercontent.com/1132154/410813275-9eacd5d1-5259-47a8-98de-f6c15c06f895.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTExNzcsIm5iZiI6MTczOTM1MDg3NywicGF0aCI6Ii8xMTMyMTU0LzQxMDgxMzI3NS05ZWFjZDVkMS01MjU5LTQ3YTgtOThkZS1mNmMxNWMwNmY4OTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMDkwMTE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDA1ODcxMDQ5NWVmMzVjYzg2YTJlNjQ1ZTFlZDZmZTNiYmE4ZWViY2RjMjlkMmE4YzA3YWZlNDc5Nzk3MjNjNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.cdX4v4UZ2cuwY8kGJFbli_R7w3qYGKS7P4-86CVYGWI)
I end up having an extra, un-needed layer in the sidebar. Can I configure this in some way to know if a directory doesn't have any children, and it's accessed through index.md, to remove this from the tree?
![image](https://private-user-images.githubusercontent.com/1132154/410812647-1600bc44-afa5-4986-b2d4-5f8c7872d698.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTExNzcsIm5iZiI6MTczOTM1MDg3NywicGF0aCI6Ii8xMTMyMTU0LzQxMDgxMjY0Ny0xNjAwYmM0NC1hZmE1LTQ5ODYtYjJkNC01ZjhjNzg3MmQ2OTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMDkwMTE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTJlMTIzY2FmNjlhOGFkYzg4OTdiOGU4NDgwYjE2MWYxNDQ5NGNmMTQwZTcwMzVlYTkyZTg5ZDI2MjMyOThmMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.miA7VwhklnmOTS3fF-y2dh_hJhWDPfU5e9EcZG3ulKU)
Beta Was this translation helpful? Give feedback.
All reactions