Skip to content

Commit

Permalink
Add manifest.json for PWA functionality
Browse files Browse the repository at this point in the history
On phones that support progressive web apps, adding dokuwiki to
homescreen will make it open in full screen which is nicer.
  • Loading branch information
Omid Hezaveh committed Oct 29, 2017
1 parent e1c5b79 commit 650b459
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inc/template.php
Expand Up @@ -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, '&'),
Expand Down
11 changes: 11 additions & 0 deletions lib/manifest/index.html
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; URL=../../" />
<meta name="robots" content="noindex" />
<title>nothing here...</title>
</head>
<body>
<!-- this is just here to prevent directory browsing -->
</body>
</html>
9 changes: 9 additions & 0 deletions 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."
}

0 comments on commit 650b459

Please sign in to comment.