From 650b459d820c80b8ef9b703fac815bf879d6044d Mon Sep 17 00:00:00 2001 From: Omid Hezaveh Date: Sun, 29 Oct 2017 07:26:46 +0200 Subject: [PATCH] Add manifest.json for PWA functionality On phones that support progressive web apps, adding dokuwiki to homescreen will make it open in full screen which is nicer. --- inc/template.php | 2 +- lib/manifest/index.html | 11 +++++++++++ lib/manifest/manifest.json | 9 +++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 lib/manifest/index.html create mode 100644 lib/manifest/manifest.json diff --git a/inc/template.php b/inc/template.php index 7b16b91421..2a97b10043 100644 --- a/inc/template.php +++ b/inc/template.php @@ -233,8 +233,8 @@ function tpl_metaheaders($alt = true) { 'href'=> DOKU_BASE.'lib/exe/opensearch.php', 'title'=> $conf['title'] ); } - $head['link'][] = array('rel'=> 'start', 'href'=> DOKU_BASE); + $head['link'][] = array('rel'=> 'manifest', 'href'=> DOKU_BASE.'lib/manifest/manifest.json'); if(actionOK('index')) { $head['link'][] = array( 'rel' => 'contents', 'href'=> wl($ID, 'do=index', false, '&'), diff --git a/lib/manifest/index.html b/lib/manifest/index.html new file mode 100644 index 0000000000..977f90e107 --- /dev/null +++ b/lib/manifest/index.html @@ -0,0 +1,11 @@ + + + + + +nothing here... + + + + + diff --git a/lib/manifest/manifest.json b/lib/manifest/manifest.json new file mode 100644 index 0000000000..8884a80912 --- /dev/null +++ b/lib/manifest/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "DokuWiki", + "short_name": "DokuWiki", + "start_url": ".", + "display": "standalone", + "background_color": "#fff", + "description": "A simple to use and highly versatile open source wiki software." +} +