How do I add custom template files?
It looks like hook_theme_registry_alter() is only executed when the theme cache is rebuilt. This means that what you need to do is use one of the theme_suggestion_alter hooks, such as hook_theme_suggestions_alter() or hook_theme_suggestions_node_alter(). These get run for each page before it is cached, I believe, instead of only once on cache rebuild.

So, what you want to do in your module is create a theme implementation using hook_theme(). That would look something like this:

function MYMODULE_theme($existing, $type, $theme, $path) {
  return array(
    'my_theme_implementation' =&gt; array(
      'path' =&gt; drupal_get_path('module', 'reveal_js') . '/templates',
      'template' =&gt; 'my_theme_implementation',
    ),
  );
}


And then your hook_theme_suggestions_node_alter() would be something like

function MYMODULE_theme_suggestions_node_alter(&amp;$suggestions, $variables) {
  $is_admin = Drupal::service('router.admin_context')-&gt;isAdminRoute();
  $node = $variables['elements']['#node']
  if ($node-&gt;getType() == 'MY_CONTENT_TYPE' &amp;&amp; $is_admin == 0) {
    $suggestions[] = 'my_theme_implementation';
  }
}


Does that all make sense?