Skip to content

Ignore dot file/folder in "layout/*" #1855

@leesei

Description

@leesei

It seems Hexo 3.2 breaks ignoring files, causing
TypeError: Cannot read property 'compile' of undefined.
See #1807, #1793 and many others.

source
Source folder. Place your assets (e.g. CSS and JavaScript files) here. Hexo ignores hidden files and files or folders prefixed with _ (underscore).

  1. ignoring files are processed and causes error

    touch themes/landscape/layout/.DS_Store  
    touch themes/landscape/layout/.gitkeep
  2. ignoring files in source with layout/ in path get processed TypeError: Cannot read property 'compile' of undefined with Hexo 3.2.0 #1793
    since it matched the pattern in hexo/lib/theme/processors/view.js
    (I tried to fix but failed)

    touch themes/landscape/source/_css/layout/_sidebar.scss

Workaround 1: don't name any folder layout in theme (need code change)
LouisBarranqueiro/hexo-theme-tranquilpeak#224 (comment)

Workaround 2: downgrade to 3.1.1 😢
#1793 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions