ubc-geomatics-textbook / geomatics-textbook

https://www.opengeomatics.ca
11 stars 17 forks source link

Minify book build files #57

Open pauldpickell opened 3 years ago

pauldpickell commented 3 years ago

Minify the resources (mostly JavaScript) in /docs/lib/ and other css and html files to enhance loading times.

ect123 commented 3 years ago

Since these files are in the docs/lib/ folder, will they be recreated each time new content is knitted for each chapter? If yes, then it would be good to include a minify step before each new version release. So before we merge develop to main.

pauldpickell commented 3 years ago

Yes, I agree. Was just looking at /docs/raster-analysis-and-terrain-modelling.html, which is 74 MB and takes a while to load. Exploring solutions to speed up page loading generally, but in the case of this chapter specifically, it looks like the leaflet package in R encodes the json directly into the html rather than dynamically linking to the resource in /data. I will open a separate issue for this: #58