------------------------------------
This project is superseded by the Rocketship Starter theme
------------------------------------
This module contains a PHP-script to generate component based themes for use with the Rocketship distribution and its various components), based on certain presets.
The generated themes make use of Gulp as a workflow tool and Sass for preprocessing the CSS, as well as Storybook for styleguide generation. All info about how to use it, is present in the README file of your generated themes and the built Storybook styleguide.
This module replaced the 4 Rocketship themes previously maintained here, which should be considered legacy:
- https://www.drupal.org/project/rocketship_theme_demo
- https://www.drupal.org/project/rocketship_theme_flex
- https://www.drupal.org/project/rocketship_theme_starter
- https://www.drupal.org/project/rocketship_theme_minimal
Some things the resulting themes do:
- Templates, CSS and JS are component-based
- Provides font loading options
- Uses Sass (with globbing) to make CSS
- Can provide Sourcemaps for CSS and JS
- Can generate favicons
- Can generate critical CSS files
- Can generates a custom icon font or icon sprite
- Has better responsive tables
- Can override colors for the Rocketship Paragraphs (or Content Blocks, depending on the version) background-color palette
- Adds styling for Rocketship content types (if using RS Features)
for using the generator script
- php 8.1+
for using the generated themes
- A Dropsolid Rocketship distribution using Rocketship Core 6.1.x
- Node: 18.x
- a recent version of gulp-cli
- dependent Drupal modules:
- responsive_image
- components
- unified_twig_ext
See theme's Readme file for more info on versions and updates
Usage
Generating your theme can be done by running the php script in this module, with options:
php scripts/generate-theme.php
Use these options:
- name: The name of your theme. Don't use dashes or special characters.
- machine-name: the machine name
- theme-path: location of the generated theme relative to where the script is located (the
distfolder inside the module is default) - preset (deprecated, will be removed in the next minor release):
- minimal: a setup with only some basic and structural CSS
- starter: some more styling, including for the Rocketship elements as well
- flex: more styling for the Rocketship elements, following the Rocketship Flex guidelines & presets
- demo: styling and presets for a Demo site
- author: person developing the theme
- description: a short description that goes in the info, composer & README files
So you can see that the themes that will be generated using these presets, will go from very little files & configuration to a very full set of files and configuration.
Generate
You should pass your options in this format (don't forget the single quotes if using spaces):
php scripts/generate-theme.php --name='My theme' --machine-name=my_theme
Examples per theme preset:
php docroot/modules/contrib/rocketship_theme_generator/scripts/generate-theme.php --name='Rocketship theme' --machine-name='rocketship_theme' --preset=starter --theme-path='docroot/themes/custom'
Starter
Comes with some basic styling and Sass/Twig files to get you started.
Contains a bit more pre-defined styles that the Rocketship Minimal theme but less than the Rocketship Flex theme or Rocketship Demo theme: Structural CSS for Paragraphs, Structural CSS for Features
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.- Ecosystem: Dropsolid Rocketship
13 sites report using this module
- Created by rembrandx on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.






