diff --git a/lib/app.rb b/lib/app.rb index 3841bde3..45d08270 100644 --- a/lib/app.rb +++ b/lib/app.rb @@ -74,7 +74,7 @@ class App < Sinatra::Application use Rack::Deflater use Rack::Static, root: 'public', - urls: %w(/assets /docs/ /images /favicon.ico /robots.txt /opensearch.xml /mathml.css), + urls: %w(/assets /docs/ /images /favicon.ico /robots.txt /opensearch.xml /mathml.css /manifest.json), header_rules: [ [:all, {'Cache-Control' => 'no-cache, max-age=0'}], ['/assets', {'Cache-Control' => 'public, max-age=604800'}], diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 00000000..c3ddeca4 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "DevDocs", + "short_name": "DevDocs", + "description": "API Documentation Browser", + "start_url": "/", + "display": "standalone", + "icons": [ + { + "src": "/images/webapp-icon-32.png", + "sizes": "32x32", + "type": "image/png" + }, + { + "src": "/images/webapp-icon-60.png", + "sizes": "60x60", + "type": "image/png" + }, + { + "src": "/images/webapp-icon-80.png", + "sizes": "80x80", + "type": "image/png" + }, + { + "src": "/images/webapp-icon-128.png", + "sizes": "128x128", + "type": "image/png" + }, + { + "src": "/images/webapp-icon-256.png", + "sizes": "256x256", + "type": "image/png" + } + ] +} diff --git a/views/index.erb b/views/index.erb index 2e8edf9c..31304e8c 100644 --- a/views/index.erb +++ b/views/index.erb @@ -17,6 +17,7 @@