11# Bootstrap 5 and Dependencies Update - Migration Guide
22
33## Overview
4+
45This document describes the comprehensive dependency update performed on the al-folio template, with a focus on the major Bootstrap 4 to Bootstrap 5 migration.
56
67## Updated Dependencies
78
89### Major Updates
910
1011#### Bootstrap: v4.6.2 → v5.3.8 ⚠️ BREAKING CHANGES
12+
1113- ** Files Updated:**
1214 - ` assets/css/bootstrap.min.css `
1315 - ` assets/css/bootstrap.min.css.map `
@@ -16,17 +18,20 @@ This document describes the comprehensive dependency update performed on the al-
1618- ** Breaking Changes:** See Bootstrap 5 Migration section below
1719
1820#### jQuery: v3.6.0 → v4.0.0 ⚠️ BREAKING CHANGES
21+
1922- Bootstrap 5 no longer requires jQuery
2023- jQuery 4.0 has its own breaking changes
2124- Consider removing jQuery if not used elsewhere
2225
2326#### MathJax: v3.2.2 → v4.1.0 ⚠️ BREAKING CHANGES
27+
2428- Major version update with potential API changes
2529- Math rendering should be tested thoroughly
2630
2731### Library Updates (CDN)
2832
2933#### Visualization Libraries
34+
3035- ** chart.js:** v4.4.1 → v4.5.1
3136- ** d3:** v7.8.5 → v7.9.0
3237- ** echarts:** v5.5.0 → v6.0.0 ⚠️ MAJOR VERSION
@@ -37,15 +42,18 @@ This document describes the comprehensive dependency update performed on the al-
3742- ** vega-lite:** v5.16.3 → v6.4.2 ⚠️ MAJOR VERSION
3843
3944#### UI Libraries
45+
4046- ** bootstrap-table:** v1.22.4 → v1.26.0
4147- ** diff2html:** v3.4.47 → v3.4.55
4248- ** highlightjs:** v11.9.0 → v11.11.1
4349- ** swiper:** v11.0.5 → v12.0.3 ⚠️ MAJOR VERSION
4450
4551### npm Dependencies
52+
4653- ** prettier:** ^3.8.0 → ^3.8.1
4754
4855### Libraries Already at Latest Version (No Update)
56+
4957- imagesloaded: v5.0.0
5058- img-comparison-slider: v8.0.6
5159- leaflet: v1.9.4
@@ -65,34 +73,41 @@ This document describes the comprehensive dependency update performed on the al-
6573All deprecated Bootstrap 4 utility classes have been updated to Bootstrap 5 equivalents:
6674
6775#### Margin Classes
76+
6877- ` ml-* ` → ` ms-* ` (margin-left → margin-start)
6978- ` mr-* ` → ` me-* ` (margin-right → margin-end)
7079
7180#### Padding Classes
81+
7282- ` pl-* ` → ` ps-* ` (padding-left → padding-start)
7383- ` pr-* ` → ` pe-* ` (padding-right → padding-end)
7484
7585#### Text Alignment
86+
7687- ` text-left ` → ` text-start `
7788- ` text-right ` → ` text-end `
7889
7990#### Float Classes
91+
8092- ` float-left ` → ` float-start `
8193- ` float-right ` → ` float-end `
8294
8395#### Dropdown Classes
96+
8497- ` dropdown-menu-right ` → ` dropdown-menu-end `
8598
8699### Data Attribute Changes
87100
88101All Bootstrap data attributes have been updated to use the ` data-bs-* ` prefix:
102+
89103- ` data-toggle ` → ` data-bs-toggle `
90104- ` data-target ` → ` data-bs-target `
91105- ` data-dismiss ` → ` data-bs-dismiss `
92106
93107### Files Modified
94108
95109#### Template Files
110+
96111- ` _includes/header.liquid ` - Updated navbar, dropdown, and collapse attributes
97112- ` _layouts/cv.liquid ` - Updated table padding classes and float classes
98113- ` _includes/cv/*.liquid ` - Updated margin classes in all CV sections
@@ -103,13 +118,16 @@ All Bootstrap data attributes have been updated to use the `data-bs-*` prefix:
103118- ` _pages/blog.md ` - Updated float classes
104119
105120#### JavaScript Files
121+
106122- ` assets/js/tooltips-setup.js ` - Updated tooltip selector to ` data-bs-toggle `
107123- ` assets/js/common.js ` - Updated scrollspy and popover initialization for Bootstrap 5
108124
109125### JavaScript API Changes
110126
111127#### ScrollSpy Initialization
128+
112129** Before (Bootstrap 4):**
130+
113131``` javascript
114132$ (" body" ).scrollspy ({
115133 target: navSelector,
@@ -118,6 +136,7 @@ $("body").scrollspy({
118136```
119137
120138** After (Bootstrap 5):**
139+
121140``` javascript
122141const scrollSpy = new bootstrap.ScrollSpy (document .body , {
123142 target: navSelector,
@@ -126,13 +145,16 @@ const scrollSpy = new bootstrap.ScrollSpy(document.body, {
126145```
127146
128147#### Tooltip and Popover Selectors
148+
129149** Before:**
150+
130151``` javascript
131152$ (' [data-toggle="tooltip"]' ).tooltip ();
132153$ (' [data-toggle="popover"]' ).popover ();
133154```
134155
135156** After:**
157+
136158``` javascript
137159$ (' [data-bs-toggle="tooltip"]' ).tooltip ();
138160$ (' [data-bs-toggle="popover"]' ).popover ();
@@ -141,16 +163,19 @@ $('[data-bs-toggle="popover"]').popover();
141163## Known Issues and Considerations
142164
143165### 1. Material Design Bootstrap (MDB) Compatibility
166+
144167- MDB v4.20.0 was built for Bootstrap 4
145168- May have compatibility issues with Bootstrap 5
146169- Testing required for any pages using MDB components
147170- Consider updating to MDB 5 in the future if issues arise
148171
149172### 2. Bootstrap TOC Compatibility
173+
150174- bootstrap-toc v1.0.1 should work with Bootstrap 5
151175- Needs testing on pages with table of contents
152176
153177### 3. jQuery Dependency
178+
154179- Bootstrap 5 no longer requires jQuery
155180- al-folio still uses jQuery for:
156181 - bootstrap-toc
@@ -159,12 +184,15 @@ $('[data-bs-toggle="popover"]').popover();
159184- jQuery 4.0.0 included but could be removed if refactored to vanilla JS
160185
161186### 4. SRI Integrity Hashes
187+
162188- All integrity hashes have been updated for new library versions
163189- These are placeholder hashes and should be regenerated if CDN usage changes
164190- Verify hashes at https://www.srihash.org/ when deploying
165191
166192### 5. Major Version Updates Requiring Testing
193+
167194The following libraries had major version updates and may have breaking changes:
195+
168196- ** echarts:** v5 → v6
169197- ** mermaid:** v10 → v11
170198- ** vega ecosystem:** v5/v6 → v6/v7
@@ -178,12 +206,14 @@ Pages using these libraries should be tested thoroughly.
178206After applying these updates, test the following:
179207
180208### Core Functionality
209+
181210- [ ] Site builds without errors
182211- [ ] All pages load correctly
183212- [ ] No console errors in browser
184213- [ ] Responsive layout works on mobile/tablet/desktop
185214
186215### Bootstrap 5 Features
216+
187217- [ ] Navigation menu and dropdowns work
188218- [ ] Navbar collapse/expand on mobile
189219- [ ] Tooltips appear correctly
@@ -192,6 +222,7 @@ After applying these updates, test the following:
192222- [ ] Scrollspy updates active navigation
193223
194224### Page-Specific Features
225+
195226- [ ] About page renders correctly
196227- [ ] Blog posts display properly
197228- [ ] Publications page with BibTeX works
@@ -201,6 +232,7 @@ After applying these updates, test the following:
201232- [ ] Dark mode toggle works
202233
203234### Visualization Libraries
235+
204236- [ ] Chart.js visualizations render
205237- [ ] Mermaid diagrams display
206238- [ ] Plotly charts work
@@ -209,6 +241,7 @@ After applying these updates, test the following:
209241- [ ] D3 visualizations work
210242
211243### Math and Code
244+
212245- [ ] MathJax renders equations correctly
213246- [ ] Code highlighting works (highlight.js)
214247- [ ] Jupyter notebooks display
@@ -218,6 +251,7 @@ After applying these updates, test the following:
218251If you encounter critical issues after this update:
219252
2202531 . ** Revert Bootstrap files:**
254+
221255 ``` bash
222256 git checkout HEAD~1 -- assets/css/bootstrap.min.css
223257 git checkout HEAD~1 -- assets/css/bootstrap.min.css.map
@@ -226,6 +260,7 @@ If you encounter critical issues after this update:
226260 ```
227261
2282622 . ** Revert configuration and template changes:**
263+
229264 ``` bash
230265 git checkout HEAD~1 -- _config.yml
231266 git checkout HEAD~1 -- _includes/
0 commit comments