The README for D7 has instructions that apply to D8, specifically:
- Find the line that says
`% include '@amptheme/amp-css/amp-custom-styles.html.twig' %}`
- Change `@amptheme` to @ plus the machine name of your custom theme: the
machine name is whatever the directory name is for your custom theme.
should be removed and instead add something like:
Edit template.php, change:
/**
* Preprocess all templates.
*/
function amptheme_preprocess(&$vars, $hook) {
$vars['amptheme_path_file'] = DRUPAL_ROOT . '/' . drupal_get_path('theme', 'amptheme');
}to:
/**
* Preprocess all templates.
*/
function ampsubtheme_example_preprocess(&$vars, $hook) {
$vars['ampsubtheme_path_file'] = DRUPAL_ROOT . '/' . drupal_get_path('theme', 'ampsubtheme_example');
}
Also remove:
- Copy the `html.html.twig` template from `amptheme` into your custom theme.
and replace with:
- Copy the `html.html.php` template from `amptheme` into your custom theme.
And remove:
- Add a file named `amp-custom-styles.html.twig` to your `amp-css` directory.
- Custom CSS can be placed into the `amp-custom-styles.html.twig`.
and replace with:
- Add a file named `amp-custom-styles.css` to your `css` directory.
- Custom CSS can be placed into the `amp-custom-styles.css`.
Comments
Comment #2
karens commentedComment #3
rainbowarrayMaking some necessary updates to the D8 README first.
Comment #5
rainbowarrayNow making the fixes in the D7 version.
Comment #7
rainbowarray