You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command line description -c, --config <config> Path to a config file other than config.toml [default: config.toml] doesn't suggest, that the path to a config file will be treated relatively to the root directory of a project.
The misunderstanding occurs only when one wants to specify both the root and config parameters with values other than the default ones. Personally I think, that in this situation it's probably most likely that the user wants to use a custom config file from other location than the project directory.
Note that the second command line parameter taking a path as a value, output_dir, is not treated relatively to the project directory.
Environment
Zola version: zola 0.10.1
Expected Behavior
The path should be treated relatively to the current work directory with the current CLI description.
Step to reproduce
Simply create a new site and then try to build it being outside of it:
zola init test
zola -r test/ -c test/config.toml build
what results in:
Building site...
Failed to load test/config.toml
Error: No `"config.toml"` file found. Are you in the right directory?
Notes
I would change the description to something like: Path to a config file other than config.toml in the project directory,
and then treat the path relatively to the cwd.
I can implement this solution if it's ok.
The text was updated successfully, but these errors were encountered:
Bug Report
Command line description
-c, --config <config> Path to a config file other than config.toml [default: config.toml]
doesn't suggest, that the path to a config file will be treated relatively to the root directory of a project.zola/components/config/src/lib.rs
Lines 8 to 19 in 79b2338
The misunderstanding occurs only when one wants to specify both the
root
andconfig
parameters with values other than the default ones. Personally I think, that in this situation it's probably most likely that the user wants to use a custom config file from other location than the project directory.Note that the second command line parameter taking a path as a value,
output_dir
, is not treated relatively to the project directory.Environment
Zola version: zola 0.10.1
Expected Behavior
The path should be treated relatively to the current work directory with the current CLI description.
Step to reproduce
Simply create a new site and then try to build it being outside of it:
zola init test zola -r test/ -c test/config.toml build
what results in:
Notes
I would change the description to something like:
Path to a config file other than config.toml in the project directory
,and then treat the path relatively to the cwd.
I can implement this solution if it's ok.
The text was updated successfully, but these errors were encountered: