Module: Asciidoctor::Html::Webmanifest

Defined in:
lib/asciidoctor/html/webmanifest.rb

Overview

Generates the site.webmanifest

Class Method Summary collapse

Class Method Details

.generate(name, short_name) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/asciidoctor/html/webmanifest.rb', line 9

def self.generate(name, short_name)
  {
    name:,
    short_name:,
    icons: %w[192x192 512x512].map do |sizes|
      {
        src: "#{FAVICON_PATH}/web-app-manifest-#{sizes}.png",
        sizes:,
        type: "image/png",
        purpose: "maskable"
      }
    end,
    theme_color: "#ffffff",
    background_color: "#ffffff",
    display: "standalone"
  }.to_json
end