refactor: simplify sourcing of challenge nodes into gatsby (#63697)

This commit is contained in:
Oliver Eyton-Williams
2025-11-11 09:34:24 +01:00
committed by GitHub
parent 6fe97d3105
commit ee911d7eac
18 changed files with 2778 additions and 5531 deletions
@@ -17,14 +17,12 @@ function createChallengeNode(
};
if (internal.type === 'ChallengeNode') {
const { tests = [], block, dashedName, superBlock } = challenge;
const { block, dashedName, superBlock } = challenge;
const slug = `/learn/${superBlock}/${block}/${dashedName}`;
const blockHashSlug = `/learn/${superBlock}/#${block}`;
challenge.fields = {
slug,
blockName: block,
tests,
blockHashSlug
};
}