mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Multi-file javascript support for themes (#7526)
You can now add javascript files under `/javascripts/*` in a theme, and they will be loaded as if they were included in core, or a plugin. If you give something the same name as a core/plugin file, it will be overridden. Support file extensions are `.js.es6`, `.hbs` and `.raw.hbs`.
This commit is contained in:
@@ -431,6 +431,11 @@ module ApplicationHelper
|
||||
&.html_safe
|
||||
end
|
||||
|
||||
def theme_js_lookup
|
||||
Theme.lookup_field(theme_ids, :extra_js, nil)
|
||||
&.html_safe
|
||||
end
|
||||
|
||||
def discourse_stylesheet_link_tag(name, opts = {})
|
||||
if opts.key?(:theme_ids)
|
||||
ids = opts[:theme_ids] unless customization_disabled?
|
||||
|
||||
Reference in New Issue
Block a user