diff --git a/render.rkt b/render.rkt index a77d1f1..937058d 100644 --- a/render.rkt +++ b/render.rkt @@ -25,7 +25,8 @@ () (main () - ,@output-cooked)))) + ,@output-cooked) + (div ((style "display: none")) "__X_MATHJAX_POLYFILL_PLACEHOLDER__")))) (display "") (display-xexpr document) diff --git a/support/nginx.conf b/support/nginx.conf new file mode 100644 index 0000000..6ded4c8 --- /dev/null +++ b/support/nginx.conf @@ -0,0 +1,16 @@ +map $http_user_agent $mathjax_polyfill { + default ""; + "~Mozilla.*Firefox/[0-9]+" ""; +} + +server { + server_name localhost; + listen 80 default; + root /var/www/html; + index index.html index.htm; + + location / { + try_files $uri $uri/ =404; + sub_filter "__X_MATHJAX_POLYFILL_PLACEHOLDER__" $mathjax_polyfill; + } +}