diff --git a/_config.example.yml b/_config.example.yml index 592d220a..e6dd12d8 100644 --- a/_config.example.yml +++ b/_config.example.yml @@ -14,10 +14,10 @@ sass: # Additional exclude from processing exclude: - .github/ - - venv/ - README.md - LICENSE.md - REDISTRIBUTED.md + - purgecss.config.js # Collections and their defaults collections: diff --git a/_config.yml b/_config.yml index 6d6a5233..7a5cfd8f 100644 --- a/_config.yml +++ b/_config.yml @@ -18,6 +18,7 @@ exclude: - REDISTRIBUTED.md - screenshot.png - jekyll-theme-conference.gemspec + - purgecss.config.js - _config.example.yml # Collections and their defaults diff --git a/_tools/build.yml b/_tools/build.yml index 841ad23f..b12cc74f 100644 --- a/_tools/build.yml +++ b/_tools/build.yml @@ -23,23 +23,11 @@ jobs: with: lfs: true - - name: Setup Ruby - uses: actions/setup-ruby@v1 - - - name: Ruby Cache - id: cache_ruby - uses: actions/cache@v2 + - name: Setup Ruby, Bundler and Jekyll + uses: ruby/setup-ruby@v1 with: - path: vendor/bundle - key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gem- - - - name: Install Bundler and Jekyll - if: steps.cache_ruby.outputs.cache-hit != 'true' - run: | - gem install bundler - bundle install --path vendor/bundle + ruby-version: 2.6 + bundler-cache: true - name: Build website run: | @@ -59,16 +47,7 @@ jobs: with: node-version: '12' - - name: NPM Cache - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Install PurgeCSS and Terser - if: steps.cache.outputs.cache-hit != 'true' run: | npm install -g purgecss npm install -g terser diff --git a/_tools/purgecss.config.js b/_tools/purgecss.config.js index 57e75e99..7e7c989b 100644 --- a/_tools/purgecss.config.js +++ b/_tools/purgecss.config.js @@ -1,7 +1,7 @@ module.exports = { content: ['_site/**/*.html','_site/assets/js/main.js'], css: ['_site/assets/css/main.css'], - output: '_site/assets/css/main.min.css', + output: '_site/assets/css/main.css', fontFace: true, safelist: { deep: [/^leaflet/]