Website: add <rituals> component, add ritualsTables (parsed from YAML) to website configuration (#13084)
Changes: - Updated the `build-static-content` script to parse files named `rituals.yml` in the handbook folder, and add the contents to the website's configuration as `sails.config.builtStaticContent.ritualsTables`, and to throw errors if a `rituals.yml` file contains a ritual that is missing a required value. - Created the `<rituals>` component, a component that takes a single prop (`ritualsTable`) and renders a table containing a row for each ritual. - Added a new property to `handbook/company/rituals.yml` - moreInfoUrl. If this value is present, the description in the rendered HTML table (of the `<rituals>` component) will link to the URL provided. - updated view-basic-handbook to send `sails.config.builtStaticContent.ritualsTables` in `SAILS_LOCALS` --------- Co-authored-by: Sampfluger88 <108141731+Sampfluger88@users.noreply.github.com>
This commit is contained in:
@@ -55,6 +55,7 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Respond with view.
|
||||
return {
|
||||
path: require('path'),
|
||||
@@ -69,6 +70,7 @@ module.exports = {
|
||||
thisPage.meta.description ? thisPage.meta.description // « custom meta description for this page, if provided in markdown
|
||||
: 'View the Fleet handbook.'// « otherwise use a generic description
|
||||
),
|
||||
rituals: sails.config.builtStaticContent.rituals,
|
||||
algoliaPublicKey: sails.config.custom.algoliaPublicKey,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user