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

KarenS created an issue. See original summary.

karens’s picture

Issue summary: View changes
rainbowarray’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

Making some necessary updates to the D8 README first.

  • mdrummond committed 656ba2d on 8.x-1.x
    Issue #2696435 by mdrummond: D7 README has D8 instructions
    
rainbowarray’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev

Now making the fixes in the D7 version.

  • mdrummond committed dfc40be on 7.x-1.x
    Issue #2696435 by mdrummond: D7 README has D8 instructions
    
rainbowarray’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.