Working on making PreteXt books usable in air-gapped environments like the Kolibri offline learning platform

13 views
Skip to first unread message

Jason Altekruse

unread,
Feb 17, 2026, 11:37:10 AM (14 days ago) Feb 17
to PreTeXt development
Hello PreteXt folks,

I have been working off and on over the past couple of months on getting all of the great content that has been written in PreteXt exposed to a new audience. The Kolibri platform is designed to be deployed in environments without consistent access to the public internet, think a windows or Linux PC connected to a local network and just serving pages/exercises/videos to other devices like tablets or laptops connected to a local wifi network.


The content reaches these sites either during times when they temporarily have access to the public web, or can be delivered via a storage device like a flash drive, over what their team affectionately calls the "sneakernet".

If you would be interested in having your book be brought into this repository, I have an ask from the community. Building pretext books can be a little bit of a complicated process, especially if they can depend on different systems like webwork and sage to generate even the static versions of the books.

I would really appreciate anyone that would be willing to send me a zipped folder with the built version of your book. This ask can also be fulfilled if you have a way you can point me to a gh-pages branch or other place that the content is hosted, in a way that I can list the full contents of the folder (many web servers recommend disabling folder listing for security).

I did try to look around for github pages based deployments that would have a public copy of complete books in a location easy to clone, but so far I've run into a few cases of what looked like more complex build and deployment processes that don't always end up with a clean github branch tracking the full version history of the built books.

I have a script that appears to do a reasonable job at importing How to Think Like a Computer Scientist written by Brad Miller, which I chose because the books interactive exercises can be run using just javascipt without a need for a server, and the Kolibri content library is currently light on CS content. Unfortunately for the foreseeable future I don't anticipate making webwork, sagecell or other content that calls out to external services work in this environment. That being said the diligence put into making static and print versions useful/functional should make texts that include these features still worthwhile for inclusion in the Kolibri ecosystem.

Here is the built book listed in their repository, you will have to make an account to view it. There are some limitations in the way that the book displays in the preview here, the Kolibri platform is what individual users install on a server, and this is the companion online webapp called "Kolibri Studio" for publishing new content to their repository. The book functions/displays a little better in the deployed software, I'm trying to work on standing up a server so I can share that as well.

https://studio.learningequality.org/en/channels/1cda55e4d53a5d87bc755606bb89da5e/#/1788df8a27b64f4db8ea5ffb4af07409/a21867b6b1394675b781aaa946f6c638

Pretext already bundles lots of things into the directory that it generates so that it can be served by a simple file server. That being said, there are a few hiccups from making projects like this totally painless. PreteXt does currently rely on CDNs for several of the javascript and CSS dependencies of the project, several of which have lazily loaded portions (so far I've hit things with MathJax as well as some libraries used for interactive coding exercises that are made possible from widgets that came from Runestone, there may be other such examples).

I did find this old github issue discussing some of these limitations and the possibility of implementing this as a feature in pretext - https://github.com/PreTeXtBook/pretext/issues/444

The issues I'm running into also present some complications for standard archiving sites/tools like the Internet Archive's Wayback Machine. It is possible that re-thinking some of the architecture of the built books could be useful in making the resources useful, even long after individual books may lose active maintainers.

This message got a little long, but just wanted to share what I had come up with so far, please let me know if you can send me your built book and/or if you might be interested in joining me on this effort.

- Jason Altekruse


Jason Altekruse

unread,
Feb 17, 2026, 11:47:21 AM (13 days ago) Feb 17
to PreTeXt development
I remembered one other thought I had shared in the drop-in when I came to discuss this project a few months ago. It would be useful for solving some of the issues I'm running into, around needing a full listing of the files in the built book (mainly the "generated" and "knowl" folders are what I've run into so far), if the build process could produce a complete listing of all generated files and leave it in a standard location that most web servers would serve it by default. It wouldn't necessarily solve the general case for generic scraping solutions like the Wayback machine, but it could give the needed data for one-off projects like this to get everything needed for the book off of a standard static file server, without needing to parse and understand the structure of pretext features that put references to resources in data-attributes, as it appears it the case for the generated snippets that can show a referenced section of the book in your current context.
Reply all
Reply to author
Forward
0 new messages