Skip to content

Using 3rd party js css in v3 #4105

Answered by BoDonkey
jackie-chan asked this question in Q&A
Discussion options

You must be logged in to vote

The answer depends on what the content type is and what pages need it. For a Google Analytics script, I would put it into an extraHead block. You can do that in the main views/layout.html file, or in specific page templates. If your package is available as an npm package, like Google Analytics, you could also elect to install it in your project and then import it through an index.js file within a module's ui/src folder. This is going to make that code generally available throughout the project. For stylesheets, you can import from a local npm package or from a URL using @import within the index.scss file within a module's ui/src folder. Hope this helps.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@jackie-chan
Comment options

Comment options

You must be logged in to vote
3 replies
@jackie-chan
Comment options

@BoDonkey
Comment options

@jackie-chan
Comment options

Answer selected by jackie-chan
Comment options

You must be logged in to vote
1 reply
@BoDonkey
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants