Skip to content

A bare bones Drupal starter theme for version 9 and beyond.

License

Notifications You must be signed in to change notification settings

ben-hamelin/starter_theme

Repository files navigation

starter_theme

A bare bones Drupal 9 starter theme

  1. Move `starter_theme` into your local site under /themes/custom/SITE_THEME_NAME
  2. Don’t bring along the .git folder or .gitignore file
  3. Replace all filenames and code instances of “starter_theme” with the new theme name
  4. Visit /admin/appearance and find your new theme, click “Install and set as default”
  5. Add /themes/custom/SITE_THEME_NAME/screenshot.png
  6. Review block assignments: /admin/structure/block
  7. Should only be dealing with 3 regions to start; header, content, footer
  8. 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
  9. 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
  10. From any .twig file you can include “{{ attach_library('SITE_THEME_NAME/CUSTOM_LIBRARY') }}
  11. 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
  12. Update paths for hardcoded images and favicons, including favicon XML and JSON files if applicable.
  13. Continue with template overrides as needed.

About

A bare bones Drupal starter theme for version 9 and beyond.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published