Improve Drupal core starterkit integration for Rivet theme

Created on 20 November 2023, 12 months ago

Problem/Motivation

When using the Rivet theme as a starting point for creating a sub-theme via Drupal's new "starterkit" functionality, some things go wrong.

Steps to reproduce

php core/scripts/drupal generate-theme --starterkit rivet rivet_subtheme
  1. The code in src/StarterKit.php::postProcess() is not executed because the PHP namespace is wrong.
  2. The *.info.yml, *.libraries.yml, and *.breakpoints.yml, and README.md are all updated, but the following items are not touched:
    1. Function signatures inside theme-settings.php (e.g. rivet_form_system_theme_settings_alter)
    2. Theme name references in config files inside config/install/ and config/optional/ folders. E.g.:
      • block.block.mytheme_help.yml filename, with yaml config entries id: mytheme_help and theme: mytheme
      • mytheme.settings.yml filename.
    3. Theme name references are wrong in package.json, eg "name": "mytheme"

Proposed resolution

  1. Fix the PHP namespace in src/StarterKit.php
  2. Add logic to src/StarterKit.php::postProcess() to clean up the codebase for creating a functional sub-theme.
  3. Optionally, add a *.starterkit.yml for integration with Work In Progress on Drupal core issue: 📌 Making a theme compatible with core's theme generator is too difficult Needs work
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024