bundle exec jekyll serve 可以工作,但是 git build 和 user.github.io 在 'katex' 中导致构建错误

问题描述 投票:0回答:0

我在使用 jekyll git blot 插件时遇到了问题。 特别是错误信息是

  Logging at level: debug
Configuration file: /github/workspace/./_config.yml
      GitHub Pages: github-pages v228
      GitHub Pages: jekyll v3.9.3
             Theme: jekyll-theme-primer
      Theme source: /usr/local/bundle/gems/jekyll-theme-primer-0.6.0
         Requiring: jekyll-github-metadata
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
  Liquid Exception: Liquid syntax error (line 3): Unknown tag 'katexmm' in /github/workspace/_posts/2020-06-21-example.md
/usr/local/bundle/gems/liquid-4.0.4/lib/liquid/document.rb:23:in `unknown_tag': Liquid syntax error (line 3): Unknown tag 'katexmm' (Liquid::SyntaxError)
    from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/document.rb:11:in `block in parse'
    from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/block_body.rb:32:in `parse'
    from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/document.rb:10:in `parse'
    from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/document.rb:5:in `parse'
    from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/template.rb:130:in `parse'
    from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/template.rb:114:in `parse'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:13:in `block in parse'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:12:in `parse'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:121:in `render_liquid'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:79:in `render_document'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:62:in `run'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:479:in `render_regenerated'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:464:in `block (2 levels) in render_docs'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:463:in `each'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:463:in `block in render_docs'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:462:in `each_value'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:462:in `render_docs'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:191:in `render'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:71:in `process'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/command.rb:28:in `process_site'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/commands/build.rb:65:in `build'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/commands/build.rb:36:in `process'
    from /usr/local/bundle/gems/github-pages-228/bin/github-pages:70:in `block (3 levels) in <top (required)>'
    from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
    from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
    from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
    from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
    from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
    from /usr/local/bundle/gems/github-pages-228/bin/github-pages:6:in `<top (required)>'
    from /usr/local/bundle/bin/github-pages:23:in `load'
    from /usr/local/bundle/bin/github-pages:23:in `<main>'
         Requiring: jekyll-seo-tag
         Requiring: jekyll-sitemap
         Requiring: jekyll-feed
         Requiring: jekyll-coffeescript
         Requiring: jekyll-commonmark-ghpages
         Requiring: jekyll-gist
         Requiring: jekyll-github-metadata
         Requiring: jekyll-paginate
         Requiring: jekyll-relative-links
         Requiring: jekyll-optional-front-matter
         Requiring: jekyll-readme-index
         Requiring: jekyll-default-layout
         Requiring: jekyll-titles-from-headings
   GitHub Metadata: Initializing...
            Source: /github/workspace/.
       Destination: /github/workspace/./_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       EntryFilter: excluded /Gemfile
       EntryFilter: excluded /Gemfile.lock
           Reading: _posts/2020-06-21-example.md
        Generating: JekyllOptionalFrontMatter::Generator finished in 0.0001472 seconds.
        Generating: JekyllReadmeIndex::Generator finished in 0.001952905 seconds.
        Generating: Jekyll::JekyllSitemap finished in 0.000517201 seconds.
       Jekyll Feed: Generating feed for posts
        Generating: JekyllFeed::Generator finished in 0.001007203 seconds.
        Generating: Jekyll::Paginate::Pagination finished in 5.5e-06 seconds.
        Generating: JekyllRelativeLinks::Generator finished in 2.31e-05 seconds.
        Generating: JekyllDefaultLayout::Generator finished in 3.74e-05 seconds.
        Generating: JekyllTitlesFromHeadings::Generator finished in 1.24e-05 seconds.
         Rendering: _posts/2020-06-21-example.md
  Pre-Render Hooks: _posts/2020-06-21-example.md
  Rendering Liquid: _posts/2020-06-21-example.md
github-pages 228 | Error:  Liquid syntax error (line 3): Unknown tag 'katexmm'

问题:

  • 本地服务工作正常。
  • 但是 user.github.io 构建在上面出现错误。

我的版本检查:

  • 红宝石:红宝石 3.2.1(2023-02-08 修订版 31819e82c8)[arm64-darwin22]
  • Bundler 版本 2.4.10
  • github-pages 版本
| Gem                          | Version |
+------------------------------+---------+
| jekyll                       | 3.9.3   |
| jekyll-sass-converter        | 1.5.2   |
| kramdown                     | 2.3.2   |
| kramdown-parser-gfm          | 1.1.0   |
| jekyll-commonmark-ghpages    | 0.4.0   |
| liquid                       | 4.0.4   |
| rouge                        | 3.26.0  |
| github-pages-health-check    | 1.17.9  |
| jekyll-redirect-from         | 0.16.0  |
| jekyll-sitemap               | 1.4.0   |
| jekyll-feed                  | 0.15.1  |
| jekyll-gist                  | 1.5.0   |
| jekyll-paginate              | 1.1.0   |
| jekyll-coffeescript          | 1.1.1   |
| jekyll-seo-tag               | 2.8.0   |
| jekyll-github-metadata       | 2.13.0  |
| jekyll-avatar                | 0.7.0   |
| jekyll-remote-theme          | 0.4.3   |
| jekyll-include-cache         | 0.2.1   |
| jemoji                       | 0.12.0  |
| jekyll-mentions              | 1.6.0   |
| jekyll-relative-links        | 0.6.1   |
| jekyll-optional-front-matter | 0.3.2   |
| jekyll-readme-index          | 0.3.0   |
| jekyll-default-layout        | 0.1.4   |
| jekyll-titles-from-headings  | 0.5.3   |
| minima                       | 2.5.1   |
| jekyll-swiss                 | 1.0.0   |
| jekyll-theme-primer          | 0.6.0   |
| jekyll-theme-architect       | 0.2.0   |
| jekyll-theme-cayman          | 0.2.0   |
| jekyll-theme-dinky           | 0.2.0   |
| jekyll-theme-hacker          | 0.2.0   |
| jekyll-theme-leap-day        | 0.2.0   |
| jekyll-theme-merlot          | 0.2.0   |
| jekyll-theme-midnight        | 0.2.0   |
| jekyll-theme-minimal         | 0.2.0   |
| jekyll-theme-modernist       | 0.2.0   |
| jekyll-theme-slate           | 0.2.0   |
| jekyll-theme-tactile         | 0.2.0   |
| jekyll-theme-time-machine    | 0.2.0   |
+------------------------------+---------+```
- Gemfile.lock

```GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.8.2)
      public_suffix (>= 2.0.2, < 6.0)
    bibtex-ruby (6.0.0)
      latex-decode (~> 0.0)
    citeproc (1.0.10)
      namae (~> 1.0)
    citeproc-ruby (1.1.14)
      citeproc (~> 1.0, >= 1.0.9)
      csl (~> 1.6)
    colorator (1.1.0)
    concurrent-ruby (1.2.2)
    csl (1.6.0)
      namae (~> 1.0)
      rexml
    csl-styles (1.0.1.11)
      csl (~> 1.0)
    em-websocket (0.5.3)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0)
    eventmachine (1.2.7)
    execjs (2.8.1)
    ffi (1.15.5)
    forwardable-extended (2.6.0)
    http_parser.rb (0.8.0)
    i18n (1.12.0)
      concurrent-ruby (~> 1.0)
    jekyll (4.0.1)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (>= 0.9.5, < 2)
      jekyll-sass-converter (~> 2.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.1)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (~> 3.0)
      safe_yaml (~> 1.0)
      terminal-table (~> 1.8)
    jekyll-feed (0.17.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-katex (1.0.0)
      execjs (~> 2.7)
      jekyll (>= 3.6, < 5.0)
    jekyll-sass-converter (2.2.0)
      sassc (> 2.0.1, < 3.0)
    jekyll-scholar (7.1.3)
      bibtex-ruby (~> 6.0)
      citeproc-ruby (~> 1.0)
      csl-styles (~> 1.0)
      jekyll (~> 4.0)
    jekyll-seo-tag (2.8.0)
      jekyll (>= 3.8, < 5.0)
    jekyll-sitemap (1.4.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    kramdown (2.4.0)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    latex-decode (0.4.0)
    liquid (4.0.4)
    listen (3.8.0)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.3.6)
    minima (2.5.1)
      jekyll (>= 3.5, < 5.0)
      jekyll-feed (~> 0.9)
      jekyll-seo-tag (~> 2.1)
    namae (1.1.1)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (5.0.1)
    rb-fsevent (0.11.2)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.5)
    rouge (3.30.0)
    safe_yaml (1.0.5)
    sassc (2.4.0)
      ffi (~> 1.9)
    terminal-table (1.8.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    thread_safe (0.3.6)
    tzinfo (1.2.11)
      thread_safe (~> 0.1)
    tzinfo-data (1.2023.3)
      tzinfo (>= 1.0.0)
    unicode-display_width (1.8.0)
    wdm (0.1.1)
    webrick (1.8.1)

PLATFORMS
  arm64-darwin-22

DEPENDENCIES
  jekyll (~> 4.0.0)
  jekyll-feed
  jekyll-katex (~> 1.0)
  jekyll-scholar
  jekyll-sitemap
  minima (~> 2.5)
  tzinfo (~> 1.2)
  tzinfo-data
  wdm (~> 0.1.1)
  webrick (~> 1.8)

BUNDLED WITH
   2.4.10

为什么 git build 会保留那个错误???我不知道这个。 为谨慎起见,我尝试重新安装所有(rbenv、jekyll、bundler...等),删除存储库并重新制作。

github jekyll katex
© www.soinside.com 2019 - 2024. All rights reserved.