Skip to content

Conversation

benjamincanac
Copy link
Member

@benjamincanac benjamincanac commented Sep 16, 2020

This PR will allow to create .json files with arrays at the root:

[
  {
    "name": "Sébastien Chopin",
    "slug": "atinux"
  },
  {
    "name": "Krutie Patel",
    "slug": "krutiepatel"
  },
  {
    "name": "Sergey Bedritsky",
    "slug": "sergeybedritsky"
  }
]

will insert:

[
  {
    "name": "Sébastien Chopin",
    "slug": "atinux",
    "dir": "/authors",
    "path": "/authors/atinux",
    "extension": ".json"
  },
  {
    "name": "Krutie Patel",
    "slug": "krutiepatel",
    "dir": "/authors",
    "path": "/authors/krutiepatel",
    "extension": ".json"
  },
  {
    "name": "Sergey Bedritsky",
    "slug": "sergeybedritsky",
    "dir": "/authors",
    "path": "/authors/sergeybedritsky",
    "extension": ".json"
  }
]

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR allows slug override.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

@benjamincanac benjamincanac marked this pull request as ready for review September 17, 2020 09:58
@benjamincanac benjamincanac merged commit 8a522a8 into dev Sep 21, 2020
@benjamincanac benjamincanac deleted the feat/json-arrays branch September 21, 2020 13:08
benjamincanac added a commit that referenced this pull request Oct 12, 2020
@stronglify13
Copy link

This feature is lost in Nuxt Content 2 ??
or if could someone help me, how should I implement it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants