Enable Brotli compression #2189

Closed
Gusted wants to merge 2 commits from Brotli-Patch into master
Gusted commented 2021-01-12 21:30:33 +00:00 (Migrated from github.com)

Description

Resolves: #2186

As in the discussion #2186, adding the jekyll-brotli plugin to compress the static assets on building, so they don't have to be compressed each time when the server wants to serve them. Additionally server-side the static module has to be configured to use the *.br files. Some configuration has changed regarding github-pages, it will publish the _site to a github repo when the ENV was set to production. Removing it from the jekyll-plugins group and adding manually into the _config.yml fixed this issue.

Summary:

  • Compress file AOD.
  • Let the server only use static files.
  • Don't add github-pages to 'jekyll-plugins' group, due to the fact github-pages will behave differently when enabling production ENV.
  • Adds an extra 10s for the host to use ./build.sh due to compressing all files.

Check List

  • I understand that by not opening an issue about a software/service/similar addition/removal, this pull request will be closed without merging.

  • I have read and understand the contributing guidelines.

  • The project is Free Libre and/or Open Source Software

  • Netlify preview for the mainly edited page:
<!-- PLEASE READ OUR CODE OF CONDUCT (https://wiki.privacytools.io/view/PrivacyTools:Code_of_Conduct) AND CONTRIBUTING GUIDELINES (https://github.com/privacytools/privacytools.io/blob/master/.github/CONTRIBUTING.md) BEFORE SUBMITTING --> ## Description Resolves: #2186 As in the *discussion* #2186, adding the `jekyll-brotli` plugin to compress the static assets on building, so they don't have to be compressed each time when the server wants to serve them. Additionally server-side the static module has to be configured to use the `*.br` files. Some configuration has changed regarding `github-pages`, it will publish the `_site` to a github repo when the ENV was set to `production`. Removing it from the `jekyll-plugins` group and adding manually into the `_config.yml` fixed this issue. Summary: - Compress file AOD. - Let the server only use static files. - Don't add github-pages to 'jekyll-plugins' group, due to the fact github-pages will behave differently when enabling production ENV. - Adds an extra 10s for the `host` to use `./build.sh` due to compressing all files. #### Check List <!-- Please add an x in each box below, like so: [x] --> - [x] I understand that by not opening an issue about a software/service/similar addition/removal, this pull request will be closed without merging. - [x] I have read and understand [the contributing guidelines](https://github.com/privacytools/privacytools.io/blob/master/.github/CONTRIBUTING.md). - [x] The project is [Free Libre](https://en.wikipedia.org/wiki/Free_software) and/or [Open Source](https://en.wikipedia.org/wiki/Open-source_software) Software * Netlify preview for the mainly edited page: <!-- link or Non Applicable? Edit this in afterwards -->
Gusted commented 2021-01-15 21:36:48 +00:00 (Migrated from github.com)

Succeeded by #2194

Succeeded by #2194

I didn't realize this was using github-pages instead of jekyll in the first place until your PR, so I think some wider changes were necessary 😆

I didn't realize this was using `github-pages` instead of `jekyll` in the first place until your PR, so I think some wider changes were necessary 😆
Gusted commented 2021-01-15 21:59:20 +00:00 (Migrated from github.com)

didn't realize this was using github-pages instead of jekyll in the first place until your PR,

I tried to remove it, but got into some dependency hell. So I had left it to have a another look this weekend. Luckily your PR seems to include the 2 dependency that are needed :D

> didn't realize this was using `github-pages` instead of `jekyll` in the first place until your PR, I tried to remove it, but got into some dependency hell. So I had left it to have a another look this weekend. Luckily your PR seems to include the 2 dependency that are needed :D
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: privacyguides/privacytools.io#2189
No description provided.