The nuxt content module supports sorting by adding a numeric prefix to the markdown file name. However, the data retrieved is displayed from old to new by default.

The nuxt content module supports sorting by adding a numeric prefix to the markdown file name. For example:

  • 1.about.md
  • 2.contact.md
  • 3.services.md

But the data retrieved through the module's api is also in this order, and we are used to displaying the latest data on top. So my solution is to use the numeric prefix from largest to smallest.

  • 997.services.md
  • 998.contact.md
  • 999.about.md