A bare bones Drupal 9 starter theme
- Move `starter_theme` into your local site under /themes/custom/SITE_THEME_NAME
- Don’t bring along the .git folder or .gitignore file
- Replace all filenames and code instances of “starter_theme” with the new theme name
- Visit /admin/appearance and find your new theme, click “Install and set as default”
- Add /themes/custom/SITE_THEME_NAME/screenshot.png
- Review block assignments: /admin/structure/block
- Should only be dealing with 3 regions to start; header, content, footer
- Now we start introducing the custom theme framework. Update the 2 included global libraries assets/css/custom/custom.css assets/js/custom/custom.js https://www.drupal.org/docs/8/theming/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-theme
- Define your conditional libraries. For any plugin or asset that is not global, you should define it as a separate library for inclusion conditionally via twig. For example, a library for fancybox could be defined, and only included from within a views-view—gallery.html.twig
- From any .twig file you can include “{{ attach_library('SITE_THEME_NAME/CUSTOM_LIBRARY') }}
- Introduce markup from the prototypes into the theme templates: /themes/custom/SITE_THEME_NAME/templates/ layout/html.html.twig pages/page.html.twig pages/page—front.html.twig
- Update paths for hardcoded images and favicons, including favicon XML and JSON files if applicable.
- Continue with template overrides as needed.