decaporg / decaporg/decap-cms

preview_path not does not correspond to the real path

Open
#4,963 10 comments 3 reactions 0 assignees View on GitHub
area: deploy-previews area: nested-collections area: slugs pinned type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

![Uploading image.png…]()
hugo version: 0.80.0
In editor path equal as `conversion-api/conversion-sdk-api/xhtml-converter`
title: `XHTML converter`
Preview link now as
`
netlify.app/html/conversion-api-conversion-sdk-api-xhtml-converter-_index
`
but must equal
`netlify.app/html/conversion-api/conversion-sdk-api/xhtml-converter/`

my config

```
collections:
- name: html
label: HTML
label_singular: "Page"
folder: content/html
slug: "{{slug}}"
preview_path: "html/{{slug}}"
create: true
media_folder: ''
public_folder: ''
nested:
depth: 100
summary: "{{title}}"
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Keywords", name: "keywords", widget: "string", required: false}
- {label: "Description", name: "description", widget: "string", required: false}
- {label: "Weight", name: "weight", widget: "number", value_type: "int", default: 10, step: 10, min: 1, max: 1000, required: false }
- {label: "Type", name: "type", widget: "hidden", default: "docs"}
- {label: "Body", name: "body", widget: "markdown", required: false}
meta: { path: { widget: string, label: "Path", index_file: "_index" } }
summary: "{{weight}} - {{title}}"
sortable_fields: ["weight",'title', "commit_author", "commit_date"]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.