Closed tanguilp closed 4 months ago
Ah there may be a step missing from the docs, you need to include something like this in your template: <link phx-track-static rel='stylesheet' href='#{static_path("/images/icons/icons.css")}'/>
Thanks for your response, and the great work!
In recent versions of Phoenix, Plug.Static
is configured as followed:
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phx.digest
# when deploying your static files in production.
plug Plug.Static,
at: "/",
from: :voyagee,
gzip: false,
only: VoyageeWeb.static_paths()
Files are served from priv
directory. However, icons.css
is generated in assets/static/images/icons/icons.css
.
Not sure how to have the file copied in the priv
directory :thinking: I think this is something new in Phoenix, before static files were taken from the assets
directory.
Ah yeah would have to check how recent versions of the phoenix generator set it up (using esbuild?), in my project anything in assets/static/
is copied to priv/static/
but our asset pipeline has evolved into something quite bespoke...
You could also change the output path: config :iconify_ex, generated_icon_static_path: "/priv/static/images/icons/"
Works, thanks! No time to update the doc unfortunately :/
BTW mode: :img
doesn't work neither
Hi,
I've followed the instruction with
mix.exs
A CSS file is generated with the icons in
assets/static/images/icons/icons.css
:and the icon seems to be generated normally:
However, this file is neither imported nor downloaded (network inspector doesn't show anything) and the icon is not displayed. Have I missed something?