Add and edit nodes using the main theme In Drupal 7, I could use hook_admin_paths to decide if a page used the main or admin theme. This has changed in Drupal 8. This option is now set in a route definition. Existing routes, like node.add, can be altered. However, looking in node.routing.yml, under node.add, I do not see _admin_route: TRUE, which I intended to alter to FALSE.

What do I need to alter, and how, so that adding and editing nodes is done using the main theme?
You can configure this in UI, see the checkbox at the end of the theme list in /admin/appearance:


  [x] Use the administration theme when editing or creating content


This config option is then used to alter the route in the following code example, which would also answer how to alter the route in a route subscriber:

NodeAdminRouteSubscriber::alterRoutes()

  protected function alterRoutes(RouteCollection $collection) {
    if ($this-&gt;configFactory-&gt;get('node.settings')-&gt;get('use_admin_theme')) {
      foreach ($collection-&gt;all() as $route) {
        if ($route-&gt;hasOption('_node_operation_route')) {
          $route-&gt;setOption('_admin_route', TRUE);
        }
      }
    }
  }


More info https://www.drupal.org/docs/8/api/routing-system/altering-existing-routes-and-adding-new-routes-based-on-dynamic-ones