idyll-lang/idyll

Katex in static output

オープン

#655 opened on 2020/07/01

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (97 件のフォーク)batch import
CLIGood First PRbughelp wanted

Repository metrics

Stars
 (1,977 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

The Katex CSS does not properly load in the static output of Idyll Equations leading to duplicated equations. It is linked via a URL that does not work under the file:// protocol.

To Reproduce

  1. idyll create
  2. accept defaults to produce a basic article
  3. replace index.idyll with a file containing only "[Equation]x = x + 1[/Equation]"
  4. run "idyll build"
  5. open with "firefox build/index.html"
  6. the equation displays twice

The equation displays twice because the Katex stylesheet appears to be included with a URL that does not work under the file:// protocol. Could the CSS be included in the stylesheet produced by "idyll build" instead?

    <link
      rel="stylesheet"
      href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css"
    />

Expected behavior Equation appears once / css is loadable.

Desktop (please complete the following information):

  • OS: Arch Linux
  • Browser: Firefox
  • Version: 77.0.1

コントリビューターガイド