Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot sort a null object #114

Open
baoduoxu opened this issue Nov 10, 2024 · 0 comments
Open

Cannot sort a null object #114

baoduoxu opened this issue Nov 10, 2024 · 0 comments

Comments

@baoduoxu
Copy link

baoduoxu commented Nov 10, 2024

I encountered the following problems when building:

 Incremental build: disabled. Enable with --incremental
      Generating... 
      Remote Theme: Using theme zerostaticthemes/jekyll-serif-theme
       Jekyll Feed: Generating feed for posts
     Build Warning: Layout 'post' requested in _posts/2024-11-10-welcome-to-jekyll.markdown does not exist.
  Liquid Exception: Liquid error (line 18): Cannot sort a null object. in /tmp/jekyll-remote-theme-20241111-114331-3wj3d6/_layouts/teams.html
                    ------------------------------------------------
      Jekyll 4.3.4   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 
                    ------------------------------------------------
/home/xubaoduo/uestc-auto/vendor/bundle/ruby/3.0.0/gems/jekyll-4.3.4/lib/jekyll/filters.rb:302:in `sort': Liquid error (line 18): Cannot sort a null object. (Liquid::ArgumentError)

The content of _config.yml is as follows, I changed the path item under defaults, but it does not work, services and teams can not be identified:

baseurl: '/'
permalink: pretty
title: 'Jekyll Serif'

logo:
  mobile: "images/logo/logo-mobile.svg"
  mobile_height: "32px"
  mobile_width: "32px"
  desktop: "images/logo/logo.svg"
  desktop_height: "32px"
  desktop_width: "120px"

home: 
  limit_services: 6

collections:
  services:
    output: true
    sort_by: weight
  team:
    output: true
    permalink: /team/:path/

defaults:
  - scope:
      path: "jekyll-serif-theme/_services"
      type: "services"
    values:
      layout: "service"
  - scope:
      path: "jekyll-serif-theme/_team"
      type: "team"
    values:
      layout: "team"

sass:
  style: compressed # possible values: nested expanded compact compressed

plugins:
  - jekyll-environment-variables

exclude:
  - Gemfile
  - Gemfile.lock
  - node_modules
  - vendor/bundle/
  - vendor/cache/
  - vendor/gems/
  - vendor/ruby/
  - LICENSE.md
  - LICENSE
  - README.md

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant