File tree 7 files changed +7
-56
lines changed
7 files changed +7
-56
lines changed Original file line number Diff line number Diff line change 19
19
20
20
# Environment variables
21
21
.env
22
-
23
- # Captions Metadata from Jamstack TV
24
- data /
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ require('dotenv').config();
3
3
module . exports = {
4
4
appId : 'VGOL4P01VV' ,
5
5
indexName : 'jamstack' ,
6
- apiKey : process . env . ALGOLIA_API_KEY ,
7
6
// It’s okay to have this in the repo, it’s used in the clientside JS
8
7
searchOnlyApiKey : "a457b566acbf454a61eaaae2e4fee0bf" ,
9
8
} ;
Original file line number Diff line number Diff line change 6
6
NODE_VERSION = " 12.16.2"
7
7
NODE_ENV = " production"
8
8
9
- # This requires YOUTUBE_API_KEY and ALGOLIA_API_KEY
10
- [context .production ]
11
- command = " npm run build:production"
12
-
13
- # TODO remove this, this is just for testing
14
- [context .deploy-preview ]
15
- command = " npm run build:production"
16
-
17
- # TODO remove this, this is just for testing
18
- [context .branch-deploy ]
19
- command = " npm run build:production"
20
-
21
9
[dev ]
22
10
command = " npm run start"
23
11
publish = " dist"
Original file line number Diff line number Diff line change 15
15
"build" : " npm-run-all build:html build:css" ,
16
16
"build:html" : " eleventy" ,
17
17
"build:css" : " postcss src/css/tailwind.css -o dist/css/styles.css" ,
18
- "data:jamstacktv" : " youtinx pull && youtinx push" ,
19
18
"watch:html" : " ELEVENTY_ENV=dev eleventy --watch --quiet" ,
20
19
"watch:css" : " postcss src/css/tailwind.css -o dist/css/styles.css --watch" ,
21
20
"serve" : " live-server dist --quiet --port=8090" ,
22
21
"start" : " npm-run-all --parallel watch:html watch:css serve" ,
23
- "clean" : " rm -rf dist" ,
24
- "build:production" : " npm run data:jamstacktv && npm run build"
22
+ "clean" : " rm -rf dist"
25
23
},
26
24
"dependencies" : {
27
25
"@11ty/eleventy" : " ^0.11.1" ,
47
45
"postcss-cli" : " ^8.3.1" ,
48
46
"postcss-import" : " ^13.0.0" ,
49
47
"spdx-correct" : " ^3.1.1" ,
50
- "tailwindcss" : " ^2.0.3" ,
51
- "youtinx" : " ^0.4.1"
48
+ "tailwindcss" : " ^2.0.3"
52
49
},
53
50
"devDependencies" : {
54
51
"live-server" : " ^1.2.1"
Original file line number Diff line number Diff line change 1
1
const algoliaConfig = require ( "../../../algolia.config.js" ) ;
2
2
3
- // make sure we don’t leak algoliaConfig.apiKey
3
+ // don’t hardcode anything here, make the config variables opt-in
4
4
module . exports = {
5
5
appId : algoliaConfig . appId ,
6
6
indexName : algoliaConfig . indexName ,
Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ layout: layouts/base.njk
9
9
<div id =" searchbox" ></div >
10
10
<div id =" hits" ></div >
11
11
</div >
12
- <
script src =
" https://cdn.jsdelivr.net/npm/[email protected] /dist/algoliasearch-lite.umd.js" integrity =
" sha256-EXPXz4W6pQgfYY3yTpnDa3OH8/EPn16ciVsPQ/ypsjk=" crossorigin =
" anonymous" ></
script >
13
- <
script src =
" https://cdn.jsdelivr.net/npm/[email protected] /dist/instantsearch.production.min.js" integrity =
" sha256-LAGhRRdtVoD6RLo2qDQsU2mp+XVSciKRC8XPOBWmofM=" crossorigin =
" anonymous" ></
script >
14
- <script >
12
+
13
+ <
script src =
" https://cdn.jsdelivr.net/npm/[email protected] /dist/algoliasearch-lite.umd.js" integrity =
" sha256-EXPXz4W6pQgfYY3yTpnDa3OH8/EPn16ciVsPQ/ypsjk=" crossorigin =
" anonymous" defer ></
script >
14
+ <
script src =
" https://cdn.jsdelivr.net/npm/[email protected] /dist/instantsearch.production.min.js" integrity =
" sha256-LAGhRRdtVoD6RLo2qDQsU2mp+XVSciKRC8XPOBWmofM=" crossorigin =
" anonymous" defer ></
script >
15
+ <script defer >
15
16
const searchClient = algoliasearch (' {{ algolia.appId }}' , ' {{ algolia.searchOnlyApiKey }}' );
16
17
17
18
const search = instantsearch ({
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments