diff options
| author | Jason A. Donenfeld <Jason@zx2c4.com> | 2026-09-16 14:45:54 +0200 |
|---|---|---|
| committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2026-09-18 13:52:07 +0200 |
| commit | d4940d531ba0bdffbfb95e5c0d299956bd3e4e6c (patch) | |
| tree | f9801e6a976be606d2a83873893ff0a13af0494e /filters/syntax-highlighting.js/README | |
| parent | 30559ffdb0114e3183d890b559aa6d8e149d8525 (diff) | |
| download | cgit-jd/zx2c4-deployment.tar.gz cgit-jd/zx2c4-deployment.tar.bz2 cgit-jd/zx2c4-deployment.zip | |
filters: add syntax-highlighting.jsjd/zx2c4-deployment
Move to using client-side highlighting, combining pygment's filetype
detection with highlight.js's actual highlighting logic. Use pygment's
pastie, but also bring in a generated dark version of it.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'filters/syntax-highlighting.js/README')
| -rw-r--r-- | filters/syntax-highlighting.js/README | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/filters/syntax-highlighting.js/README b/filters/syntax-highlighting.js/README new file mode 100644 index 0000000..9ea3a7f --- /dev/null +++ b/filters/syntax-highlighting.js/README @@ -0,0 +1,14 @@ +Serve this directory at /syntax-highlighting.js/ (by symlinking it from +filters/, for example) and configure cgit: + + js=/cgit.js + js=/syntax-highlighting.js/loader.js + +Remove source-filter and repo.source-filter settings. Styles and language +modules load automatically from the same directory as loader.js. +Pastie and Pastie Dark follow the browser's color preference. + +To generate the required files, install Python 3, Pygments, and Node.js, +then run from this directory: + + ./generate.py |
