Skip to content

Commit

Permalink
feature: update the ordering of all elements in the sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
4x8Matrix committed Jun 20, 2024
1 parent 789ee33 commit 95e0a11
Show file tree
Hide file tree
Showing 85 changed files with 451 additions and 197 deletions.
6 changes: 5 additions & 1 deletion .lune/generator/markdown.luau
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ end
local function frontmatter(source: {
name: string,
description: string,
order: number,
})
return `---\ntitle: {source.name}\ndescription: {source.description}\n---`
return `---\ntitle: {source.name}\ndescription: {source.description}\nsidebar:\n order: {source.order}\n collapsed: true\n---`
end

function Markdown.generateMarkdownDocumentFor(classDocumentation: Moonwave.moonwaveDataExportObject)
Expand All @@ -78,6 +79,8 @@ function Markdown.generateMarkdownDocumentFor(classDocumentation: Moonwave.moonw

local inheritedClasses = classDocumentation.inherited ~= nil and classDocumentation.inherited or { }

local order = #string.split(classDocumentation.name, ".")

for _, classObject in inheritedClasses do
sizeOfClassProperties += #classObject.properties

Expand All @@ -93,6 +96,7 @@ function Markdown.generateMarkdownDocumentFor(classDocumentation: Moonwave.moonw
markdownFile ..= frontmatter({
name = className,
description = `DiscordLuau docs for {className}.`,
order = order,
})

markdownFile ..= newline()
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/ActivityBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: ActivityBuilder
description: DiscordLuau docs for ActivityBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/AttachmentBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: AttachmentBuilder
description: DiscordLuau docs for AttachmentBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: AutomoderationRuleBuilder
description: DiscordLuau docs for AutomoderationRuleBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/ChannelBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: ChannelBuilder
description: DiscordLuau docs for ChannelBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/CommandBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: CommandBuilder
description: DiscordLuau docs for CommandBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/CommandOptionBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: CommandOptionBuilder
description: DiscordLuau docs for CommandOptionBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/DiscordPermission.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: DiscordPermission
description: DiscordLuau docs for DiscordPermission.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/EmbedBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: EmbedBuilder
description: DiscordLuau docs for EmbedBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/GuildBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: GuildBuilder
description: DiscordLuau docs for GuildBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/GuildRoleBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: GuildRoleBuilder
description: DiscordLuau docs for GuildRoleBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/IntentsBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: IntentsBuilder
description: DiscordLuau docs for IntentsBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: ActionRowBuilder
description: DiscordLuau docs for ActionRowBuilder.
sidebar:
order: 3
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/Interface/ButtonBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: ButtonBuilder
description: DiscordLuau docs for ButtonBuilder.
sidebar:
order: 3
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: SelectionBuilder
description: DiscordLuau docs for SelectionBuilder.
sidebar:
order: 3
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: TextInputBuilder
description: DiscordLuau docs for TextInputBuilder.
sidebar:
order: 3
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/MemberBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: MemberBuilder
description: DiscordLuau docs for MemberBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/MessageBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: MessageBuilder
description: DiscordLuau docs for MessageBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/ModalBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: ModalBuilder
description: DiscordLuau docs for ModalBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/OnboardingBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: OnboardingBuilder
description: DiscordLuau docs for OnboardingBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/OnboardingPromptBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: OnboardingPromptBuilder
description: DiscordLuau docs for OnboardingPromptBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: OnboardingPromptOptionBuilder
description: DiscordLuau docs for OnboardingPromptOptionBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/PermissionsBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: PermissionsBuilder
description: DiscordLuau docs for PermissionsBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/PresenceBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: PresenceBuilder
description: DiscordLuau docs for PresenceBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/SettingsBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: SettingsBuilder
description: DiscordLuau docs for SettingsBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Builders/WelcomeScreenBuilder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: WelcomeScreenBuilder
description: DiscordLuau docs for WelcomeScreenBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/DiscordClient.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: DiscordClient
description: DiscordLuau docs for DiscordClient.
sidebar:
order: 1
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/DiscordLuau.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: DiscordLuau
description: DiscordLuau docs for DiscordLuau.
sidebar:
order: 1
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/classes/Network/DiscordGateway.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: DiscordGateway
description: DiscordLuau docs for DiscordGateway.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
Expand Down
Loading

0 comments on commit 95e0a11

Please sign in to comment.