kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
874 stars 132 forks source link

Referencing a JavaScript library in a post? #737

Open amca01 opened 8 months ago

amca01 commented 8 months ago

I'm using the "Hugo-Clarity" theme, which recommends that JavaScript libraries and CSS files be added to static/js and static/css. I've done this. In an ordinary html file, the js and css files would be linked in the header information.

However, I'm not sure whether I should add them to the page header information, or inside the EXPORT_HTML block which uses the library. In any case, they're not being "picked up" as it were by my html script, and the corresponding page (once run through the Hugo engine) is simply blank.

The output of hugo version is

hugo v0.122.0+extended linux/amd64 BuildDate=unknown

I'm working in Arch Linux, with a system which was fully upgraded only a few hours ago. I know this can be done, as I'm pretty sure I did it once! But I can't remember how, and in any case I was using another theme then, and linking the JavaScript files in its layouts/partials/head.html file. Anyway, thank you!