How to avoid using CDN?

New user of BS. Nice to work with so I started my first test project using the Clean Sky design as a basis. On exporting I was surprised to see a stylesheet being pulled from a CDN. I understand this is to help reduce page loading time.
However I am making a website with personal medical data and there will be no connection to the external internet. In fact tech support of many companies over here have blocking of external connections as company policy.
What confuses me is that in the BS export settings there is a slider “Use a CDN for libraries” which is “off”, so I wouldn’t expect a link to an external CDN in the exported html.
Question: how do I avoid links to an external CDN altogether without having to fix things manually? Is there perhaps another design theme with BS to start with that has no external links to a CDN?

Unfortunately some functionality which depends on external libraries, like scroll animations, are hardcoded to use CDN libraries. Google Fonts are also linked from Google’s servers, instead of being hosted locally.

If you are developing a website which can’t in any circumstances use a CDN, you can write an export script which modify the HTML and replace these CDN resources with your own local copies automatically.

Thanks Martin for your fast reply.
I’d like to avoid advanced measures like using export script because I’m not an advanced user. However it looks like it’s possible to come a long way by just avoiding certain components like the lightbox and then stay clear from CDN resources. Is there perhaps a list of functions which are hardcoded using CDN libraries? That would save a lot of time figuring it out.

Perhaps I’m misunderstanding something when the slider “Export Settings>Use a CDN for Libraries” is off. According to the user manual this means the jQuery library, bootstrap framework resources and used icon fonts are included as local files. Wouldn’t that solve the problem?

I’m from Germany and also frustrated by this whole GDPR thing (generally not a bad idea, but it’s being overdone really). So, searching the forum for options to avoid CDNs altogether I landed here.

@martin I know I’m replying to a nearly one year old thread, but since you meanwhile added an option to automatically download the chosen google fonts (and even not use a CDN for Bootstrap) so they’re not linked anymore to the google servers (thank you!), I thought I’d chime in here.

If it’s possible to download google fonts to use them like self hosted fonts, why is it not possible to do the same with the latest css and js files for the Lightbox gallery or the animations, or whatever other libraries BSS uses, and add them that way?

I personally find that reply harsh and unfair. I’m trying to be a designer, not a developer. That really isn’t an option for the majority of the user base, and I’m sure you’re aware of that. Although far away from being an expert, I know enough html and css (and how to use google) to make good use of Bootstrap Studio and add some missing functionality (coming - and still using - Blocs, which also uses the Bootstrap Framework).

I had a hard time to get the form to send the entered data without using the Smart Form but a php file instead, that I modified (whilst I don’t know anything about php). Writing an export script in “Node, Python, Ruby, PHP or anything else that you feel comfortable with” (quote from the docs) is far beyond anything, I or the most of the BSS users will ever be going to achieve. I’m an old guy :wink:

@martin So I hope you’ll be willing and able to provide a solution to that. It should be possible and it’s absolutely necessary for a part of your user base. I would really like to hear your (updated) opinion on this.

I finally managed to do it manually. Downloaded the css and js files for the Lightbox gallery and the animations that have been linked to a CDN before, added them to the project and then added the script tag to link to those before removing all references to the cdn. Removing the CDN links and adding the script tags to the downloaded files had to be done after the export and before uploading it to the server though. While that is a solution I can live with if I only create a one pager, it would keep me from using BSS for any other project.

So if I can do this manually, I’m sure you can have BSS doing it automatically. I’d even pay for a included solution. Money well spent for sure.

Cheers,
Fynn

You don’t need to write an export script. You can download the animate on scroll and lightbox2 packages from github and manually add them to your Bootstrap Studio project.

Since these aren’t actually part of Bootstrap, it seems to make sense to deliver these assets via CDN. Why add unnecessary bloat to your Bootstrap project if it’s not necessary?

Thanks @printninja,

whilst not having looked at the details of those libraries… doesn’t that mean I’d have to add specific classes to the html items I want to animate? Not saying it can’t be done, but I sure would prefer an easier and included solution :wink:

I’m not asking to add bloat to the project. Like using the CDN, it would only be download for offline use if it’s checked in the settings to do so. I just like to have the option to “bloat” my project instead of using a CDN. And since it’s not allowed in Germany anymore due to the GDPR, I’d love to have BSS do it for me. I don’t think that’s a lot to ask for.

I surely can avoid the usage of a CDN right now if I simply don’t use the Lightbox gallery and animations :wink:

Hiya @fynn,
I don’t think you’re going to find this option you are asking for happen for one super mega reason. By using a CDN for the Bootstrap files it allows the app to always have the most current update of the specific Bootstrap version in the app. In other words, it’s now set up for Bootstrap 3 through 5 so when you choose the specific version, it will automatically have all the right Bootstrap code needed to link to all the components in the app. This saves a lot of time on the devs part that they can put into more features and updated ones too. Hope that helps explain it a little better.

I’m pretty sure the suggestions made in this thread are the ones you’ll need to follow.

As for “majority of the user base”, they don’t bother to do anything with the CDNs at all so it’s all good for most of the users. You’re actually part of a small percentage of the users that want to go above and beyond the current capabilities of the app.

Well, if it weren’t for the GDPR, I would not bother at all. So it’s more a need, less a want. :wink: It would be just great if that small percentage of users who need to get on with the GDRP were served as well within the app instead of being forced to edit everything manually.

And I’m not talking about the Bootstrap files, since BSS offers to deselect the usage of a CDN for Bootstrap, so those get included when exporting the project and uploading it to the server.

I do know BSS is not a big company, but I simply cannot imagine why downloading and exporting works with google fonts, the Bootstrap files but not the files for the Lightbox gallery and the Animations.

My bad, I didn’t read al the little details being fonts and such which aren’t part of the choice in the settings for using CDNs or not. Sorry bout that, carry on :slight_smile:

Yes, you would. In fact, the AOS Github project actually gives you more discreet control and additional features for the animations that are not available through the BSS Animation options.

Personally, I rarely use the lightbox2 script. I prefer nanogallery2, and I host it locally.

1 Like

Going to check those out, thanks.

Still would like to hear @martin 's opinion though :wink:

@fynn Thank you for bringing this issue to our attention! We will make the animate and other built-in libraries obey the CDN export option.

4 Likes