feat: update Ask for help (#40114)

* feat: get helpCategory from frontmatter

* DEBUG: sets all the projects to JavaScript

This is just so the tests pass, it'll need to go.

* fix: updated helpCategoryMap categories

* fix: added Python to helpCategory frontmatter key

Co-authored-by: Randell Dawson <rdawson@onepathtech.com>
This commit is contained in:
Oliver Eyton-Williams
2020-10-30 20:10:34 +01:00
committed by GitHub
parent 7857dc53f4
commit e4a9b2988c
12 changed files with 145 additions and 124 deletions

View File

@ -16,6 +16,7 @@ const { dasherize, nameify } = require('../utils/slugs');
const { createPoly } = require('../utils/polyvinyl');
const { blockNameify } = require('../utils/block-nameify');
const { supportedLangs } = require('./utils');
const { helpCategoryMap } = require('../client/utils/challengeTypes');
const access = util.promisify(fs.access);
@ -275,6 +276,8 @@ ${getFullPath('english')}
challenge.required = required.concat(challenge.required || []);
challenge.template = template;
challenge.time = time;
challenge.helpCategory =
challenge.helpCategory || helpCategoryMap[dasherize(blockName)];
return prepareChallenge(challenge);
};