Zim

Zim as a native SSG on GitLab Pages

Asked by d❤vid

Static site generators [1] allow you to store plaintext markup under version control, render the markup to HTML on a server, and present the HTML files to the reader. Obviously Zim is capable of this.

The benefit of native support on GitLab Pages (or GitHub, etc) is that instead of storing your Zim notebook in version control, manually rendering to HTML, and storing the HTML in *another* version control repo, you would have to manage only one repo, and rendering would happen every time you pushed to upstream.

How feasible would it be for a third-party to support Zim as a server-side SSG engine? Any obvious gotchas?

[1] https://www.staticgen.com

Question information

Language:
English Edit question
Status:
Solved
For:
Zim Edit question
Assignee:
No assignee Edit question
Solved by:
Jaap Karssenberg
Solved:
Last query:
Last reply:
Revision history for this message
d❤vid (kwill) said :
#1
Revision history for this message
Best Jaap Karssenberg (jaap.karssenberg) said :
#2

I think the main gotcha is that zim is written in python. I do not know what technology these generators you mention use, but if it is a different programming language, you are looking at re-implementing the interesting bits.

Second gotcha is that zim presents a notebook that consists of many pages. It uses an index to back that up. Rendering pages one-by-one will look kind of OK, but some features will not work without info from other pages.

Revision history for this message
d❤vid (kwill) said :
#3

It looks like they use their continuous integration infrastructure, which accounts for Python and other dependencies. In this case, they used the version of Zim included on Debian Jessie:

https://gitlab.com/pages/zim/blob/master/.gitlab-ci.yml

https://gitlab.com/pages/zim/blob/master/build_zim.sh

which generated this:

https://pages.gitlab.io/zim/

Revision history for this message
d❤vid (kwill) said :
#4

Thanks Jaap Karssenberg, that solved my question.