Shopify themes, liquid, logos, and UX
Hi All,
I am new to this. I wanted to display PMS Color chart on my website and a friend of mine sent me a zip file that has a CSS file and a HTML file and when I open the HTML file on my computer, it works perfectly fine. After reading about theme customization etc on these pages, I added these two files to the Assets folder in my theme. Now, I have no idea how to generate a url that I could use on my website.
Any help will be appreciated.
Solved! Go to the solution
This is an accepted solution.
Hello, @OasisPromos
Welcome to the Shopify community!
and Thanks for your Good question.
can please add this code theme.liquid before </head>
just change css file name custom.scss.css to your CSS file name
{{ 'custom.scss.css' | asset_url | stylesheet_tag }}
This is an accepted solution.
Hello, @OasisPromos
Welcome to the Shopify community!
and Thanks for your Good question.
can please add this code theme.liquid before </head>
just change css file name custom.scss.css to your CSS file name
{{ 'custom.scss.css' | asset_url | stylesheet_tag }}
Hi @KetanKumar ,
Thank you very much for taking the time and helping me with this question. I added the following line to theme.liquid file:
{{ 'colors.scss.css' | asset_url | stylesheet_tag }} but I still don't know how to generate a page or url address for the file. Can you please guide me.
Once again, thank you very much for your help!
Hi @KetanKumar ,
I found the url address. Thank you very much for all your help; I really appreciate it.
Abdul
Thanks for update and compliment
Hi, I'm going through the same question: where did you find the url please?
I want to get an always-latest url for the CSS file loaded under the Assets. I edit and update the CSS file a lot, and I don't want to update the link every time after.
Could you please shed some lights?
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Hi, thanks for your reply!
Site URL: https://jgmaker3d.myshopify.com/
So again, for explaining what I'm facing:
I added a CSS file (name: style.css.liquid) on Assets folder, I figured out the link of this file and included in product page's custom HTML section:
<link href="https://cdn.shopify.com/s/files/.../assets/style.css.liquid " doctype="text/css" rel="stylesheet" >
The thing is, when I edit and update the CSS file, the link for the updated file changes with question mark and different version number appended.
I tried to add {{ 'style.css.liquid' | asset_url | stylesheet_tag }} before </head> in theme.liquid; and then change the code on the custom HTML section like this:
<link href="{{ 'style.css.liquid' | asset_url | stylesheet_tag }} " doctype="text/css" rel="stylesheet" >
It fails to get the latest link of the CSS file. Could you shed some lights? Thanks a lot in advance!
Ronald
can you please try this code
{{ 'style.css' | asset_url | stylesheet_tag }}
Thanks very much! Issue solved!
Works good now after I remove the .liquid in the code in the theme.liquid, and remove the .liquid in the code in the custom HTML section:
{{ 'style.css' | asset_url | stylesheet_tag }}
So it might turn out that the ".liquid" can not be recognized following the "stylesheet_tag".
I'm not sure if it is the reason, I hope I could have learnt more about this language, but thanks again for the solution!
it's my pleasure to help us
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024