How you can create own theme on Drupal 8

Drupal: 
Difficulty level: 

The most stable theme for Drupal 8 at this time is Bartik. Site works fine with Bartik, although it is possible to improve its appearance and optimize it deleting unnecessary files and scripts. But it is not a good idea to edit Bartik and other core files, this is why you need to copy it and create a new theme.

Clone of Bartik for Drupal 8 is Thisis, download here: https://www.drupal.org/sandbox/tlito/2611000

How to create own theme by copying Bartik:

  1. Copy folder /core/themes/bartik to your PC.
  2. Replace the word bartik with new theme name (for example site_theme) in all drupal-files in the root of that folder, also in all files in folders templates, color, also in this file: config/schema/bartik.schema.yml
    I work on it with Geany (Linux) opening all files together and doing replacement in session, for Windows there was Text Replace TR. Or you can try bash command sed.
  3. Rename all files that contain word bartik in filename, change this word with your theme name f.e. site_theme
  4. Change theme folder name to site-theme, as you can see, in filenames space replaces with symbol bottom line "_", but the folder name will have dash "-". If you want to prevent mess use one word like sitetheme.
  5. Upload your new theme to the folder themes.
  6. Install and set default in "Appearance"

When it is ok you will can edit new theme files, scripts, styles and so on. Also you can edit screenshot for commodity.

This guidelines are completed in a clone of Bartik - Thisis, also screenshot has little changes. No other changes. Download Thisis - clone of Bartik from core Drupal 8.0.0-rc3.

Download Thisis from Drupal.org

Download Thisis from Dropbox

Category: