gethugothemes / dot-hugo

Dot - Hugo Documentation Theme
https://gethugothemes.com/products/dot/?utm_source=dot_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
261 stars 148 forks source link

Update to Bootstrap 5 #178

Closed jwflory closed 2 years ago

jwflory commented 2 years ago

Summary

Update Bootstrap from 4.1.1 to 5.1.x

Background

The theme currently uses Bootstrap 4.1.1:

https://github.com/themefisher/dot-hugo/blob/9d1c926d23f00526c274998037e00f34c4783d58/static/plugins/bootstrap/bootstrap.min.css#L2

Bootstrap 5 is a solid improvement from v4, as outlined in the Bootstrap v5 dev blog. The most significant chance is no longer depending on jQuery and dropping support for Internet Explorer. v5.0.0 dropped in May 2021, so there has been six months of improvements and bug fixes since the initial release. It is a stable release stream now.

Adding support for Bootstrap 5 and moving away from jQuery would come with an added performance boost and bring in some of the new improvements for styling and design for Bootstrap.

Details

Updating Bootstrap itself is fairly simple, you need to drop in the new files.

To leverage the benefits of the release, there are also custom jQuery scripts in this theme that exist. It looks like these jQuery dependencies exist outside of Bootstrap. There may be alternate ways to emulate some of this behavior without jQuery, but it needs more investigation.

This task could be split up into two parts:

  1. Update Bootstrap to v5
  2. Gradually phase out use of custom jQuery scripts to drop the dependency in the theme

Outcome

tfsomrat commented 2 years ago

Hello @jwflory

Thanks for your suggestions. I am afraid that currently, we don't have a plan to update Bootstrap. If you want, you can make a PR. it will be great for us and everyone whos using this theme, thank you.