Skip to content

Commit 5b48701

Browse files
authored
fix: Self-host all external website dependencies (apache#1197)
* fix: Self-host all external website dependencies * fix: Resolve CSP violations by self-hosting fonts * fix: Revert images and update fonts to refer lucenenet-site
1 parent 03af992 commit 5b48701

5 files changed

Lines changed: 55 additions & 4 deletions

File tree

websites/site/lucenetemplate/partials/head-content.tmpl.partial

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
1919
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
2020

21-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.8.0/css/academicons.min.css" integrity="sha512-GGGNUPDhnG8LEAEDsjqYIQns+Gu8RBs4j5XGlxl7UfRaZBhCCm5jenJkeJL8uPuOXGqgl8/H1gjlWQDRjd3cUQ==" crossorigin="anonymous">
22-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous">
21+
<link rel="stylesheet" href="{{_rel}}styles/academicons-1.8.0.min.css">
22+
<link rel="stylesheet" href="{{_rel}}styles/font-awesome-4.7.0.min.css">
2323

24-
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:400,700%7CMerriweather%7CRoboto+Mono">
24+
<link rel="stylesheet" href="/styles/fonts.css">
2525
<link rel="stylesheet" href="/styles/site.css">
2626

2727
</head>

websites/site/lucenetemplate/partials/head.tmpl.partial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
1919
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
2020

21-
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:400,700%7CMerriweather%7CRoboto+Mono">
21+
<link rel="stylesheet" href="/styles/fonts.css">
2222
<link rel="stylesheet" href="/styles/site.css">
2323

2424
</head>

websites/site/lucenetemplate/styles/academicons-1.8.0.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

websites/site/lucenetemplate/styles/font-awesome-4.7.0.min.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
@font-face {
2+
font-family: 'Lato';
3+
font-style: normal;
4+
font-weight: 400;
5+
src: url('https://lucenenet.apache.org/fonts/lato-v25-latin-regular.woff2') format('woff2');
6+
}
7+
8+
@font-face {
9+
font-family: 'Lato';
10+
font-style: normal;
11+
font-weight: 700;
12+
src: url('https://lucenenet.apache.org/fonts/lato-v25-latin-bold.woff2') format('woff2');
13+
}
14+
15+
@font-face {
16+
font-family: 'Merriweather';
17+
font-style: normal;
18+
font-weight: 400;
19+
src: url('https://lucenenet.apache.org/fonts/merriweather-v33-latin-regular.woff2') format('woff2');
20+
}
21+
22+
@font-face {
23+
font-family: 'Roboto Mono';
24+
font-style: normal;
25+
font-weight: 400;
26+
src: url('https://lucenenet.apache.org/fonts/roboto-mono-v31-latin-regular.woff2') format('woff2');
27+
}
28+
29+
@font-face {
30+
font-family: 'Academicons';
31+
src: url('https://lucenenet.apache.org/fonts/academicons.eot?v=1.8.0');
32+
src: url('https://lucenenet.apache.org/fonts/academicons.woff?v=1.8.0') format('woff'),
33+
url('https://lucenenet.apache.org/fonts/academicons.ttf?v=1.8.0') format('truetype'),
34+
url('https://lucenenet.apache.org/fonts/academicons.svg?v=1.8.0#academicons') format('svg'),
35+
url('https://lucenenet.apache.org/fonts/academicons.eot?v=1.8.0') format('embedded-opentype');
36+
}
37+
38+
@font-face {
39+
font-family: 'FontAwesome';
40+
src: url('https://lucenenet.apache.org/fonts/fontawesome-webfont.eot?v=4.7.0');
41+
src: url('https://lucenenet.apache.org/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),
42+
url('https://lucenenet.apache.org/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),
43+
url('https://lucenenet.apache.org/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),
44+
url('https://lucenenet.apache.org/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'),
45+
url('https://lucenenet.apache.org/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype');
46+
}

0 commit comments

Comments
 (0)