如何解决我的 drupal 自定义主题未加载其 css 文件
我像这样在drupal中制作了一个自定义主题
我的信息.yml
name: Custom Theme
type: theme
description: 'Custom Theme for My Website.'
package: Other
core: 8.x
libraries:
- custom_theme/global-styling
base theme: classy
regions:
header: Header
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
page_top: 'Page top'
page_bottom: 'Page bottom'
highlighted: Highlighted
featured_top: 'Featured top'
breadcrumb: Breadcrumb
content: Content
sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second'
featured_bottom_first: 'Featured bottom first'
featured_bottom_second: 'Featured bottom second'
featured_bottom_third: 'Featured bottom third'
footer_first: 'Footer first'
footer_second: 'Footer second'
footer_third: 'Footer third'
footer_fourth: 'Footer fourth'
footer_fifth: 'Footer fifth'
我的库.yml
global-styling:
version: 1.x
js:
js/script.js: {}
css:
theme:
css/style.css: {}
但它使用稳定的主题 css 文件而不是我的自定义主题 css。知道为什么吗?
我试图清除现金,这不是问题,我试图像这样覆盖,但我不确定它是否正确并且它也不起作用
libraries-override:
block/drupal.block.admin.css:
css:
theme:
stable/css/block/block.admin.css: false
解决方法
可能是您的 info.yml 和 libraries.yml 没有正确的缩进。应该是这样的
global-styling:
version: VERSION
css:
base:
css/style.css: {}
没有制表符,使用空格。
core: 8.x
type: theme
base theme: classy
name: 'Custom Theme'
description: 'Custom Theme for My Website.'
libraries:
- custom_theme/global-styling
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。