Skip to content

Conversation

@Martin-Pitt
Copy link
Contributor

Work in progress for updating to a new structure per #15

@Martin-Pitt
Copy link
Contributor Author

For an update, I am currently working on trying out to implement sidebar tabbed groups like you can see on the docs.astro.build site.

This is the structure I'm playing with, which feels pretty good. First arg is an id which is used for i18n of the labels, pulled from a js/json file.

import { portal, tab, group } from './config/sidebar.js';

export const sidebar = [
	// Scripting Portal
	portal('script', {
		items: [
			tab('script.introduction', {
				autogenerate: { directory: 'script/getting-started' },
			}),
			
			tab('script.guidebook', {
				items: [
					group('script.guidebook.features', { autogenerate: { directory: 'script/features' }}),
					group('script.guidebook.guides', { slug: 'script/guides' }),
					group('script.guidebook.recipes', { slug: 'script/recipes' }),
				]
			}),
			
			tab('script.language-slua', {
				collapsed: false,
				autogenerate: { directory: 'script/slua' },
			}),
			tab('script.language-lsl', {
				collapsed: true,
				autogenerate: { directory: 'script/lsl' },
			}),
			
			tab('script.reference', {
				collapsed: false,
				items: [
					group('script.reference.categories', { slug: 'script/reference/categories' }),
					group('script.reference.events', { slug: 'script/reference/events' }),
					group('script.reference.constants', { slug: 'script/reference/constants' }),
					group('script.reference.stdlib', {
						collapsed: false,
						autogenerate: { directory: 'script/reference/standard-library' },
					}),
					group('script.reference.luau', {
						collapsed: false,
						autogenerate: { directory: 'script/reference/luau' },
					}),
					group('script.reference.lsl', {
						collapsed: true,
						autogenerate: { directory: 'script/reference/lsl' },
					}),
				]
			}),
		]
	})
];

@Martin-Pitt
Copy link
Contributor Author

Martin-Pitt commented Dec 9, 2025

Sidebar has been split and tabbed!

So all this functionality combines:

The multi-sidebar allows us to split the create site into separate portals.

Preview: https://martin-pitt.github.io/create/script/

To be honest there is still some finessing to be done.

Also I didn't get around to testing and implementing the site-wide SLua/LSL toggle — Sometimes I'm not sure we need it but then realise we really, really do. There are a lot of aspects this would affect, for example the Guides and Recipes sections could potentially have tons of the older LSL resources and also new SLua things. It would not be realistic to create SLua and LSL versions for everything or there may be incompatibilities. It wouldn't make sense how to do something related to turning tables into rich data structures make any sense for someone looking for something on LSL.

Anyway.

The point is, I'm going to flag this PR ready for review because this is a huge change and it is better to have it earlier in than later as it could introduce more and more merge conflicts.

@Martin-Pitt Martin-Pitt marked this pull request as ready for review December 9, 2025 12:21
@hymenaei
Copy link

this isn't bad but you have to remember the website won't just be for scripting so the grouped tabs don't feel right

@Martin-Pitt
Copy link
Contributor Author

Martin-Pitt commented Dec 11, 2025

Yeah not really happy with the grouped tabs either, I've got a new menu layout that I'm playing with that could work instead though.

Multi sidebars is specifically required to do the other portals though like building or mesh etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants