8

Highlight.js supports syntax highlighting for nginx configuration files, but support is not present on Stack Exchange’s version of highlight.js. Please consider adding support for this.

Example question on Stack Overflow demonstrating missing feature:

Windows Server Docker container cannot connect to proxy container after web server restart

6
  • 1
    Hmm. It's been a while since I have asked a nginx question but I wonder if SF, AU U&L and other sites where ngnix is on topic might benefit too
    – Journeyman Geek Mod
    Oct 11, 2020 at 8:53
  • 1
    @JourneymanGeek definitely, many nginx questions concern/reference nginx configuration.
    – pygeek
    Oct 11, 2020 at 8:55
  • This is definitely a SO decision/omission. Nginx support weighs in at 2531 bytes before compression and is included in the default build we publish. So I would wager SO is using a custom list of supported languages rather than our "common" set plus extras as many people do. Oct 17, 2020 at 21:00
  • @JoshGoebel good point. do you have a link to the build? I wasn’t able to find reference to nginx in SE build. Note that SE should be using CDN for their assets and may also want to look into service workers to cache files locally in order to reduce load times and overall bandwidth if that’s a concern.
    – pygeek
    Oct 17, 2020 at 21:21
  • Our default build: cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.1/… The loader SO appears to be using (mentioned in other threads): dev.sstatic.net/js/highlightjs-loader.en.js The "we" there was Highlight.js... our "common" build includes 38 common languages. Oct 17, 2020 at 21:27
  • @pygeek Possibly helpful if solving the problem just for yourself (or those you know willing to use an extension) if of interest: github.com/joshgoebel/se_highlightjs Oct 29, 2020 at 12:25

0

You must log in to answer this question.