i13e / sourceinjector
直接将HTML/JS/CSS片段注入Neos CMS后端至前端页面
1.1.1
2022-02-15 09:16 UTC
Requires
- neos/fusion: >=5.3
- neos/fusion-afx: *
- neos/neos: >=5.3
README
直接将HTML/JS/CSS片段注入Neos CMS后端至前端页面
此包允许编辑器直接从后端将HTML、JS或CSS片段注入到首页。
安装
运行composer require i13e/sourceinjector
。
用法
安装后,您应能够在文档树中放置一个“注入”节点。
之后,添加您喜欢的“注入”节点,并添加尽可能多的“代码”节点到其中。
默认情况下,只有Neos.Neos:Administrator
权限用户能够管理注入。所有其他用户应被赋予I13e.SourceInjector:InjectionEditor
权限以使注入可编辑。
如果您不使用head
、closingHeadTag
、body
或closingBodyTag
,请调整注入输出以满足您的需求。请参阅Override/Page.fusion
headStart = I13e.SourceInjector:Action.Inject {
@position = 'before head'
position = 'head_start'
}
headEnd = I13e.SourceInjector:Action.Inject {
@position = 'before closingHeadTag'
position = 'head_end'
}
bodyStart = I13e.SourceInjector:Action.Inject {
@position = 'before body'
position = 'body_start'
}
bodyEnd = I13e.SourceInjector:Action.Inject {
@position = 'before closingBodyTag'
position = 'body_end'
}
}
设置
可用的设置不多。
I13e: SourceInjector: enableDebugComments: false # Default: false, output HTML-Comments before & after each injection code
路线图
在功能版本中,我们可能会实现更多功能,例如
贡献
如果您想贡献,只需创建一个pull-request。
自豪地开发于汉诺威地区