Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/svelte.dev/scripts/sync-docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DOCS = path.join(dirname, '../../content/docs');

const packages: Package[] = [
{
name: 'svelte',
name: '10-svelte',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're removing the .sort elsewhere, do we need this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because they are ordered the same way the filesystem does, so still alphabetically

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I think the disconnect here is that I was envisaging we'd just hardcode the order in the dropdown. It seems likely that we're eventually going to want to have separators (or maybe subheads) etc...

image

...and it would be cumbersome to express that in the filesystem. The current solution using nav.json was originally built to serve multiple sites and as such is hopelessly overengineered, and I think we should just get rid of it rather than accommodating it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, then I'll just leave that up to you, you are way more aware of the codebase

local: `${REPOS}/svelte`,
repo: 'sveltejs/svelte',
pkg: 'packages/svelte',
Expand All @@ -45,7 +45,7 @@ const packages: Package[] = [
}
},
{
name: 'kit',
name: '20-kit',
local: `${REPOS}/kit`,
repo: 'sveltejs/kit',
pkg: 'packages/kit',
Expand Down
1 change: 0 additions & 1 deletion apps/svelte.dev/src/routes/nav.json/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ async function get_nav_list(): Promise<NavigationLink[]> {
}))
}))
}))
.sort((a, b) => a.title.localeCompare(b.title)); // Svelte first

const tutorial = index.tutorial.children.map((topic) => ({
title: topic.metadata.title,
Expand Down
Loading