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

Allow sorting of content by filename for Nuxt Content module #37

Open
mpowell-atomic opened this issue Mar 6, 2024 · 2 comments
Open

Comments

@mpowell-atomic
Copy link

Hi! I've been playing around the Pages CMS in conjunction with Nuxt and really enjoying it. Thank you! I use the Nuxt Content module which allows for sorting of content via the filename e.g.

1.first-page.md
2.second-page.md
3.third-page.md

using the initial number in the filename to sort. Is there a way to get Pages CMS to use this for sorting content and also allow creation of new content using this scheme? Thanks so much!

@hunvreus
Copy link
Member

hunvreus commented Mar 6, 2024

Aren't you files YAML frontmatter? Wouldn't you want to order by the fields present in the frontmatter?

With that being said, I think I should make the filename available for sorting/displaying (I already do but only when there are no fields). I should be able to put this in the next release (ETA: this weekend).

@mpowell-atomic
Copy link
Author

i appreciate this! i guess i’m trying to work with the default nuxt content way:
https://content.nuxt.com/usage/content-directory#ordering

thank you!

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

2 participants