question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wrong configuration_path with non-default jekyll source

See original GitHub issue

Hello

I cannot access /admin url after having launched the “serve” command (error 500) and I get this message : Errno::ENOENT - No such file or directory @ rb_sysopen - /path/to/my/website/src/_config.yml: /var/lib/gems/2.3.0/gems/jekyll-admin-0.7.0/lib/jekyll-admin/server/configuration.rb:36:in 'read'

I have to mention that I’ve changed the jekyll source path to “src” (and destination to “dist”). I find it cleaner this way. Still, I see no reason for jekyll-admin to look for the _config.yml file in the source path /path/to/my/website/src/_config.yml, since it is in the project root /path/to/my/website/_config.yml.

sorry I don’t know ruby. How could I fix this issue ?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
XhmikosRcommented, Jul 18, 2019

Any news on this? I also hit this since I never keep the src files in root.

0reactions
ashmarolicommented, Dec 10, 2019

I’m afraid this can’t be satisfactorily resolved because Jekyll doesn’t have a notion of project root. Jekyll has always looked for config files at the root of the configured source directory.

Here’s an excerpt from Jekyll’s source code:

      # Get configuration from <source>/_config.yml or <source>/<config_file>
      config_files = override["config"]
      if config_files.to_s.empty?
        default = %w(yml yaml toml).find(-> { "yml" }) do |ext|
          File.exist?(Jekyll.sanitized_path(source(override), "_config.#{ext}"))
        end
        config_files = Jekyll.sanitized_path(source(override), "_config.#{default}")
        @default_config_file = true
      end
      Array(config_files)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Default Configuration | Jekyll • Simple, blog-aware, static sites
In general, make directory path values in configuration keys like plugins_dir relative to the current working directory, not the site source.
Read more >
Jekyll serve generate wrong path in localhost - Stack Overflow
ERROR: YOUR SITE COULD NOT BE BUILT: No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, ...
Read more >
Jekyll's site.url and baseurl - Made Mistakes
When the path to the stylesheet is wrong the browser can't load it. No stylesheet == plain looking website with no styles and...
Read more >
Configuration - Minimal Mistakes - GitHub Pages
Settings that affect your entire site can be changed in Jekyll's configuration file: _config.yml , found in the root of your project.
Read more >
Configure Hugo
Disable automatic live reloading of browser window. disablePathToLower. Default value: false. Do not convert the url/path to lowercase. enableEmoji.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found