Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuchunyang/emacs-syntax-highlighting-as-a-service
A website to add syntax highlighting using Emacs
https://github.com/xuchunyang/emacs-syntax-highlighting-as-a-service
emacs syntax-highlighting
Last synced: 5 days ago
JSON representation
A website to add syntax highlighting using Emacs
- Host: GitHub
- URL: https://github.com/xuchunyang/emacs-syntax-highlighting-as-a-service
- Owner: xuchunyang
- Created: 2020-11-12T08:23:15.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-15T08:10:38.000Z (about 4 years ago)
- Last Synced: 2025-01-18T01:27:11.963Z (18 days ago)
- Topics: emacs, syntax-highlighting
- Language: HTML
- Homepage: https://emacs-syntax-highlight.xuchunyang.me/
- Size: 249 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Emacs syntax highlighting as a service
A website to syntax highlighting code (or any text supported by Emacs),
https://emacs-syntax-highlight.xuchunyang.me
which is powered by GNU Emacs using
[e2ansi](https://github.com/Lindydancer/e2ansi) and
[ansi-to-html](https://www.npmjs.com/package/ansi-to-html).## Run
### Container
# 1. Build the image
$ podman build -t color .
# 2. Start the server
$ podman run -d --rm -p 3478:3478 color### Local
# 1. Install e2ansi
M-x package-install e2ansi
# 2. Install ansi-to-html
$ npm install --global ansi-to-html
# 3. Export COMMAND_TEMPLATE
export COMMAND_TEMPLATE="emacs -Q --batch -l ~/.emacs.d/init.el --mode %s - | ansi-to-html"
# 4. Start the server
npm startthen visit http://localhost:3478/