KhronosGroup / KhronosGroup/OpenGL-Refpages

Migrate away from MathJax CDN

Open
#52 2 comments 0 reactions 1 assignee View on GitHub

@oddhack is already working on this.

Since Nov 21, 2018.

Dominant language
HTML
Stars
492
Forks
146
PR merge metrics
No merged PRs in 30d

Description

This hasn't been a problem since they implemented a redirect, but the MathJAX.org CDN has closed, and we should accomodate that. It doesn't just affect GL refpages on khronos.org, but this is a reasonable place to track the issue.

As James Riordon noted a while back, it is being used on lots of xhtml pages in the registry (eg.: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetSubroutineUniformLocation.xhtml).

This is the line:
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"/>

Also note that <script> needs a closing script tag, and not self closing. The above should be as follows:
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML”></script>

How to migrate away from mathJAX.org is located here:
https://www.mathjax.org/cdn-shutting-down/

Also, we need to add a viewport tag to all the headers of the registry pages to ensure they are properly readable on smartphones. Did one page as an example, highlighting the 2 lines that need changing in bold:

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetSubroutineUniformLocation.xhtml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>glGetSubroutineUniformLocation - OpenGL 4 Reference Pages</title>
    <link rel="stylesheet" type="text/css" href="opengl-man.css"/>
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"/>
    <meta content='width=device-width, height=device-height, minimum-scale=1.0, initial-scale=1.0, user-scalable=0' name='viewport'/>
    <script type="text/x-mathjax-config">
            MathJax.Hub.Config({
                MathML: {
                    extensions: ["content-mathml.js"]
                },
                tex2jax: {
                    inlineMath: [['$','$'], ['\\(','\\)']]
                }
            });
        </script>
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  </head>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.