docbrown/app/views/service_worker/manifest.json.erb
Ridhwana e74890680a
Generalize meta content and copyright year (#6887)
* chore: remove the description

* feat: change the meta og:site_name property from The Practical DEV to The <COMMUNITY_NAME> Community consistently

* refactor: change the canonical link to be more dynamic using the <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %>

* refactor: update the path to be dynamic

* refactor: change some other meta properties to be dynamic

* refactor: update the index

* refactor: update the sitename to just read <%= ApplicationConfig["COMMUNITY_NAME"] %> Community

* feat: copyright year should be dynamic

* feat: change the meta og:url content to be dynamic by using <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> for the former part of the url

* feat: space

* refactor: move the copyright notice to a helper

* refactor: use the community_qualified_name helper!

* refactor: start year is already a string

* refactor: use app url helper instead of <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> everywhere

* chore:oops

* refactor: Change  <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> to `<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">` consistently.

* refactor: Replace  `<meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" />` with `  <meta property="og:image" content="<%= SiteConfig.main_social_image %>" />`

* chore: update some other meta's

* feat: replace 'The Practical DEV' with 'DEV Community' and

* test: remove The :)

* test: copyright_notice

* fix: syntax error

* feat: name of community

* refactor: use app url

* fix: template strings

* fix: tag

* feat: update the app url parameters

* feat: add a community_name helper so we don't have to refer to an environment variable in the templates

* feat: take into account the case when the start year is a blank string

* feat: single quotes to double quotes

* test: add a test for the #community_name

* chore: update or codeclimate

* chore: amend the community helper

* refactor: use the community_name helper in here

* feat: update ApplicationConfig["COMMUNITY_NAME"]  with community_name

* fix: Time.current.year needs to be a string :(

* chore: extra space

* chore: change to use community_qualified_name
2020-03-31 16:15:57 +02:00

26 lines
866 B
Text

{
"name": "<%= community_qualified_name %>",
"short_name": "<%= ApplicationConfig["APP_DOMAIN"] %>",
"description": "<%= SiteConfig.community_description %>",
"start_url": "/",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"homepage_url": "<%= app_url %>",
"icons": [{
"src": "<%= ApplicationController.helpers.cloudinary(SiteConfig.logo_png, 192, "png") %>",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
}, {
"src": "<%= ApplicationController.helpers.cloudinary(SiteConfig.logo_png, 128, "png") %>",
"sizes": "128x128",
"type": "image/png",
"purpose": "any maskable"
}, {
"src": "<%= ApplicationController.helpers.cloudinary(SiteConfig.logo_png, 512, "png") %>",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}]
}