레이아웃과 모바일 레이아웃에 동일한 헤더스크립트를 넣어야 하는데

라이믹스에서 제공하는 '레이아웃 설정 -> 헤더 스크립트'는 쓰지 못합니다.

이유 : https://github.com/rhymix/rhymix/issues/959

 

그래서 현재는 layout.html을 수정해서 쓰고 있는데

매번 수정할때마다 PC와 모바일을 두번 수정해야 해서 번거롭습니다.

그래서 파일을 하나로 통일하고, layout.html에서 불러오는 방식을 쓰려고 합니다.

 

헤더에 들어가야 하는 내용은 다음과 같습니다.

이런 내용을 담은 헤더스크립트를 불러오려면

어떤 확장자로 파일을 만들어서, 어느 폴더에 놓는 것이 적절한가요?

 

<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js">
    MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () {
        var TEX = MathJax.InputJax.TeX;
        var PREFILTER = TEX.prefilterMath;
        TEX.Augment({
            prefilterMath: function (math, displaymode, script) {
                math = "\\displaystyle{" + math;
                math = math + '}';
                return PREFILTER.call(TEX, math, displaymode, script);
            }
        });
    });
    MathJax.Hub.Config({
        extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
        jax: ["input/TeX", "output/HTML-CSS"],
        tex2jax: { inlineMath: [["$", "$"], ["\\(", "\\)"]], displayMath: [["$$", "$$"], ["\\[", "\\]"]], ignoreClass: "fr-view|nm" },
        "HTML-CSS": { availableFonts: ["TeX"], preferredFont: "TeX", undefinedFamily: "'Nanum Gothic Coding',Arial" },
        "showProcessingMessages": false,
        "messageStyle": "none",
    });
</script>
  • profile
    headscript.html 만들고 적어넣은다음
    layout.html에서
    <include target="headscript.html"/>
  • profile profile
    감사합니다 시도해보겠습니다 ㅎㅎ