Registering your Drupal Theme


The first thing to do is register the theme you are going to create and then set it to the default theme.

First create a folder for your theme on your computer. Give it the name of your theme. I’m going to call mine “simplicity”

Then with Notepad, or whatever text editor you use, save a file called in that folder – replace “yourtheme” with the name of your theme.

In that file you then save the following:

name: Your Theme
type: theme
description: 'A very simple theme for a simple but attractive responsive Drupal website'
core_version_requirement: ^8 || ^9
base theme: false

Of course, once again, replace Your Theme with the name of your theme.

On your server, in your Drupal installation, in the “themes” folder create a new folder called “custom”. You then upload your folder containing the .info.yml file into the “custom” folder.

Now go to Drupal and go to the Appearance page. You should see your theme under the list of Uninstalled Themes. Click “Install and set as default”.

Now, when you view the website you will have completely unstyled content. We now have to create a stylesheet and point Drupal to it.

Leave a Reply

Your email address will not be published. Required fields are marked *