gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.63k stars 7.45k forks source link

hugo github pages cicd exception #12628

Closed lushuan closed 2 months ago

lushuan commented 2 months ago

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.126.0-32c967551be308fbd14e5f0dfba0ff50a60e7f5e+extended windows/amd64 BuildDate=2024-05-14T13:24:11Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

no

issue

issue-1

github pages build with jekyll

  Liquid Exception: Liquid syntax error (line 279): Unknown tag 'load' in django-模板语法/index.md
/usr/local/bundle/gems/liquid-4.0.4/lib/liquid/document.rb:23:in `unknown_tag': Liquid syntax error (line 279): Unknown tag 'load' (Liquid::SyntaxError)

my markdown contents

{% load my_filters %}  #  Here's where the problem arises

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    ......
</body>
</html>

issue-2

github pages build with jekyll

 Liquid Exception: Liquid syntax error (line 403): Unknown tag 'extends' in django-模板语法/index.md
/usr/local/bundle/gems/liquid-4.0.4/lib/liquid/document.rb:23:in `unknown_tag': Liquid syntax error (line 403): Unknown tag 'extends' (Liquid::SyntaxError)

my markdown contents

{% extends "base.html" %}   #  Here's where the problem arises

Someone can help fix it?

jmooring commented 2 months ago

It looks like you're using Jekyll not Hugo.

lushuan commented 2 months ago

The project created by hugo was pushed to github,cicd was built through jekyll, and it felt a little strange to see 'build with jekyll'. But is indeed a jekyll, I don't know why push to making the program created by Hugo hosted on is jekyll, but in . github/workflows/hugo. yaml file I specify is run with Hugo - minify

Below is a portion of the document in .github/workflows/hugo. yaml

jobs:
  deploy: 
    runs-on: ubuntu-latest  
    steps:
      - uses: actions/checkout@v2   
        with:
          submodules: true  
          fetch-depth: 0    

      - name: Setup Hugo    
        uses: peaceiris/actions-hugo@v2 
        with:
          hugo-version: '0.126.0'
          extended: true            

      - name: Build
        run: hugo --minify  

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3 
        with:
jmooring commented 2 months ago

Please use the forum (https://discourse.gohugo.io/) for questions and troubleshooting. We prefer to use GitHub for verified bugs and vetted enhancements. Thanks.

And be prepared to share the public repository for your site.