lazerlyte
I don’t know if there’s a different, even a better way to achieve this but I’ve been doing this and works without any problem:
Place your CSS file in /themes/yourtheme/assets/css/yourfile.css
and your JS file in /themes/yourtheme/assets/js/yourfile.js
Then edit /themes/yourtheme/_meta/assets.json
Should look something like this:
{
"doctype": "html5",
"favicon": "favicon.ico",
"meta": [
],
"css": [
{
"path": "yourtheme/assets/css/yourfile.css",
"name": "your-file-css"
},
{
_......more css..._
},
],
"js": [
{
"path": "yourtheme/assets/js/yourfile.js",
"name": "your-file-js"
},
{
_......more js..._
},
],
Your layout has to call the scripts, I keep using the partial from orange-theme for all my layouts.
<?= partial('scripts'); ?>
Hope this help.
Remember you can sponsor both on OpenCollective and GitHub.
https://forum.tastyigniter.com/d/1408-tastyigniter-is-now-on-github-sponsors-and-opencollective