Skip to content

Commit

Permalink
Dynamically generate extras pages instead of hardcoded list
Browse files Browse the repository at this point in the history
This means that any future additions into `guides` will automatically be
built by ExDoc when documentation is generated. There is no longer a
need to add the page and then update the Mix file with the new page.
  • Loading branch information
jb3 committed May 24, 2024
1 parent 4671ff2 commit ebd658b
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,10 @@ defmodule Nostrum.Mixfile do
end

def extras do
[
"guides/intro/intro.md",
"guides/intro/api.md",
"guides/intro/application_commands.md",
"guides/intro/gateway_intents.md",
"guides/functionality/state.md",
"guides/functionality/event_handling.md",
"guides/functionality/voice.md",
"guides/advanced/pluggable_caching.md",
"guides/advanced/multi_node.md",
"guides/advanced/hot_code_upgrade.md",
"guides/advanced/gateway_compression.md",
"guides/advanced/manual_sharding.md",
"guides/cheat-sheets/api.cheatmd",
"guides/cheat-sheets/qlc.cheatmd",
"guides/cheat-sheets/voice.cheatmd"
]
# We manually move the `intro.md` document to the top of the list so it
# remains first on the navigation sidebar
["guides/intro/intro.md"] ++
(Path.wildcard("guides/**/*.{md,cheatmd}") -- ["guides/intro/intro.md"])
end

def groups_for_modules do
Expand Down

0 comments on commit ebd658b

Please sign in to comment.