fniessen / org-html-themes

Transform your Org mode files into stunning HTML documents in minutes with our Org mode HTML theme. Elevate your productivity and impress your readers! #orgmode #html #theme #productivity #design
GNU General Public License v3.0
2.22k stars 435 forks source link

Search Bar feature seems to block self-contained HTML file generation via Inliner #181

Closed mtekman closed 1 month ago

mtekman commented 1 month ago

Hello! First of all, thanks for this amazing template - it really helps sell to others why Org-Mode is such a great and versatile format to document on.

My issue is as follows:

Generating a Self Contained HTML file in Org-Mode

If I want to share my HTML document with someone, I like to pack up all the CSS and JS and images all into the HTML file so that it's just as portable as a PDF, but with nicer interactive formatting.

To do this, normally I would:

  1. include your SETUPFILE header
  2. Do the (C-c C-e h h) export to get a normal HTML file
  3. Run this normal HTML file in inliner to get a self-contained HTML file: inliner your_html_export.html > self_contained_html_export.html

Problem

Since about 4 days ago, this workflow no longer works, and I am getting blank pages generated by inliner.

Through trial and error, I've traced the issue back down to the "Search Bar" commit:

image

If I checkout commit 09fa87b, refresh my setup, and then export, my self-contained workflow runs fine. Any commit directly after that appears to generate a blank page.

Do you know what is happening here?

Test Files

Just in case you need to experiment yourself, I have a toy example file

#+title: Toy Example
#+AUTHOR: Nobody
#+EMAIL: test@mail.totallyreal.net
#+OPTIONS:   toc:2
#+SETUPFILE: ~/repos/_other/org-html-themes/org/theme-readtheorg.setup
#+PROPERTY: header-args :exports both

Test Document

#+TOC: headlines 5

* One
+ Words :: Lalalalaa

** Result
+ Name :: Sir Quackington
+ Quack :: Heavy

* Two
+ Words :: Hahahahaha
** Result
+ Name :: Sir Quackabout
+ Quack :: Medium

If I export using the latest commit, and then run inliner exported.html > self_contained.html, I get a blank page.

If I first go to the repo and then run git checkout 09fa87b , refresh my setup and then repeat the above, I get a nice self-contained page.

fniessen commented 1 month ago

Thanks @mtekman for your comments.

As I understand, it'd more a problem / limitation / ... of inliner (which I never heard of, BTW). Could you inspect a bit more in that direction? Because the new JS file is not really different from any other, isn't it?

Otherwise, personally, what I'm doing, knowing that we all are always connected nowadays, is relying on the files to be fetchable from GH directly, by using the default setup file.

mtekman commented 1 month ago

Yeah I think you're right, this is likely more an inliner issue. If I run the "blank" self-contained HTML page through xmllint --format --html to get prettified code (for debugging/diffing) it spits out a page that renders fine.

fniessen commented 1 month ago

Thanks for confirming...