mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 14:01:14 +08:00
FEATURE: add clean support for running Discourse in a subfolder
To setup set DISCOURSE_RELATIVE_URL_ROOT to the folder you wish
This commit is contained in:
@ -114,12 +114,16 @@ class DiscourseStylesheets
|
||||
"#{GlobalSetting.cdn_url}#{stylesheet_relpath}?__ws=#{Discourse.current_hostname}"
|
||||
end
|
||||
|
||||
def root_path
|
||||
"#{GlobalSetting.relative_url_root}/"
|
||||
end
|
||||
|
||||
def stylesheet_relpath
|
||||
"/#{CACHE_PATH}/#{stylesheet_filename}"
|
||||
"#{root_path}#{CACHE_PATH}/#{stylesheet_filename}"
|
||||
end
|
||||
|
||||
def stylesheet_relpath_no_digest
|
||||
"/#{CACHE_PATH}/#{stylesheet_filename_no_digest}"
|
||||
"#{root_path}#{CACHE_PATH}/#{stylesheet_filename_no_digest}"
|
||||
end
|
||||
|
||||
def stylesheet_filename
|
||||
|
Reference in New Issue
Block a user