Skip to content

Instantly share code, notes, and snippets.

@imhamad
Forked from steffenr/themename.info.yml
Created November 5, 2020 10:41
Show Gist options
  • Save imhamad/09b18ab2be6490af8666860af0595554 to your computer and use it in GitHub Desktop.
Save imhamad/09b18ab2be6490af8666860af0595554 to your computer and use it in GitHub Desktop.
Embed external fonts in Drupal 8 theme (fonts are added in custom themename.libraries.yml)
name: Theme name
type: theme
description: Theme description
package: Custom
core: 8.x
libraries:
- themename/fonts
- themename/global-styling
base theme: classy
# Regions
regions:
header: 'Header'
primary_menu: 'Navigation'
highlighted: 'Preface'
content: 'Content'
footer: 'Footer'
fonts:
license:
name: Apache License, 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
css:
theme:
'//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800': { type: external }
global-styling:
version: 1.x
css:
theme:
css/bootstrap/bootstrap.min.css: {}
css/custom.css: {}
js:
js/bootstrap.min.js: {}
js/custom.js: {}
dependencies:
- core/jquery
- core/jquery.once
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment