Hacker News new | ask | show | jobs
by tetraodonpuffer 3887 days ago
I love pelican as a generator, it's great

The one static generator I wish there was (unless there is one and I just haven't found it) is one that would take a tree of code files and display it kinda like github does, in a browsable file browser hierarchy with syntax highlighting when drilling down to individual files.

Kind of like a precompiled static file browser, there are several dynamic file browsers around but they all require server-side code (php usually) to do the directory listing and so on, but I think it should be possible to precompute all the directory display pages with symlinks to the individual files, and do the highlighting in those in JS/CSS

I might end up writing this at some point as it's definitely an itch I'd like scratching unless it does exist already and somebody kindly points me to it

1 comments

There are a few projects that will take a tree of source code and generate HTML, like LXR:

https://en.wikipedia.org/wiki/LXR_Cross_Referencer

And I think there is one for GNU GLOBAL. The point of these is usually the cross references, not necessarily making it pretty though.