File tree Expand file tree Collapse file tree 7 files changed +7
-56
lines changed
Expand file tree Collapse file tree 7 files changed +7
-56
lines changed Original file line number Diff line number Diff line change 1919
2020# Environment variables
2121.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();
33module . exports = {
44 appId : 'VGOL4P01VV' ,
55 indexName : 'jamstack' ,
6- apiKey : process . env . ALGOLIA_API_KEY ,
76 // It’s okay to have this in the repo, it’s used in the clientside JS
87 searchOnlyApiKey : "a457b566acbf454a61eaaae2e4fee0bf" ,
98} ;
Original file line number Diff line number Diff line change 66 NODE_VERSION = " 12.16.2"
77 NODE_ENV = " production"
88
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-
219[dev ]
2210 command = " npm run start"
2311 publish = " dist"
Original file line number Diff line number Diff line change 1515 "build" : " npm-run-all build:html build:css" ,
1616 "build:html" : " eleventy" ,
1717 "build:css" : " postcss src/css/tailwind.css -o dist/css/styles.css" ,
18- "data:jamstacktv" : " youtinx pull && youtinx push" ,
1918 "watch:html" : " ELEVENTY_ENV=dev eleventy --watch --quiet" ,
2019 "watch:css" : " postcss src/css/tailwind.css -o dist/css/styles.css --watch" ,
2120 "serve" : " live-server dist --quiet --port=8090" ,
2221 "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"
2523 },
2624 "dependencies" : {
2725 "@11ty/eleventy" : " ^0.11.1" ,
4745 "postcss-cli" : " ^8.3.1" ,
4846 "postcss-import" : " ^13.0.0" ,
4947 "spdx-correct" : " ^3.1.1" ,
50- "tailwindcss" : " ^2.0.3" ,
51- "youtinx" : " ^0.4.1"
48+ "tailwindcss" : " ^2.0.3"
5249 },
5350 "devDependencies" : {
5451 "live-server" : " ^1.2.1"
Original file line number Diff line number Diff line change 11const algoliaConfig = require ( "../../../algolia.config.js" ) ;
22
3- // make sure we don’t leak algoliaConfig.apiKey
3+ // don’t hardcode anything here, make the config variables opt-in
44module . exports = {
55 appId : algoliaConfig . appId ,
66 indexName : algoliaConfig . indexName ,
Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ layout: layouts/base.njk
99 <div id =" searchbox" ></div >
1010 <div id =" hits" ></div >
1111</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 >
1516const searchClient = algoliasearch (' {{ algolia.appId }}' , ' {{ algolia.searchOnlyApiKey }}' );
1617
1718const search = instantsearch ({
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments