Custom unique id from Decap CMS is ignored
Environment
not relevant
Version
3.3.0
Reproduction
ID widget
https://github.com/clean-commit/decap-cms-widget-id
sample markdown file
---
id: tzRWXjSgG
title: Data
slug: data
---
---
id: x3kuT9386
title: Some Blog
categories:
- tzRWXjSgG
---
Description
Hello,
I'm trying to migrate my blog to nuxt/content 3.3.0 and I'm facing difficulties, using DecapCMS with a custom Unique ID widget, similar to this addon
https://github.com/clean-commit/decap-cms-widget-id
Each of my markdown files has a custom random ID and this ID is also used for relationships between those entities.
However, when nuxt/content reads those markdown files, the IDs in the meta block are getting ignored and replaced with the file path instead, which seems to be the new approach of nuxt/content.
I've originally tried to avoid using file names as any form of identifier, including slug, to avoid breaking relations and backlinks, because it has happened in the past without noticing it.
Is there any way to influence the ID generation of nuxt content or do I have to migrate all relationships manually and stick with using the file path?
Additional context
No response
Logs
@mklueh have solution for this?
Hi @narr07
I'm migrating to the next/content Schema and try to use the path as id, but not sure how to deal with the CMS. I think you can set the id manually using decap, but not a great experience...
I'd use Nuxt Studio but I'm stuck there as well, as monorepos are not supported.
Then I thought about moving my content in a new content repository, and link that to nuxt studio, but nuxt studio requires a Nuxt application in the repo. Thinking about setting up a fake nuxt app within the content repo, or migrating elsewhere. Luckily there are no other people working on the project besides me, so I'm able to work on the markdown files in my editor without a CMS atm.
Hey,
This is expected; unlike other fields, id is important for Nuxt Content internal routines. The id consists of [Collection Name]/[File Path in Collection Source].
The only solution for now is to use another field, key, fileId or etc
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.