Merge branch 'master' into development
* master: Add a refrence to themes_path realpath returns the canonicalized absolute pathname Dont set theme-variant if there is none Add Vulkan Tutorial to list of sites using the framework
This commit is contained in:
commit
f4cfa35c59
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -30,16 +30,20 @@ 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;
|
||||
}
|
||||
|
||||
$theme = explode('-', $params['html']['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);
|
||||
}
|
||||
|
||||
$params['html']['theme-variant'] = array_pop($theme);
|
||||
$params['html']['theme'] = implode('-', $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");
|
||||
}
|
||||
}
|
||||
|
Laden…
Verwijs in nieuw issue
Block a user