问题
I've tested my website with Pingdom and suggested to combine external javascripts, but I don't know how to do this with shopify website.
回答1:
Adding external script files for Shopify theme is pretty simple.
You just need to upload your script file to the asset folder of your theme file. Or you can create a .js file to paste your code there. After that you just need to include that script file to the theme.liquid file.
Just need to add the following before end of tag in the theme.liquid file.
{{ 'your-script-file-name.js' | asset_url | script_tag }}
来源:https://stackoverflow.com/questions/46087470/how-to-combine-external-javascript-with-shopify-website