mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FEATURE: Add web manifest for Chrome users.
This commit is contained in:
15
app/controllers/manifest_json_controller.rb
Normal file
15
app/controllers/manifest_json_controller.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class ManifestJsonController < ApplicationController
|
||||
layout false
|
||||
skip_before_filter :preload_json, :check_xhr
|
||||
|
||||
def index
|
||||
manifest = {
|
||||
short_name: SiteSetting.title,
|
||||
display: 'browser',
|
||||
orientation: 'portrait',
|
||||
start_url: "#{Discourse.base_uri}/"
|
||||
}
|
||||
|
||||
render json: manifest.to_json
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user