Skip to content

Commit 0627cfd

Browse files
committed
Update themes/customization/index.md
1 parent dcb3bc1 commit 0627cfd

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

docs/themes/customization/index.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,18 @@ brew install wellington
9494
2. Скопируйте файл YAML темы из темы, которую вы наследуете (или из папки `user/config/themes`, если вы её настроили), в `/user/themes/mytheme/mytheme.yaml` и добавьте следующий контент (заменив `user/themes/quark` названием темы, которую вы наследуете):
9595

9696
```yaml
97-
streams:
98-
schemes:
99-
theme:
100-
type: ReadOnlyStream
101-
prefixes:
102-
'':
103-
- user/themes/mytheme
104-
- user/themes/quark
97+
streams:
98+
schemes:
99+
theme:
100+
type: ReadOnlyStream
101+
prefixes:
102+
'':
103+
- 'user/themes/mytheme'
104+
- 'user/themes/quark'
105105
```
106106

107+
ПРИМЕЧАНИЕ: В вашем `mytheme.yaml` необходимо использовать одинарные кавычки для префиксов в версии 1.7. В более старой документации кавычки не использовались (`- user/themes/mytheme - user/themes/quark`). Неправильное использование кавычек в `mytheme.yaml` может привести к фатальной ошибке при активации вашей новой темы: `Template "@images/grav-logo.svg" is not defined in "partials/logo.html.twig" at line 7.`
108+
107109
3. Скопируйте файл `/user/themes/quark/blueprints.yaml` в `/user/themes/mytheme/blueprints.yaml`, чтобы включить настраиваемые элементы темы в админку.
108110

109111
4. Измените тему по умолчанию, чтобы использовать новую **mytheme**, отредактировав параметр `pages: theme:` в вашем файле конфигурации `user/config/system.yaml`:

0 commit comments

Comments
 (0)