mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Add web app manifest
This commit is contained in:
parent
a11ea2a0ac
commit
9e97357524
4 changed files with 37 additions and 1 deletions
|
@ -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'}],
|
||||
|
|
34
public/manifest.json
Normal file
34
public/manifest.json
Normal file
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
<meta name="robots" content="noodp">
|
||||
<title>DevDocs API Documentation</title>
|
||||
<link rel="canonical" href="<%= canonical_origin %>">
|
||||
<link rel="manifest" href="<%= App.cdn_origin %>/manifest.json">
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="DevDocs Search">
|
||||
<link rel="alternate" href="<%= canonical_origin %>/feed" title="DevDocs" type="application/atom+xml">
|
||||
<link rel="icon" type="image/x-icon" href="<%= App.cdn_origin %>/favicon.ico">
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<meta property="og:image" content="<%= App.cdn_origin %>/images/icon-128.png">
|
||||
<title>DevDocs<%= " — #{@doc['full_name']} documentation (fast, offline)" if doc_index_page? %></title>
|
||||
<link rel="canonical" href="<%= canonical_origin %><%= request.path %>">
|
||||
<link rel="manifest" href="<%= App.cdn_origin %>/manifest.json">
|
||||
<link rel="icon" type="image/x-icon" href="<%= App.cdn_origin %>/favicon.ico">
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs">
|
||||
<link rel="stylesheet" href="<%= main_stylesheet_path %>" data-alt="<%= alternate_stylesheet_path %>">
|
||||
|
|
Loading…
Reference in a new issue