From be1cd32fe35aefdd3888dc6fd954652a2e4aac9e Mon Sep 17 00:00:00 2001 From: zzossig Date: Wed, 18 Dec 2019 19:07:57 +0900 Subject: [PATCH] manifest.json support in static folder --- exampleSite/config/_default/config.toml | 11 +------- exampleSite/config/_default/menus.ko.toml | 34 +++++++++++++++++++++++ exampleSite/layouts/home.webmanifest | 18 ------------ exampleSite/static/manifest.json | 7 +++++ static/manifest.json | 29 +++++++++++++++++++ 5 files changed, 71 insertions(+), 28 deletions(-) create mode 100644 exampleSite/config/_default/menus.ko.toml delete mode 100644 exampleSite/layouts/home.webmanifest create mode 100644 exampleSite/static/manifest.json create mode 100644 static/manifest.json diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index 3a1b36e..c99facd 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -29,16 +29,7 @@ googleAnalytics = "" noClasses = false [outputs] - home = ["HTML", "RSS", "JSON", "WEBMANIFEST"] - -[mediaTypes."application/manifest+json"] - suffixes = ["webmanifest"] - -[outputFormats.webmanifest] - name = "webmanifest" - baseName = "webmanifest" - mediaType = "application/manifest+json" - rel = "manifest" + home = ["HTML", "RSS", "JSON"] [taxonomies] category = "categories" diff --git a/exampleSite/config/_default/menus.ko.toml b/exampleSite/config/_default/menus.ko.toml new file mode 100644 index 0000000..7e9aba2 --- /dev/null +++ b/exampleSite/config/_default/menus.ko.toml @@ -0,0 +1,34 @@ +[[main]] + identifier = "about" + name = "어바웃" + url = "about" + weight = 1 + +[[main]] + identifier = "archive" + name = "아카이브" + url = "archive" + weight = 2 + +[[main]] + identifier = "gallery" + name = "갤러리" + url = "gallery" + weight = 3 + +[[main]] + parent = "gallery" + name = "fiverr" + url = "gallery/mine" + +[[main]] + identifier = "posts" + name = "포스트" + url = "posts" + weight = 4 + +[[main]] + identifier = "notes" + name = "노트" + url = "notes" + weight = 5 diff --git a/exampleSite/layouts/home.webmanifest b/exampleSite/layouts/home.webmanifest deleted file mode 100644 index 815ce34..0000000 --- a/exampleSite/layouts/home.webmanifest +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "{{site.Title}}", - "short_name": "{{site.Title}}", - "lang": "{{site.Language.Lang}}", - "theme_color": "#FF6188", - "background_color": "#2D2A2E", - "icons": [{ - "src": "{{ .Site.BaseURL }}{{ "logo-192.png" }}", - "sizes": "192x192", - "type": "image/png" - }, { - "src": "{{ .Site.BaseURL }}{{ "logo-512.png" }}", - "sizes": "512x512", - "type": "image/png" - }], - "display": "standalone", - "start_url": "{{ "/" | relLangURL }}?utm_source=web_app_manifest" -} diff --git a/exampleSite/static/manifest.json b/exampleSite/static/manifest.json new file mode 100644 index 0000000..c2f24f8 --- /dev/null +++ b/exampleSite/static/manifest.json @@ -0,0 +1,7 @@ +{ + "manifest_version": 2, + "name": "Zzo", + "version": "1.0.0", + "default_locale": "en", + "description": "Hugo blog theme" +} diff --git a/static/manifest.json b/static/manifest.json new file mode 100644 index 0000000..7f1fced --- /dev/null +++ b/static/manifest.json @@ -0,0 +1,29 @@ +{ + "manifest_version": 2, + "name": "My Extension", + "version": "versionString", + "default_locale": "en", + "description": "A plain text description", + "icons": [ + { + "src": "favicon.png", + "sizes": "16x16", + "type": "image/png" + }, { + "src": "logo.png", + "sizes": "48x48", + "type": "image/png" + }, { + "src": "logo-192.png", + "sizes": "192x192", + "type": "image/png" + }, { + "src": "logo-512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "background": { + "persistent": false + } +}