Using Accelerated Mobile Pages with Bootstrap

前端 未结 6 658

I have a website that uses Bootstrap. Technically, I\'m using Bootstrap 4 at the moment. I want to leverage Accelerated Mobile Pages (AMP) in the publicly-facing parts of my

6条回答
  •  臣服心动
    2020-12-31 10:02

    To get rid of error with maximal size of author's CSS, you can also do following steps when you want to use AMP and Bootstrap together:

    • put your entire css and bootstraps' css into one css file, lets say entire.css
    • Download and install https://github.com/purifycss/purifycss
    • use purify: purifycss entire.css yourpage.html --min --info --out minified.css
    • if minified.css is smaller than 50k then you can put content of this file in