diff --git a/haywire.php b/haywire.php index db2228a..26f7e01 100644 --- a/haywire.php +++ b/haywire.php @@ -27,13 +27,12 @@ public function onThemeInitialized() public function onTwigSiteVariables() { - $path = $this->grav['base_url'] . $this->config['theme']['assetPath']; $manifest = __DIR__ . '/dist/mix-manifest.json'; if (file_exists($manifest)) { $assets = json_decode(file_get_contents($manifest), true); - $this->grav['assets']->addJs($path . $assets['/js/app.js'], ['group' => 'bottom']); - $this->grav['assets']->addCss($path . $assets['/css/app.css']); + $this->grav['assets']->addJs('theme://dist/' . $assets['/js/app.js'], ['group' => 'bottom']); + $this->grav['assets']->addCss('theme://dist/' . $assets['/css/app.css'],10); } } diff --git a/haywire.yaml b/haywire.yaml index 800ebfe..a060a8c 100644 --- a/haywire.yaml +++ b/haywire.yaml @@ -1,5 +1,3 @@ -assetPath: /user/themes/haywire/dist - enabled: true dropdown: enabled: true diff --git a/templates/partials/base.html.twig b/templates/partials/base.html.twig index d2309c5..d82ae94 100644 --- a/templates/partials/base.html.twig +++ b/templates/partials/base.html.twig @@ -17,8 +17,6 @@ {% include 'partials/footer.html.twig' %} -{% block bottom %} - {{ assets.js('bottom') }} -{% endblock %} +{{ assets.js('bottom') }}