1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 14:46:37 -04:00

fix algolia base domain, use first party assets

This commit is contained in:
2020-12-09 09:36:07 -05:00
parent 6875435c61
commit de1996c661
6 changed files with 24 additions and 13 deletions

12
assets/js/vendor/algolia.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
@charset "UTF-8";
@import "@algolia/algoliasearch-netlify-frontend/dist/algoliasearchNetlify.css";

View File

@ -15,6 +15,7 @@ $max-width: unquote($max-width);
@import "abstracts/settings";
@import "abstracts/themes";
@import "abstracts/reset";
@import "abstracts/search";
// Global Styles
@import "components/typography";

View File

@ -6,17 +6,7 @@ amp: false
---
<!-- markdownlint-disable -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@1/dist/algoliasearchNetlify.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@1/dist/algoliasearchNetlify.js"></script>
<script type="text/javascript">
algoliasearchNetlify({
appId: '0XNKMPBIAW',
apiKey: '2cdf280c8d3ba1b40c38a7d71bbe5b0b',
siteId: 'jakejarvis',
branch: 'main',
selector: 'div#search',
});
</script>
<script type="text/javascript" src="/js/search.js"></script>
<div id="search"></div>
<!-- markdownlint-enable -->

View File

@ -13,3 +13,7 @@
{{- $js := $bundle | resources.Concat "/js/app.js" -}}
<script async defer src="{{ $js.Permalink }}"></script>
{{- $algolia := resources.Get "js/vendor/algolia.js" -}}
{{- $searchJS := slice $algolia | resources.Concat "/js/search.js" -}}
<!-- {{ $searchJS.Permalink }} -->

View File

@ -62,6 +62,7 @@
[plugins.inputs]
branches = ["main"]
mainBranch = "main"
customDomain = "jarv.is"
# The most important headers and redirects are specified in the _headers and
# _redirects files generated by Hugo. These are additional custom rules, mostly
@ -122,7 +123,7 @@
# https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/secure-pages/
Content-Security-Policy = '''
default-src 'self';
connect-src 'self' https://*.ampproject.net https://csp-collector.appspot.com/csp/amp https://api.github.com https://queue.simpleanalyticscdn.com https://platform.twitter.com;
connect-src 'self' https://*.algolia.net https://*.algolianet.com https://*.algolia.io https://*.algolianet.com https://*.ampproject.net https://csp-collector.appspot.com/csp/amp https://api.github.com https://queue.simpleanalyticscdn.com https://platform.twitter.com;
font-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com;
form-action 'none';
frame-ancestors 'self';
@ -131,7 +132,7 @@
manifest-src 'self';
media-src 'self' data: https:;
object-src 'none';
script-src 'self' https://cdn.ampproject.org/v0.js https://cdn.ampproject.org/v0/ https://cdn.ampproject.org/viewer/ https://cdn.ampproject.org/rtv/ https://3p.ampproject.net https://buttons.github.io https://scripts.simpleanalyticscdn.com https://gist.github.com https://syndication.twitter.com https://platform.twitter.com https://player.vimeo.com;
script-src 'self' 'unsafe-eval' https://cdn.ampproject.org/v0.js https://cdn.ampproject.org/v0/ https://cdn.ampproject.org/viewer/ https://cdn.ampproject.org/rtv/ https://3p.ampproject.net https://buttons.github.io https://scripts.simpleanalyticscdn.com https://gist.github.com https://syndication.twitter.com https://platform.twitter.com https://player.vimeo.com;
style-src 'self' 'unsafe-inline' https://cdn.ampproject.org/rtv/ https://fonts.googleapis.com https://github.githubassets.com;
worker-src 'self';
block-all-mixed-content;