How to make a subtheme of Drutopia's Octavia theme
For Drutopia, we’re going to need to find another/automatic way to make certain Octavia’s two block templates are inherited. For now here is my subtheme’s .info.yml file:
<?php
// TODO: Make this file unnecessary because we will not allow deploying code to the platform
/**
* Implements hook_theme_suggestions_HOOK_alter for blocks.
*
* See "Inheriting Block Templates" in
* https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-theme-or-sub-theme-of-sub-theme
*/
function family_home_theme_suggestions_block_alter(&$suggestions, $variables) {
// Load theme suggestions for blocks from parent theme.
foreach ($suggestions as &$suggestion) {
$suggestion = str_replace('family_home_', 'octavia_', $suggestion);
}
}
Using Bulma directly, we see this in our (compression-off) stylesheets listing:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.5.3/css/bulma.css " media="all" />
<style media="all">
@import url("/themes/contrib/bulma/assets/font-awesome/css/font-awesome.css?0");
@import url("/themes/contrib/bulma/assets/overrides.css?0");
@import url("/themes/contrib/bulma/assets/bulma.style.css?0");
</style>
Using Octavia, we see this:
<style media="all">
@import url("/themes/contrib/octavia/dist/css/bulma.css?0");
@import url("/themes/contrib/bulma/assets/font-awesome/css/font-awesome.css?0");
@import url("/themes/contrib/bulma/assets/overrides.css?0");
@import url("/themes/contrib/bulma/assets/bulma.style.css?0");
@import url("/themes/contrib/octavia/dist/css/global.css?0");
</style>