diff --git a/uw_cfg_common.libraries.yml b/uw_cfg_common.libraries.yml index a2b27e509e1ebb8f9bb4fda3f12de2b03f7a863d..4aabb6dc58d81af8151c19ac7dc890fdbbd09ba8 100644 --- a/uw_cfg_common.libraries.yml +++ b/uw_cfg_common.libraries.yml @@ -33,3 +33,6 @@ uw_layout_inverted_l_left: css: theme: layouts/uw-inverted-l-left/uw-layout-inverted-l-left.css: {} +uw_mathjax: + js: + https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS_HTML: { type: external, minified: true } diff --git a/uw_cfg_common.module b/uw_cfg_common.module index f62c18c123c6335c43a1cb9cb855b91cd66677a4..0f5298ec16168079aaa2954d64dcc9ef8a482bcc 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -259,6 +259,14 @@ function uw_cfg_common_preprocess_node(&$variables) { } } +/** + * Implements hook_page_attachments(). + */ +function uw_cfg_common_page_attachments(array &$page) { + $page['#attached']['library'][] = 'uw_cfg_common/uw_mathjax'; + +} + /** * Implements hook_form_FORM_ID_alter(). *