From eb01ac0211ad841ca06b4e21ef6d5e731aa6f9ac Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Fri, 24 May 2024 17:13:26 +0100 Subject: [PATCH] Dynamically generate extras pages instead of hardcoded list 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. --- mix.exs | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/mix.exs b/mix.exs index a4b3b18b7..3ddd2c7c8 100644 --- a/mix.exs +++ b/mix.exs @@ -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"] ++ + List.delete(Path.wildcard("guides/**/*.{md,cheatmd}"), "guides/intro/intro.md") end def groups_for_modules do