Skip to content

Build fails to respect source and sass_dir configuration options #139

@chaoscommencer

Description

@chaoscommencer

The build job will fail under the following condition:

  • The 'source' option has been manually configured in _config.yml
  • The 'sass:sass_dir' option has been manually configured in _config.yml
  • The main style sheet imports/includes another .scss/style file from the defined sass directory

Testing has shown that the build job does not resolve the 'sass:sass_dir' relative to the 'source' as jekyll documentation dictates. Instead it attempts to resolve 'sass:sass_dir' relative to the repository root. This results in style imports not being found and errors suggesting those files don't exist, e.g.

Rendering: Source/CSS/style.scss
Pre-Render Hooks: Source/CSS/style.scss
Rendering Markup: Source/CSS/style.scss
github-pages 232 | Error: File to import not found or unreadable: SyntaxHighlighter.
Load paths: /usr/local/bundle/gems/minima-2.5.1/_sass /usr/local/bundle/gems/minima-2.5.1/_sass on line 6 

In this example 'source' is assigned Source and 'sass:sass_dir' is assigned CSS in '_config.yml'.

This error was only resolved (only for this build job--causing it to instead break local builds) by changing 'sass:sass_dir' to Source/CSS (i.e. by including the 'source' prefix in the definition of 'sass:sass_dir').

Without a fix for this, one would require two versions of the '_config.yml' file--one for local building which correctly adheres to the documented and expected behavior, and one that works only for this build job.

Reference:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions