Hi,
my personal blog is using the "zen" theme for quite some time now, but
as it is hosted in Germany I now risk being sued because of using the
Google fonts API[1]. Trying to fix this, I came up with a pull request
on the nikola-themes repository[2]. In order to test this, I recreated
the whole site from scratch which I have not done for some time now.
Looking at the development console on the new site I get the error
mentioned in the subject. The error is in the index.html file around
this location:
#+begin_src html
</section><script src="assets/js/all-nocdn.js"></script><!-- fancy dates --><script>
moment.locale("en");
fancydates(0, "YYYY-MM-DD HH:mm");
</script><!-- end fancy dates --><script>
#+end_src
Trying to find out, why this is an error, I followed the trail of
breadcrumbs to the "bundles" file in the zen theme, which looks like
this:
#+begin_src
assets/css/all-nocdn.css=rst_base.css,nikola_rst.css,code.css,baguetteBox.min.css,theme.css,custom.css
assets/css/all.css=rst_base.css,nikola_rst.css,code.css,baguetteBox.min.css,theme.css,custom.css
assets/js/all-nocdn.js=baguetteBox.min.js,moment-with-locales.min.js,fancydates.min.js
assets/js/all.js=fancydates.min.js
#+end_src
As I did not modify "USE_CDN", it should be false and thus
"all-nocdn.js" is relevant for my site. So if I am not mistaken, the
code should be in "moment-with-locales.min.js". Unfortunatly I cannot
find this file in the theme, so I believe it should be in the main
Nikola code. Checking the git repo, I can find this commit:
https://github.com/getnikola/nikola/commit/9a226dcf399dc698f2142ebdf3b222b9b476ac46
If I am not mistaken again, then this commit removed a file
"moment-with-locales.min.js" and may be the reason why the created
bundle does not include the "moment" code required by the index.html
file.
So can someone tell me if this reasoning is correct and how to correctly
fix this?
Thanks in advance
Detlev
[1]
https://www.theregister.com/2022/01/31/website_fine_google_fonts_gdpr/
[2]
https://github.com/getnikola/nikola-themes/pull/208