-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #646 from molgenis/bug/cdns
Make CDN files local to protect users online
- Loading branch information
Showing
23 changed files
with
109 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Get rid of CDNs | ||
|
||
We need to protect our reseachers and make the docs more performant. | ||
|
||
- `mkdir _cdns` | ||
- Check index.html for external links | ||
- fetch all external references | ||
|
||
> When adding a new docs tree ie `v3.2.0` make sure to follow these same/similar steps | ||
```bash | ||
wget cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css | ||
wget cdn.jsdelivr.net/npm/docsify@4 --output-document=docsify@4.js | ||
wget cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js | ||
wget unpkg.com/docsify/lib/plugins/search.min.js | ||
``` | ||
|
||
- scan files for external links and change those. | ||
- `vue.css` has link to fonts list | ||
|
||
```bash | ||
wget https://fonts.googleapis.com/css\?family\=Roboto+Mono\|Source+Sans+Pro:300,400,600 --output-document=fonts.css | ||
``` | ||
|
||
- fetch the fonts now listed in `fonts.css` | ||
- fetch those fonts in `./fonts/` | ||
|
||
```bash | ||
wget https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_ROW9.ttf | ||
wget https://fonts.gstatic.com/s/sourcesanspro/v22/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdr.ttf | ||
wget https://fonts.gstatic.com/s/sourcesanspro/v22/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf | ||
wget https://fonts.gstatic.com/s/sourcesanspro/v22/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf | ||
``` | ||
|
||
- Adjust the link to the downloaded fonts | ||
|
||
```bash | ||
vi fonts.css | ||
# replace all paths ie | ||
# https://fonts.gstatic.com/s/sourcesanspro/v22/xxx.ttf | ||
# into | ||
# ./fonts/xxx.ttf | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@font-face { | ||
font-family: 'Roboto Mono'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(./fonts/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_ROW9.ttf) format('truetype'); | ||
} | ||
@font-face { | ||
font-family: 'Source Sans Pro'; | ||
font-style: normal; | ||
font-weight: 300; | ||
src: url(./fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdr.ttf) format('truetype'); | ||
} | ||
@font-face { | ||
font-family: 'Source Sans Pro'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(./fonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf) format('truetype'); | ||
} | ||
@font-face { | ||
font-family: 'Source Sans Pro'; | ||
font-style: normal; | ||
font-weight: 600; | ||
src: url(./fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf) format('truetype'); | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.