Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a678b373
Commit
a678b373
authored
Oct 14, 2020
by
feistel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for brotli compressed pages
parent
2b9221d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
doc/user/project/pages/introduction.md
doc/user/project/pages/introduction.md
+5
-1
No files found.
doc/user/project/pages/introduction.md
View file @
a678b373
...
@@ -173,7 +173,7 @@ Most modern browsers support downloading files in a compressed format. This
...
@@ -173,7 +173,7 @@ Most modern browsers support downloading files in a compressed format. This
speeds up downloads by reducing the size of files.
speeds up downloads by reducing the size of files.
Before serving an uncompressed file, Pages will check whether the same file
Before serving an uncompressed file, Pages will check whether the same file
exists with a
`.gz`
extension. If it does, and the browser supports receiving
exists with a
`.
br`
or
`.
gz`
extension. If it does, and the browser supports receiving
compressed files, it will serve that version instead of the uncompressed one.
compressed files, it will serve that version instead of the uncompressed one.
To take advantage of this feature, the artifact you upload to the Pages should
To take advantage of this feature, the artifact you upload to the Pages should
...
@@ -182,14 +182,17 @@ have this structure:
...
@@ -182,14 +182,17 @@ have this structure:
```
plaintext
```
plaintext
public/
public/
├─┬ index.html
├─┬ index.html
│ | index.html.br
│ └ index.html.gz
│ └ index.html.gz
│
│
├── css/
├── css/
│ └─┬ main.css
│ └─┬ main.css
│ | main.css.br
│ └ main.css.gz
│ └ main.css.gz
│
│
└── js/
└── js/
└─┬ main.js
└─┬ main.js
| main.js.br
└ main.js.gz
└ main.js.gz
```
```
...
@@ -202,6 +205,7 @@ pages:
...
@@ -202,6 +205,7 @@ pages:
script
:
script
:
# Build the public/ directory first
# Build the public/ directory first
-
find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
-
find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
-
find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec brotli -f -k {} \;
```
```
By pre-compressing the files and including both versions in the artifact, Pages
By pre-compressing the files and including both versions in the artifact, Pages
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment