People with write permissions for a repository can add a theme to a site using Jekyll.
Adding a theme
Navigate to _config.yml.
Add a new line to the file for the theme name.
- To use a supported theme, type
theme: THEME-NAME
, replacing THEME-NAME with the name of the theme as shown in the_config.yml
of the theme's repository (most themes follow ajekyll-theme-NAME
naming convention). For a list of supported themes, see "Supported themes" on the site. For example, to select the Minimal theme, typetheme: jekyll-theme-minimal
. - To use any other Jekyll theme hosted on , type
remote_theme: THEME-NAME
, replacing THEME-NAME with the name of the theme as shown in the README of the theme's repository.
- To use a supported theme, type
Customizing your theme's CSS
Create a new file called /assets/css/style.scss.
Add the following content to the top of the file:
Add any custom CSS or Sass (including imports) you'd like immediately after the
@import
line.
Customizing your theme's HTML layout
On , navigate to your theme's source repository. For example, the source repository for Minimal is https://github.com/pages-themes/minimal.
In the _layouts folder, navigate to your theme's default.html file.
Copy the contents of the file.
Create a file called _layouts/default.html.
Paste the default layout content you copied earlier.
Customize the layout as you'd like.