Build an offline site

Wish to build an offline site?

Or an online site that does not attempt to speed up your site’s load time by serving assets via a third party Content Distribution Network (CDN)?

Then read on for some tips to help guide you.

  1. In params.yaml:
    1. Change the font to native to use native fonts optimized for the user’s device
    2. Set [cms] > netlify_cms to false to disable the Netlify Identity integration for Netlify CMS
  2. Download the JS and CSS assets that your site configuration uses
    • You can perform this in your web browser by choosing File > Save Page As on a page, such as the homepage, which makes use of all the integrations (such as code highlighting or math) that you enabled
  3. Either use the Terminal cat command or an online concatenator to combine the remote third-party JS assets into a single JS file in your site folder: static/js/vendor/main.min.js
    • add jquery first
    • only add remote third-party files (not any local JS files such as wowchemy*.js)
    • before creating main.min.js, you can right click your site, choose Inspect, and search .js in the code of your generated site if you wish to check the order in which JS files should ideally be added
  4. Concatenate remote third-party CSS assets into a single CSS file in your site folder: static/css/vendor/main.min.css following the same procedure in the previous step but for .css files (excluding any local wowchemy* CSS files)
  5. Add Font Awesome font assets to static/css/webfonts/
  6. Optionally, add Academicons font assets to static/css/webfonts/