File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -451,6 +451,12 @@ ${content}
451
451
return `<script type="module">${ script } </script>` ;
452
452
} ) ;
453
453
454
+ eleventyConfig . addShortcode ( 'algoliaid' , ( ) => {
455
+ const varsRaw = fsSync . readFileSync ( '../../public-vars.json' , 'utf8' ) ;
456
+ const vars = JSON . parse ( varsRaw ) ;
457
+ return vars . algolia . appId ;
458
+ } ) ;
459
+
454
460
// Source: https://github.com/11ty/eleventy-base-blog/blob/master/.eleventy.js
455
461
eleventyConfig . addFilter ( 'readableDate' , ( dateObj ) => {
456
462
return luxon . DateTime . fromJSDate ( dateObj , { zone : 'utc' } ) . toFormat (
Original file line number Diff line number Diff line change 41
41
< script type ="module " src ="{{ site.baseurl }}/js/tslib.js "> </ script >
42
42
{% endif %}
43
43
44
+ < link rel ="preconnect " href ="https://{% algoliaid %}-dsn.algolia.net/ " crossorigin >
45
+
44
46
< link href ="/blog/atom.xml " rel ="alternate " type ="application/atom+xml " title ="Lit Blog feed ">
45
47
< noscript > < style > body [dsd-pending ] {display : block !important ;}</ style > </ noscript >
46
48
{% block head %}{% endblock %}
You can’t perform that action at this time.
0 commit comments