Hi guys, I am very horrible with design skill so to build a website more beautiful I bought a template with a lot html, css js and is very pretty. I tried put the files on
assets/css etc; and after on
assets/vendor/* but no successful. When load the page no one css, js, image, nothing is loaded. Where I put this file?!?! I didn’t really understand how Esbuild works besides it’s been a long time without writing a few lines of code with Phoenix.
priv/static/ has only the default files when build a new project.
Assets that need no preprocessing (such the ones associated with your template) should go directly under
See also: Asset Management — Phoenix v1.6.2
Thank you it is solve. But has just one little problem, all files on template refer to
/assets/..., and the assets folder on
priv/static is annotated in gitignore. So I would have that change all this or is better change the default place to
app.css files of phoenix?
Things that live under
/assets are processed by tools. On a fresh Phoenix 1.6 that’s esbuild. It outputs stuff into
/priv/static/assets, that’s why
.gitignored - you commit the non-processed files (
/assets) not the outputs (
I would suggest:
- Putting the CSS and JS files from the template under
- Changing the paths in the templates from