
0
Under review
Ubooquity 3.1.0
The old 3.0.0 beta thread was becomming a bit long. Here is a new one for version 3.1.0.
(time to update !)
Customer support service by UserEcho
I actually used a mustache CDN to just render my theme's audio book section - as none of the new variable tags are available in the RAW files section of Ubooquity. But I got {{itemFolderUrl}}, {{itemCoverUrl}}, {{itemTitle}}, & {{itemTitle}} to interpret along with 2 I created {{breadcrumbUrl}} & {{breadcrumbTitle}} for navigation purposes.
However, I would be interested in knowing if Ubooquity includes an internal mustache or Jmustache CDN type package that will compile and render tags or were you just referring to using the "this", "-first", "-last", and "-index" variables with Ubooquity's mustache variables?
TIA!
G
I'm not sure what you mean by "CDN" in this context.
Ubooquity embeds the JMustache library and uses it to process the theme files, substituting variables with their values from the database.
Ubooquity only subsitutes the variable that are predefined in its code, so "-first", "-index", etc will only be usable where Ubooquity provides a list of objects (e.g. the books displayed on a page).I think I might be missing the point on the question here, let me know if I did. :)
No. You answered my question. :)
Mustache has a "content delivery network" (CDN) that, basically, allowed me to use mustache.render("template id") to create my own mustache tags as well as port some of Ubooquity's mustache variables.
Like this:
This is my breadcrumb rendering:
function renderBreadcrumbs() {
const breadcrumbs = JSON.parse(sessionStorage.getItem('breadcrumbs')) || [];
const breadcrumbNav = document.querySelector('.breadcrumb');
if (!breadcrumbNav) { console.error("Breadcrumb navigation container not found.");
return;
}
breadcrumbNav.innerHTML = '';
const template = document.getElementById('breadcrumb-template').innerHTML;
breadcrumbNav.innerHTML = breadcrumbs.map(breadcrumb => { return Mustache.render(template, { breadcrumbUrl: breadcrumb.url, breadcrumbTitle: formatAuthorName(breadcrumb.title) }); }).join('');
}
This where I loaded the mustache CDN so that the above mustache.render() works:
function loadMustache(callback) {
if (typeof Mustache === 'undefined') {
const script = document.createElement("script");
script.src = "https://cdn.jsdelivr.net/npm/mustache@4.2.0/mustache.min.js";
script.onload = callback;
script.onerror = () => console.error("Failed to load Mustache.js.");
document.head.appendChild(script);
} else {
callback(); }
}
What I was wondering is, if Ubooquity contained a JMustache CDN so theme creators could easily create their own mustache variables or pass Ubooquity's mustache variables where they aren't normally available (like I did with the RAW files section to create an audio book section)? In other words, I wanted to know if I could actually use mustache.compile() and mustache.render() in my themescript as well as the predefined variables? And I beleive the answer was "no".
If I am correct and the answer is "no". Would you consider looking into adding a mustache CDN internally to Ubooquity in the future or do you think it would cause more headaches than it's worth?
Another question: I've been trying to get a reverse proxy to work with Ubooquity. However, it seems that no matter what I do with the NAS reverse proxy service or Nginx, itself. Weirdly, it can't find tools.js, themescript.js, or sha-256.min (which is preventing java from executing).
Course, this could just be that I'm missing something obvious... Any help anyone?
Noted, I'll check if there is an issue there.
Still works fine on my Synology NAS. Using Reverse Proxy from System Settings - Portal - Reverse Proxy.
thank you Tom for this new version, anything runs nice
but the About tab in ubooquity web admin still indicate Ubooquity 2.15!! :-)
Try forced browser refresh, shows 3.1.0 for me.
Hello, Tom.
Just upgraded my docker to 3.1 yesterday, upgraded fine, except that some books have issue generating the previews with errors like:
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph three of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph R of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph R of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph R of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph R of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph A of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph A of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph E of font UFVYYC+MinionPro-Regular
It's okay to read the book afterwards, but I miss the covers :)
Running on Linux in a docker container fyi.
Thanks,
Antoine
Having problems exiting the epub reader (Firefox, Edge). Selecting "close book" in the menu does nothing in http :2202 or https: via reverse proxy. No other issues so far. Single root folder bug fixed, yeah!
Great work, thank you Tom!