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

meta: path should allow for blank paths upon publishing...fallback to path: #7094

Open
pleasantone opened this issue Feb 7, 2024 · 0 comments
Labels
area: nested-collections type: bug code to address defects in shipped code

Comments

@pleasantone
Copy link

I don't want a user to have to specify a path when 99% of the time, decap-cms already does the right thing, but I do want a user to be able to override/move a file upon edit if necessary.

I've added the meta: path: fields to my configuration:

  meta:
    path:
      index_file: index
      label: Path
      required: false <----
      widget: string

When I create a new page, the path field shows up on top, as expected.
If I do not fill in the path field, it won't let me publish, giving me the error message:

%{PATH} is not a valid path

Screenshot 2024-02-06 at 10 29 58 PM

However, it really isn't necessary for there to be a non-blank path field upon publishing. If I hadn't added meta: path: in my config, it would have defaulted to the path: and slug: parameters. With an unspecified path, it should do the same rather than refuse the publish.

decap-cms-app 3.1.1
decap-cms-core 3.3.1
decap-cms 3.1.1

CMS configuration
https://gist.github.com/pleasantone/b7002738f89ae039cc9a72a21fc69c8f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nested-collections type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

2 participants