From ab2cc49845651614f7f544b63f8c7b6c7d9272b4 Mon Sep 17 00:00:00 2001 From: Alexander Overvoorde Date: Wed, 27 Jul 2016 20:05:25 +0200 Subject: [PATCH 1/4] Add Vulkan Tutorial to list of sites using the framework --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index af8fc5b..9958a3d 100755 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ This is a list of sites using Daux.io: * [wallabag](http://doc.wallabag.org/index) * [iGeo-Topo](http://igeo-topo.fr/doc) * [Cumulus TV: Android TV app that turns any stream/page into a Live Channel](http://cumulustv.herokuapp.com) +* [Vulkan Tutorial](https://vulkan-tutorial.com) Do you use Daux.io? Send me a pull request or open an [issue](https://github.com/justinwalsh/daux.io/issues) and I will add you to the list. From 15c4da62d997a4d3cf4598c44e25345c127a11fd Mon Sep 17 00:00:00 2001 From: Sam Hermans Date: Thu, 28 Jul 2016 10:59:54 +0300 Subject: [PATCH 2/4] Dont set theme-variant if there is none --- libs/DauxHelper.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/DauxHelper.php b/libs/DauxHelper.php index 950848d..bdd6aee 100644 --- a/libs/DauxHelper.php +++ b/libs/DauxHelper.php @@ -35,9 +35,13 @@ class DauxHelper } $theme = explode('-', $params['html']['theme']); - - $params['html']['theme-variant'] = array_pop($theme); - $params['html']['theme'] = implode('-', $theme); + // do we have a variant or only a theme ? + if(isset($theme[1])) { + $params['html']['theme-variant'] = array_pop($theme); + $params['html']['theme'] = implode('-', $theme); + } else { + $params['html']['theme'] = array_pop($theme); + } if (!is_dir($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])) { throw new \RuntimeException("Theme '{$params['html']['theme']}' not found"); From 9f3a31aeab2fd3ae5d8553d35f47e82bb839175a Mon Sep 17 00:00:00 2001 From: Sam Hermans Date: Thu, 28 Jul 2016 11:18:24 +0300 Subject: [PATCH 3/4] realpath returns the canonicalized absolute pathname --- libs/DauxHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/DauxHelper.php b/libs/DauxHelper.php index bdd6aee..f82a685 100644 --- a/libs/DauxHelper.php +++ b/libs/DauxHelper.php @@ -30,7 +30,7 @@ class DauxHelper return; } - if (is_dir($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])) { + if (is_dir(realpath(($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])))) { return; } @@ -43,7 +43,7 @@ class DauxHelper $params['html']['theme'] = array_pop($theme); } - if (!is_dir($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])) { + if (!is_dir(realpath(($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])))) { throw new \RuntimeException("Theme '{$params['html']['theme']}' not found"); } } From 2f314c2d9603099379615f712f7f49eda08796f7 Mon Sep 17 00:00:00 2001 From: Sam Hermans Date: Thu, 28 Jul 2016 11:22:22 +0300 Subject: [PATCH 4/4] Add a refrence to themes_path I had to check the source for this option --- docs/10_For_Developers/Creating_a_Theme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/10_For_Developers/Creating_a_Theme.md b/docs/10_For_Developers/Creating_a_Theme.md index 0f7be4b..dada75e 100644 --- a/docs/10_For_Developers/Creating_a_Theme.md +++ b/docs/10_For_Developers/Creating_a_Theme.md @@ -71,6 +71,8 @@ Change the `theme` option inside `html` The name of the theme, is the folder name. +You can use the `themes_path` setting if you want to specify a custom location of your theme folder. + A variant is optional, if you want to add one, separate it from the theme with a dash. ## Overriding templates