Closed nirgn975 closed 4 years ago
Update: I checked the layouts html code and saw the theme added the string as they are, so now it make sense, I fixed all of them to:
[params.cdn]
# fontawesome-free@5.12.1 https://fontawesome.com/
fontawesomeFreeCSS = '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css">'
# animate.css@3.7.2 https://github.com/daneden/animate.css
animateCSS = '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">'
# smooth-scroll@16.1.2 https://github.com/cferdinandi/smooth-scroll
smoothScrollJS = '<script src="https://cdn.jsdelivr.net/gh/cferdinandi/smooth-scroll@16.1.2/dist/smooth-scroll.min.js"></script>'
# sharer@0.4.0 https://github.com/ellisonleao/sharer.js
sharerJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/sharer.js/0.4.0/sharer.min.js"></script>'
# lazysizes@5.2.0 https://github.com/aFarkas/lazysizes
lazysizesJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.0/lazysizes.min.js"></script>'
# lightgallery@1.1.3 lg-thumbnail@1.1.0 lg-zoom@1.1.0 https://github.com/sachinchoolur/lightgallery.js
lightgalleryCSS = '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.1.3/css/lightGallery.css">'
lightgalleryJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.1.3/js/lightGallery.min.js"></script>'
lightgalleryThumbnailJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/lg-thumbnail/1.1.0/lg-thumbnail.min.js"></script>'
lightgalleryZoomJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/lg-zoom/1.1.0/lg-zoom.min.js"></script>'
# typeit@6.5.1 https://github.com/alexmacarthur/typeit
typeitJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/typeit/6.5.1/typeit.min.js"></script>'
# katex@0.11.1 https://github.com/KaTeX/KaTeX
katexCSS = 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css">'
katexJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js"></script>'
katexAutoRenderJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/contrib/auto-render.min.js"></script>'
katexCopyTexCSS = 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/contrib/copy-tex.min.css'
katexCopyTexJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/contrib/copy-tex.min.js"></script>'
katexMhchemJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/contrib/mhchem.min.js"></script>'
# mermaid@8.4.8 https://github.com/knsv/mermaid
mermaidJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.4.8/mermaid.js"></script>'
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
aplayerCSS = '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.css'
aplayerJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.js"></script>'
# meting@2.0.1 https://github.com/metowolf/MetingJS
metingJS = '<script src="https://cdn.jsdelivr.net/npm/meting@2.0.1/dist/Meting.min.js"></script>'
# echarts@4.6.0 https://echarts.apache.org/
echartsJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.6.0/echarts.min.js"></script>'
echartsMacaronsJS = ''
# gitalk@1.6.2 https://github.com/gitalk/gitalk
gitalkCSS = '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/gitalk/1.6.2/gitalk.min.css">'
gitalkJS = '<script src="https://cdnjs.cloudflare.com/ajax/libs/gitalk/1.6.2/gitalk.min.js"></script>'
A lot of the errors are gone, but there still a few:
For some reason it need jQuery and cannot find it, and lightGallery
is still not defined
.
@dillonzq I would appreciate any help.
Update to version 0.2.x and revert back to the string (without HTML), fixed it.
When I build the website (with
export HUGO_ENV=production
) all the CDN urls are printed as a string in the HTML. Example:The CDN part of the
config.toml
file:This cause errors in all of the JS code:
I searched for some similar issue here, but didn't find anyone that had those errors. Anyone know how to fix this? Is this a v0.1.4 issue?
Hugo version: v0.69.0 Theme version: 0.1.4