Build webmanifest file from FrontMatter or YAML
Note, bold API properties are Mandatory within a given scope
This repository depends upon Jekyll which is supported by GitHub Pages, further details about setup can be found from documentation published by the Jekyll maintainers regarding GitHub Pages.
This repository encourages the use of Git Submodules to track dependencies
Bash Variables
_module_name='webmanifest'
_module_https_url="https://github.com/liquid-utilities/webmanifest.git"
_module_base_dir='_layouts/modules'
_module_path="${_module_base_dir}/${_module_name}"Bash Submodule Commands
cd "<your-git-project-path>"
git checkout gh-pages
mkdir -vp "${_module_base_dir}"
git submodule add -b main\
--name "${_module_name}"\
"${_module_https_url}"\
"${_module_path}"Suggested additions for your ReadMe.md file so everyone has a good time with submodules
Clone with the following to avoid incomplete downloads
git clone --recurse-submodules <url-for-your-project>
Update/upgrade submodules via
git submodule update --init --merge --recursivegit add .gitmodules
git add "${_module_path}"
## Add any changed files too
git commit -F- <<'EOF'
:heavy_plus_sign: Adds `liquid-utilities/webmanifest#1` submodule
**Additions**
- `.gitmodules`, tracks submodules AKA Git within Git _fanciness_
- `README.md`, updates installation and updating guidance
- `_modules_/webmanifest`, Build `webmanifest` file from FrontMatter or YAML
EOF
git push origin gh-pages🎉 Excellent 🎉 your project is now ready to begin unitizing code from this repository!
site.webmanifest
---
layout: modules/webmanifest/webmanifest
name: Liquid Utilities -- Site Web Manifest Example
short_name: Site Web Manifest Example
icons:
filter: relative_url
- src: assets/images/icons/android-chrome-192x192.png
purpose: monochrome
sizes: 192x192
type: image/png
- src: assets/images/icons/android-chrome-384x384.png
filter: absolute_url
type: image/png
---{
"name": "Liquid Utilities -- Site Web Manifest Example",
"short_name": "Site Web Manifest Example",
"icons": [
{
"src": "/webmanifest/assets/images/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "https://liquid-utilities.github.io/webmanifest/assets/images/icons/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}Documentation of available FrontMatter/YAML configurations
Liquid filter absolute_url or relative_url to use for src and url keys
Type: absolute_url | relative_url | false
Mandatory: false
filter: relative_urlhttps://jekyllrb.com/docs/liquid/filters/
Background color for application prior to loading style-sheet
Type: string Mandatory: false
background_color: redList of categories that application belongs to
YAML Type: string | array Result Type: string[] Mandatory: false
categories:
- books
- education
- medicalExplanation of what the application does
Type: string Mandatory: false
description: Example PWA (Progressive Web Application) configured by `liquid-utilities/webmanifest`Direction of text, auto, ltr (left-to-right), or rtl (right-to-left)
Type: auto | ltr | rtl
Mandatory: false
dir: ltrPreferred display mode for website; fullscreen, standalone, minimal-ui, or browser
Type: fullscreen | standalone | minimal-ui | browser
Mandatory: false
display: standaloneCertification code from IARC (International Age Rating Coalition) for application
Type: string Mandatory: false
iarc_rating_id: e84b072d-71b3-4d3e-86ae-31a8ce4e53b7https://www.globalratings.com/for-developers.aspx
Array of dictionaries that describe image assets used by application
Type: dictionary Mandatory: true
icons:
filter: relative_url
- src: assets/images/icons/android-chrome-192x192.png
purpose: monochrome
sizes: 192x192
type: image/png
- src: assets/images/icons/android-chrome-384x384.png
filter: absolute_url
type: image/pngOverwrite or set filter for icons scoped data
Type: filter
Mandatory: false
icons:
filter: relative_urlOverwrite or set filter for specific icon
Type: filter
Mandatory: false
icons:
- src: '...'
filter: absolute_urlPath to image file, if relative the base URL will be of the manifest file
Type: string Mandatory: true
icons:
- src: assets/images/icons/android-chrome-192x192.pngSpace-separated string of image dimensions
Type: string Mandatory: false
icons:
- src: '...'
sizes: 192x192Media type of image which allows user agent to quickly ignore unsupported types
Type: MIME Mandatory: false
icons:
- src: '...'
type: image/pngSpace-separated string of hints as to image special purpose
Type: monochrome | maskable | any
Mandatory: false
icons:
- src: '...'
purpose: monochromehttps://w3c.github.io/manifest/#purpose-member
Specify primary language for the manifest values
Type: string Mandatory: false
lang: en-USName of the application
Type: string Mandatory: true
name: Liquid Utilities -- Site Web Manifest ExampleType: string Mandatory: false
anynaturallandscapelandscape-primarylandscape-secondaryportraitportrait-primaryportrait-secondary
orientation: anyIf true the user agent might suggest installing on of the related_applications listed
Type: boolean Mandatory: false
prefer_related_applications: trueMDN -- prefer_related_applications
Type: dictionary[] Mandatory: false
protocol_handlers:
filter: relative_url
- protocol: web+jngl
url: lookup?type%s
- protocol: web+jnglstore
filter: absolute_url
url: shop?for=%sOverwrite or set filter for protocol_handlers scoped data
Type: filter
Mandatory: false
icons:
filter: relative_urlHTTPS URL within the application scope, not %s will be replaced by the URL
Type: string Mandatory: true
protocol_handlers:
- protocol: '...'
url: lookup?type%sProtocol to be handled, eg mailto, ms-word, web+jngl
Type: string Mandatory: true
protocol_handlers:
- protocol: web+jngl
url: '...'Array of objects of applications that are installable or accessible to platform
Type: dictionary[] Mandatory: false
related_applications:
- platform: play
url: https://play.google.com/store/apps/details?id=com.example.app1
id: com.example.app1
- platform: itunes
url: https://itunes.apple.com/app/example-app1/id123456789Platform an equivalent application may be found
chrome_web_storeplayituneswebappwindows
related_applications:
- platform: playhttps://github.com/w3c/manifest/wiki/Platforms
URL at which the application can be found
related_applications:
- platform: '...'
url: https://play.google.com/store/apps/details?id=com.example.app1ID used to represent the application on the specified platform
related_applications:
- platform: '...'
id: com.example.app1Defines the navigation scope of web application context
Type: string Mandatory: false
scope: appNote, if path is not an absolute URL then
filtermay be used to transmute path into a relative or absolute URL
Array of dictionaries that define screenshots to showcase application
Type: dictionary[] Mandatory: false
screenshots:
filter: relative_url
- src: assets/images/screenshots/screenshot1.webp
sizes: 1280x780
type: image/webp
- src: assets/images/screenshots/screenshot2.webp
filter: absolute_url
sizes: 1280x720
type: image/webpOverwrite or set filter for screenshots scoped data
Type: filter
Mandatory: false
screenshots:
filter: relative_urlOverwrite or set filter for specific screenshot
Type: filter
Mandatory: false
screenshots:
- src: '...'
filter: absolute_urlPath to image file
Type: string
Mandatory: true
screenshots:
- src: assets/images/screenshots/screenshot1.webpImage dimensions
Type: string
Mandatory: false
screenshots:
- src: '...'
sizes: 1280x720Media type of image which allows user agent to quickly ignore unsupported types
screenshots:
- src: '...'
type: image/webpDisplayed if there is not enough space to display name
Type: string Mandatory: false
short_name: Site Web Manifest ExampleArray of dictionaries that may build context menu displayed by Operating System
Type: dictionary[] Mandatory: false
shortcuts:
filter: absolute_url
- name: "Today's agenda"
filter: relative_url
short_name: Agenda
description: List of events planned for today
url: today
icons:
filter: relative_url
- purpose: monochrome
sizes: 120x120
src: assets/images/shortcuts/agenda/medium.webp
type: image/webp
- src: assets/images/shortcuts/agenda/small.webp
filter: absolute_url
sizes: 90x90
type: image/webp
- name: New event
url: create/event
- name: New reminder
url: create/reminderOverwrite or set filter for shortcuts scoped data
Type: filter
Mandatory: false
shortcuts:
filter: relative_urlOverwrite or set filter for specific shortcut
Type: filter
Mandatory: false
shortcuts:
- name: "..."
filter: relative_urlDisplayed in context menu
Type: string Mandatory: true
shortcuts:
- name: "Today's agenda"Displayed when there is insufficient space to display name for shortcut
Type: string Mandatory: false
shortcuts:
- name: "..."
short_name: AgendaDescribes purpose of shortcut, may be exposed via assistive technology
Type: string Mandatory: false
shortcuts:
- name: "..."
description: List of events planned for todayURL within application that is opened by shortcut
Type: string Mandatory: true
shortcuts:
- name: "..."
url: todayIcons that may be used in the context menu for shortcut
Type: icons
Mandatory: false
Base URL of application that should be loaded on launch of application
Type: string Mandatory: false
start_url: /Note, if path is not an absolute URL then
filtermay be used to transmute path into a relative or absolute URL
Default theme color for application, sometimes shown in task switcher
Type: string Mandatory: false
theme_color: redThis repository may not be feature complete and/or fully functional, Pull Requests that add features or fix bugs are certainly welcomed.
Options for contributing to webmanifest and liquid-utilities
Start making a Fork of this repository to an account that you have write permissions for.
- Add remote for fork URL. The URL syntax is
[email protected]:<NAME>/<REPO>.git...
cd ~/git/hub/liquid-utilities/webmanifest
git remote add fork [email protected]:<NAME>/webmanifest.git- Commit your changes and push to your fork, eg. to fix an issue...
cd ~/git/hub/liquid-utilities/webmanifest
git commit -F- <<'EOF'
:bug: Fixes #42 Issue
**Edits**
- `<SCRIPT-NAME>` script, fixes some bug reported in issue
EOF
git push fork mainNote, the
-uoption may be used to setforkas the default remote, eg.git push -u fork mainhowever, this will also default theforkremote for pulling from too! Meaning that pulling updates fromoriginmust be done explicitly, eg.git pull origin main
- Then on GitHub submit a Pull Request through the Web-UI, the URL syntax is
https://github.com/<NAME>/<REPO>/pull/new/<BRANCH>
Note; to decrease the chances of your Pull Request needing modifications before being accepted, please check the dot-github repository for detailed contributing guidelines.
Build `webmanifest` file from FrontMatter or YAML
Copyright (C) 2021 S0AndS0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For further details review full length version of AGPL-3.0 License.