Skip to content

Current method for installing additional NPM packages (Lightbox) #1142

Answered by h-enk
jollydodo asked this question in Support
Discussion options

You must be logged in to vote

The documentation will be updated — soonish 😄

Since the DimBox script is relatively small, you could/should go this route (minimizing the number of requests): https://github.com/orgs/gethyas/discussions/442#discussioncomment-7828474

For larger scripts (like e.g. DocSearch or Bootstrap) the route you followed above is recommended.

  1. I think the script is loaded faster than the page is ready. So, make it defer:

    {{ partial "footer/esbuild" (dict "src" "js/dimbox.js" "load" "defer" "transpile" false) -}}
    
  2. I would also load the SCSS (in stead of the CSS) — in assets/scss/common/_custom.scss (providing you more flexibility):

    // Put your custom SCSS code here
    
    // Set you own values for DimBox …

Replies: 1 comment 1 reply

Comment options

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

Answer selected by jollydodo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants