So this is weird. I added an external CSS file in the site settings under attachments. For some reason it shows up 2x in the head code:
<link rel=“stylesheet” type=“text/css” href=“./css/schroeder-custom-v2.css”>
Now comes the weird part: this only happens on 1 page in my site. On all other pages the code is only listed 1x in the head. Also: if I remove the CSS file from the attachments in the site settings, BOTH links to the CSS file are removed on the head. If I add it back in, it adds 2 instances of the link.
I even deleted all content on the page in question - didn’t make a difference. The external CSS file is added 2x. I also renamed the CSS file because I though may blocs “got confused” because I added and removed the file from the attachment list. This also had no effect.
This, of course doesn’t affect the page layout/rendering in any way. It’s just a little irritating that when inspecting the code in Google, everything is listed 2x, with 1 instance being overridden.
I’ve been wanting to know precisely HOW to link to external stylesheets already on my web server. I searched the Blocs forum and found this thread. I’m curious how you even linked your external stylesheet within Blocs. Could you please explain that?
Oh, I know how to add “attachments” but there is no meaning to do that when I have a CSS file already on the server. Adding an attachment would make a duplicate of the file. I merely want to LINK to an existing file. I don’t care to clutter the server with unnecessary duplicate files. So how do I “LINK” to an existing CSS file on my web server from within Blocs?
Not sure if I really understand you, but I don’t think you can link to a CSS file that is already uploaded on a server. You could try adding it in the Project settings under “Analytics Tracking Code”. I found out you can add anything - doesn’ necessarily have to be “tracking code”.
So you could try this:
<link rel=“stylesheet” type=“text/css” href="./folder on server/MyCss.css">
No, there are global code input areas to add code for this type of scenario. This analytics input field code gets wrapped in an analytics note (if I remember correctly) so it would make the code misleading if viewed.
This discussion has gotten a little off-topic and doesn’t address the original issue that Blocs is adding the code for the external CSS 2x in the exported HTML. Should I open a support ticket for this?