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

Hugo Schema falsely flags module.imports.mounts #4526

Open
ShaunaGordon opened this issue Mar 6, 2025 · 0 comments
Open

Hugo Schema falsely flags module.imports.mounts #4526

ShaunaGordon opened this issue Mar 6, 2025 · 0 comments

Comments

@ShaunaGordon
Copy link

Area with issue?

JSON Schema

✔️ Expected Behavior

With the module import syntax added some versions back, [[module.imports]] started taking [[module.imports.mounts]], which is distinct from [[module.mounts]] in that the mounts are coming from the just-imported module as opposed to local folders. The schema should allow for this.

❌ Actual Behavior

As it stands, the schema doesn't appear to allow for it, and tools using the schema to validate throw errors such as "Additional properties are not allowed ('mounts' was unexpected)" (the VS Code extension Even Better Toml is where I'm encountering this error text, but it's clearly a validation error), because module.imports.mounts isn't defined in the schema and the addition of properties not defined in the schema is not allowed.

YAML or JSON file that does not work.

[module]
  [[module.imports]]
    path = "github.com/some/hugo-theme"
    [[module.imports.mounts]]
      source = "source/folder"
      target = "target/folder"

(I use toml for the config file where I'm running into this, but since the issue template specifically asks for yaml or json, here's what I presume is the json, translated from the above toml.)

"module": {
  "imports": [
    {
      "path": "github.com/some/hugo-theme"
      "mounts": [
        {
          "source": "source/folder",
          "target": "target/folder"
        }
      ]
    }
  ]
}

IDE or code editor.

None

Are you making a PR for this?

No, someone else must create the PR.

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