#Nuxt Content cuts pages if there's too much content?

1 messages · Page 1 of 1 (latest)

outer magnetBOT
#

Hi @wide sentinel. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The knowledge sources provided don't contain specific information about Nuxt Content truncating page ASTs or SQLite storage limits when Shiki generates large amounts of markup for long pages.

This sounds like it could be related to a database/storage size limitation in Nuxt Content v3's SQL-based storage engine (which stores parsed content as ASTs), but I cannot confirm this or suggest a fix based on the available knowledge sources.

A few things I can suggest based on what the knowledge sources do cover:

  1. Raw content as a workaround: Nuxt Content v3 supports accessing raw content via a rawbody field in your collection schema. This might help you understand what's being stored, though it won't directly fix truncation. [Raw Content]

  2. Reduce Shiki's output: You could limit the languages loaded for syntax highlighting to only what you need, which reduces the complexity of the generated ASTs. [highlight config]

export default defineNuxtConfig({
  content: {
    build: {
      markdown: {
        highlight: {
          langs: ['js', 'ts', 'vue'] // only load what you need
        }
      }
    }
  }
})

For a definitive answer on AST/SQL size limits in Nuxt Content v3, I'd recommend opening an issue on the Nuxt Content GitHub repository with your reproduction, as this appears to be a potential bug or undocumented limitation that isn't covered in the available knowledge sources.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: