Jul 14, 2021 6:00 PM
I'm using the HubSpot CMS and a marketplace theme for our company website. As part of this, HubSpot is generating a minified CSS file with all of the styles for the site. I'd like to include this stylesheet in a couple of non-HubSpot pages we have hosted elsewhere to keep styling in sync. Unfortunately, the CSS file generator is adding a timestamp into the URL, so I'm having to update our other, non-HubSpot pages to point to the new URL every time I change the CSS file.
Example current CSS file URL:
What'd I'd like to be able to use:
Does anyone know how to get a non-timestamped URL for this file?
Jul 18, 2021 8:04 AM - edited Jul 18, 2021 8:05 AM
I like the reaction, however can't help contradicting portions of your appraisal, so trusting another person can toll in here with another arrangement.
Utilizing the created template on a remotely facilitated page turns out great; the issue is that the reserve busting timestamp in the URL implies I need to refresh the URL my page focuses to at whatever point any progressions are made to the template.
Jul 15, 2021 3:35 AM
I'm not sure, but I think HubSpot uses the timestamp to update the styling for modules automatically. Therefor it's not possible to remove the timestamp from the URL. You can't add the CSS file like you requests externally since HubSpot is an closed source platform when using the design tools for creating the css.
So alternative options are:
Jul 15, 2021 9:53 AM
I appreciate the response, but disagree with parts of your assessment, so hoping someone else can chime in here with another solution.
Using the generated stylesheet on an externally hosted page works just fine; the issue is that the cache-busting timestamp in the URL means I have to update the URL my page points to whenever any changes are made to the stylesheet.
Jul 16, 2021 10:08 AM
So the issue is that you want to run 2 sites on a single resource, but the resource was not designed to do this. This means your approach is unfortunately flawed. Not sayin it can't be done, just seems like the cost/benefit is out of whack!
A potential work around would be top use NODE & CLI tools to generate 2 stylesheets, and then pushes them to there required locations. One location is obviously the HS theme and the second could infact be HS file manager to take advantage of the static URL point made by @Indra . <- this approach would establish a single source of truth for your projects and use the HS CLI to watch/upload the files.
Just my take on the situation. Hope this helps ya out!