mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +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:
parent
4c4183228f
commit
f5af4768eb
27 changed files with 81 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue