[{"data":1,"prerenderedAt":3074},["ShallowReactive",2],{"blog:2024:nuxt-content-db-and-size":3,"blogMore-Development":3060,"comments-nuxt-content-db-and-size":3073},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"tags":12,"excerpt":16,"body":48,"_type":3051,"_id":3052,"_source":495,"_file":3053,"_stem":3054,"_extension":3055,"url":3056,"wordCount":3057,"minutes":659,"commentCount":3058,"image":3059},"/blog/2024/nuxt-content-db-and-size","2024",false,"en","Nuxt Content v1 content.db database & file size","An examination of Nuxt's content.db and how to shrink it for performance.","2024-05-14T00:00:00-00:00","Development",[13,14,15],"webdev","Cloudflare","Nuxt",{"type":17,"children":18},"root",[19,35],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24,27,29,31,33],{"type":25,"value":26},"text","I've been using NuxtJS successfully for a number of client sites, and this one, for a long while. One of my clients, ",{"type":25,"value":28},"MKG Marketing",{"type":25,"value":30},", has produced a lot more content than the others with over 200 podcast episodes most containing a full transcript. It's been going very well with them maintaining all the markdown content in CloudCannon and the site itself being built and published with ",{"type":25,"value":32},"CloudFlare pages",{"type":25,"value":34},".",{"type":20,"tag":21,"props":36,"children":37},{},[38,40,42,44,46],{"type":25,"value":39},"MKG, like DamienG.com, is a Nuxt 2 site I haven't upgraded yet - the ",{"type":25,"value":41},"upgrade Nuxt guide",{"type":25,"value":43}," is a bit daunting and there's some ",{"type":25,"value":45},"Nuxt Content specific migration guidance",{"type":25,"value":47}," to go through as well.",{"type":17,"children":49,"toc":3040},[50,57,77,95,100,111,116,122,159,164,173,187,202,253,258,264,269,290,321,334,666,671,742,747,753,764,847,857,862,890,896,908,915,949,1307,1326,1338,1351,1600,1605,1624,1629,1635,1647,1652,2360,2392,2403,2980,2992,3013,3019,3024,3029,3034],{"type":20,"tag":51,"props":52,"children":54},"h2",{"id":53},"background",[55],{"type":25,"value":56},"Background",{"type":20,"tag":21,"props":58,"children":59},{},[60,61,69,70,76],{"type":25,"value":26},{"type":20,"tag":62,"props":63,"children":67},"a",{"href":64,"rel":65},"https://mkgmarketinginc.com",[66],"nofollow",[68],{"type":25,"value":28},{"type":25,"value":30},{"type":20,"tag":62,"props":71,"children":74},{"href":72,"rel":73},"https://pages.cloudflare.com/",[66],[75],{"type":25,"value":32},{"type":25,"value":34},{"type":20,"tag":21,"props":78,"children":79},{},[80,81,87,88,94],{"type":25,"value":39},{"type":20,"tag":62,"props":82,"children":85},{"href":83,"rel":84},"https://nuxt.com/docs/migration/overview",[66],[86],{"type":25,"value":41},{"type":25,"value":43},{"type":20,"tag":62,"props":89,"children":92},{"href":90,"rel":91},"https://content.nuxt.com/get-started/from-v1",[66],[93],{"type":25,"value":45},{"type":25,"value":47},{"type":20,"tag":21,"props":96,"children":97},{},[98],{"type":25,"value":99},"Getting back to the now we started seeing a build error on CloudFlare pages that looks like this:",{"type":20,"tag":101,"props":102,"children":104},"pre",{"code":103},"16:09:05.122    ✘ [ERROR] Error: Pages only supports files up to 25 MiB in size\n16:09:05.122\n16:09:05.122      _nuxt/content/db-931b471c.json is 25.1 MiB in size\n",[105],{"type":20,"tag":106,"props":107,"children":109},"code",{"__ignoreMap":108},"",[110],{"type":25,"value":103},{"type":20,"tag":21,"props":112,"children":113},{},[114],{"type":25,"value":115},"Why would NuxtJS be generating a file that large? The first thing to do is to dig in and see what's in there...",{"type":20,"tag":51,"props":117,"children":119},{"id":118},"what-is-the-contentdb-file",[120],{"type":25,"value":121},"What is the content.db file?",{"type":20,"tag":21,"props":123,"children":124},{},[125,127,133,135,141,143,149,151,157],{"type":25,"value":126},"The content.db is a JSON file created by the ",{"type":20,"tag":106,"props":128,"children":130},{"className":129},[],[131],{"type":25,"value":132},"@nuxt/content",{"type":25,"value":134}," module when building sites in static mode (",{"type":20,"tag":106,"props":136,"children":138},{"className":137},[],[139],{"type":25,"value":140},"nuxt generate",{"type":25,"value":142}," with ",{"type":20,"tag":106,"props":144,"children":146},{"className":145},[],[147],{"type":25,"value":148},"target: 'static'",{"type":25,"value":150}," in the nuxt.config.js) and placed into the ",{"type":20,"tag":106,"props":152,"children":154},{"className":153},[],[155],{"type":25,"value":156},"/dist/_nuxt/content",{"type":25,"value":158}," folder.",{"type":20,"tag":21,"props":160,"children":161},{},[162],{"type":25,"value":163},"The JSON is minified so if you want to take a peek find a good JSON viewer. I used Firefox which was a bit slow to initially load the file but once it did it was easy to navigate. The contents look like this:",{"type":20,"tag":21,"props":165,"children":166},{},[167],{"type":20,"tag":168,"props":169,"children":172},"img",{"alt":170,"src":171},"Firefox showing the contents of content.db","https://img.damieng.com/blog/firefox-content-db.png",[],{"type":20,"tag":21,"props":174,"children":175},{},[176,178,185],{"type":25,"value":177},"This file is actually a serialization of the ",{"type":20,"tag":62,"props":179,"children":182},{"href":180,"rel":181},"https://github.com/LokiJS-Forge/LokiDB",[66],[183],{"type":25,"value":184},"LokiDB",{"type":25,"value":186}," database that Nuxt Content v1 uses for two things:",{"type":20,"tag":188,"props":189,"children":190},"ol",{},[191,197],{"type":20,"tag":192,"props":193,"children":194},"li",{},[195],{"type":25,"value":196},"Client-side querying of content",{"type":20,"tag":192,"props":198,"children":199},{},[200],{"type":25,"value":201},"Serverless full-text search",{"type":20,"tag":21,"props":203,"children":204},{},[205,207,213,215,221,223,229,231,237,239,245,246,251],{"type":25,"value":206},"We can see that in the JSON there a single collection named ",{"type":20,"tag":106,"props":208,"children":210},{"className":209},[],[211],{"type":25,"value":212},"items",{"type":25,"value":214}," which contains all the content under the ",{"type":20,"tag":106,"props":216,"children":218},{"className":217},[],[219],{"type":25,"value":220},"_data",{"type":25,"value":222}," branch for client-side querying and tokenized words for the full-text search under the ",{"type":20,"tag":106,"props":224,"children":226},{"className":225},[],[227],{"type":25,"value":228},"_fullTextSearch",{"type":25,"value":230}," branch further broken down by the search field, e.g. ",{"type":20,"tag":106,"props":232,"children":234},{"className":233},[],[235],{"type":25,"value":236},"title",{"type":25,"value":238},", ",{"type":20,"tag":106,"props":240,"children":242},{"className":241},[],[243],{"type":25,"value":244},"description",{"type":25,"value":238},{"type":20,"tag":106,"props":247,"children":249},{"className":248},[],[250],{"type":25,"value":25},{"type":25,"value":252}," etc.",{"type":20,"tag":21,"props":254,"children":255},{},[256],{"type":25,"value":257},"Given that it's easy to see how the file could get large with a lot of content. Nuxt v3 doesn't offer serverless full-text search and even offers a way to chunk up the remaining content so this is just a Nuxt v2 and Content v1 problem.",{"type":20,"tag":51,"props":259,"children":261},{"id":260},"eliminate-the-contentdb-file",[262],{"type":25,"value":263},"Eliminate the content.db file?",{"type":20,"tag":21,"props":265,"children":266},{},[267],{"type":25,"value":268},"I was advised by the helpful folks at Nuxt that I could just delete the content.db file at the end of the build process if I didn't need full-text-search and my site was truly static.",{"type":20,"tag":21,"props":270,"children":271},{},[272,274,280,282,288],{"type":25,"value":273},"I tried this quickly by deleting content.db after a ",{"type":20,"tag":106,"props":275,"children":277},{"className":276},[],[278],{"type":25,"value":279},"yarn generate",{"type":25,"value":281}," and then using ",{"type":20,"tag":106,"props":283,"children":285},{"className":284},[],[286],{"type":25,"value":287},"yarn start",{"type":25,"value":289}," and I found some issues so this wasn't going to be as simple for me.",{"type":20,"tag":291,"props":292,"children":293},"blockquote",{},[294],{"type":20,"tag":21,"props":295,"children":296},{},[297,303,305,311,313,319],{"type":20,"tag":298,"props":299,"children":300},"strong",{},[301],{"type":25,"value":302},"Do not",{"type":25,"value":304}," use ",{"type":20,"tag":106,"props":306,"children":308},{"className":307},[],[309],{"type":25,"value":310},"yarn dev",{"type":25,"value":312}," for testing this as there are situation where things work in dev mode but do not work on static serving. You can also search your code base for content access in a ",{"type":20,"tag":106,"props":314,"children":316},{"className":315},[],[317],{"type":25,"value":318},"mounted",{"type":25,"value":320}," hook.",{"type":20,"tag":21,"props":322,"children":323},{},[324,326,332],{"type":25,"value":325},"If your site works great then you can add the following to your ",{"type":20,"tag":106,"props":327,"children":329},{"className":328},[],[330],{"type":25,"value":331},"nuxt.config.js",{"type":25,"value":333}," file. If you need it in some places then skip to the next section about how we can shrink it down.",{"type":20,"tag":101,"props":335,"children":339},{"code":336,"language":337,"meta":108,"className":338,"style":108},"hooks: {\n  \"generate:done\": (builder) => {\n    const options = builder.nuxt.options\n    const hash = options.publicRuntimeConfig.content.dbHash\n    const fileName = path.resolve(options.generate.dir, '_nuxt', 'content', `db-${hash}.json`)\n    fs.unlinkSync(fileName)\n  }\n}\n","js","language-js shiki shiki-themes everforest-light dracula",[340],{"type":20,"tag":106,"props":341,"children":342},{"__ignoreMap":108},[343,367,414,456,505,625,648,657],{"type":20,"tag":344,"props":345,"children":348},"span",{"class":346,"line":347},"line",1,[349,355,361],{"type":20,"tag":344,"props":350,"children":352},{"style":351},"--shiki-default:#35A77C;--shiki-dark:#F8F8F2",[353],{"type":25,"value":354},"hooks",{"type":20,"tag":344,"props":356,"children":358},{"style":357},"--shiki-default:#939F91;--shiki-dark:#F8F8F2",[359],{"type":25,"value":360},":",{"type":20,"tag":344,"props":362,"children":364},{"style":363},"--shiki-default:#5C6A72;--shiki-dark:#F8F8F2",[365],{"type":25,"value":366}," {\n",{"type":20,"tag":344,"props":368,"children":370},{"class":346,"line":369},2,[371,377,383,388,393,399,404,410],{"type":20,"tag":344,"props":372,"children":374},{"style":373},"--shiki-default:#DFA000;--shiki-dark:#E9F284",[375],{"type":25,"value":376},"  \"",{"type":20,"tag":344,"props":378,"children":380},{"style":379},"--shiki-default:#DFA000;--shiki-dark:#F1FA8C",[381],{"type":25,"value":382},"generate:done",{"type":20,"tag":344,"props":384,"children":385},{"style":373},[386],{"type":25,"value":387},"\"",{"type":20,"tag":344,"props":389,"children":390},{"style":363},[391],{"type":25,"value":392},": (",{"type":20,"tag":344,"props":394,"children":396},{"style":395},"--shiki-default:#5C6A72;--shiki-default-font-style:inherit;--shiki-dark:#FFB86C;--shiki-dark-font-style:italic",[397],{"type":25,"value":398},"builder",{"type":20,"tag":344,"props":400,"children":401},{"style":363},[402],{"type":25,"value":403},") ",{"type":20,"tag":344,"props":405,"children":407},{"style":406},"--shiki-default:#F57D26;--shiki-dark:#FF79C6",[408],{"type":25,"value":409},"=>",{"type":20,"tag":344,"props":411,"children":412},{"style":363},[413],{"type":25,"value":366},{"type":20,"tag":344,"props":415,"children":417},{"class":346,"line":416},3,[418,423,428,433,438,442,447,451],{"type":20,"tag":344,"props":419,"children":420},{"style":406},[421],{"type":25,"value":422},"    const",{"type":20,"tag":344,"props":424,"children":425},{"style":363},[426],{"type":25,"value":427}," options ",{"type":20,"tag":344,"props":429,"children":430},{"style":406},[431],{"type":25,"value":432},"=",{"type":20,"tag":344,"props":434,"children":435},{"style":363},[436],{"type":25,"value":437}," builder",{"type":20,"tag":344,"props":439,"children":440},{"style":357},[441],{"type":25,"value":34},{"type":20,"tag":344,"props":443,"children":444},{"style":363},[445],{"type":25,"value":446},"nuxt",{"type":20,"tag":344,"props":448,"children":449},{"style":357},[450],{"type":25,"value":34},{"type":20,"tag":344,"props":452,"children":453},{"style":363},[454],{"type":25,"value":455},"options\n",{"type":20,"tag":344,"props":457,"children":459},{"class":346,"line":458},4,[460,464,469,473,478,482,487,491,496,500],{"type":20,"tag":344,"props":461,"children":462},{"style":406},[463],{"type":25,"value":422},{"type":20,"tag":344,"props":465,"children":466},{"style":363},[467],{"type":25,"value":468}," hash ",{"type":20,"tag":344,"props":470,"children":471},{"style":406},[472],{"type":25,"value":432},{"type":20,"tag":344,"props":474,"children":475},{"style":363},[476],{"type":25,"value":477}," options",{"type":20,"tag":344,"props":479,"children":480},{"style":357},[481],{"type":25,"value":34},{"type":20,"tag":344,"props":483,"children":484},{"style":363},[485],{"type":25,"value":486},"publicRuntimeConfig",{"type":20,"tag":344,"props":488,"children":489},{"style":357},[490],{"type":25,"value":34},{"type":20,"tag":344,"props":492,"children":493},{"style":363},[494],{"type":25,"value":495},"content",{"type":20,"tag":344,"props":497,"children":498},{"style":357},[499],{"type":25,"value":34},{"type":20,"tag":344,"props":501,"children":502},{"style":363},[503],{"type":25,"value":504},"dbHash\n",{"type":20,"tag":344,"props":506,"children":508},{"class":346,"line":507},5,[509,513,518,522,527,531,537,542,546,551,555,560,565,570,574,578,582,586,590,594,599,605,610,615,620],{"type":20,"tag":344,"props":510,"children":511},{"style":406},[512],{"type":25,"value":422},{"type":20,"tag":344,"props":514,"children":515},{"style":363},[516],{"type":25,"value":517}," fileName ",{"type":20,"tag":344,"props":519,"children":520},{"style":406},[521],{"type":25,"value":432},{"type":20,"tag":344,"props":523,"children":524},{"style":363},[525],{"type":25,"value":526}," path",{"type":20,"tag":344,"props":528,"children":529},{"style":357},[530],{"type":25,"value":34},{"type":20,"tag":344,"props":532,"children":534},{"style":533},"--shiki-default:#8DA101;--shiki-dark:#50FA7B",[535],{"type":25,"value":536},"resolve",{"type":20,"tag":344,"props":538,"children":539},{"style":363},[540],{"type":25,"value":541},"(options",{"type":20,"tag":344,"props":543,"children":544},{"style":357},[545],{"type":25,"value":34},{"type":20,"tag":344,"props":547,"children":548},{"style":363},[549],{"type":25,"value":550},"generate",{"type":20,"tag":344,"props":552,"children":553},{"style":357},[554],{"type":25,"value":34},{"type":20,"tag":344,"props":556,"children":557},{"style":363},[558],{"type":25,"value":559},"dir, ",{"type":20,"tag":344,"props":561,"children":562},{"style":373},[563],{"type":25,"value":564},"'",{"type":20,"tag":344,"props":566,"children":567},{"style":379},[568],{"type":25,"value":569},"_nuxt",{"type":20,"tag":344,"props":571,"children":572},{"style":373},[573],{"type":25,"value":564},{"type":20,"tag":344,"props":575,"children":576},{"style":363},[577],{"type":25,"value":238},{"type":20,"tag":344,"props":579,"children":580},{"style":373},[581],{"type":25,"value":564},{"type":20,"tag":344,"props":583,"children":584},{"style":379},[585],{"type":25,"value":495},{"type":20,"tag":344,"props":587,"children":588},{"style":373},[589],{"type":25,"value":564},{"type":20,"tag":344,"props":591,"children":592},{"style":363},[593],{"type":25,"value":238},{"type":20,"tag":344,"props":595,"children":596},{"style":379},[597],{"type":25,"value":598},"`db-",{"type":20,"tag":344,"props":600,"children":602},{"style":601},"--shiki-default:#8DA101;--shiki-dark:#FF79C6",[603],{"type":25,"value":604},"${",{"type":20,"tag":344,"props":606,"children":607},{"style":363},[608],{"type":25,"value":609},"hash",{"type":20,"tag":344,"props":611,"children":612},{"style":601},[613],{"type":25,"value":614},"}",{"type":20,"tag":344,"props":616,"children":617},{"style":379},[618],{"type":25,"value":619},".json`",{"type":20,"tag":344,"props":621,"children":622},{"style":363},[623],{"type":25,"value":624},")\n",{"type":20,"tag":344,"props":626,"children":628},{"class":346,"line":627},6,[629,634,638,643],{"type":20,"tag":344,"props":630,"children":631},{"style":363},[632],{"type":25,"value":633},"    fs",{"type":20,"tag":344,"props":635,"children":636},{"style":357},[637],{"type":25,"value":34},{"type":20,"tag":344,"props":639,"children":640},{"style":533},[641],{"type":25,"value":642},"unlinkSync",{"type":20,"tag":344,"props":644,"children":645},{"style":363},[646],{"type":25,"value":647},"(fileName)\n",{"type":20,"tag":344,"props":649,"children":651},{"class":346,"line":650},7,[652],{"type":20,"tag":344,"props":653,"children":654},{"style":363},[655],{"type":25,"value":656},"  }\n",{"type":20,"tag":344,"props":658,"children":660},{"class":346,"line":659},8,[661],{"type":20,"tag":344,"props":662,"children":663},{"style":363},[664],{"type":25,"value":665},"}\n",{"type":20,"tag":21,"props":667,"children":668},{},[669],{"type":25,"value":670},"You'll also need to add the necessary imports at the top of the file if they're not already there:",{"type":20,"tag":101,"props":672,"children":674},{"code":673,"language":337,"meta":108,"className":338,"style":108},"import fs from \"fs\"\nimport path from \"path\"\n",[675],{"type":20,"tag":106,"props":676,"children":677},{"__ignoreMap":108},[678,713],{"type":20,"tag":344,"props":679,"children":680},{"class":346,"line":347},[681,687,692,698,703,708],{"type":20,"tag":344,"props":682,"children":684},{"style":683},"--shiki-default:#35A77C;--shiki-dark:#FF79C6",[685],{"type":25,"value":686},"import",{"type":20,"tag":344,"props":688,"children":689},{"style":363},[690],{"type":25,"value":691}," fs ",{"type":20,"tag":344,"props":693,"children":695},{"style":694},"--shiki-default:#F85552;--shiki-dark:#FF79C6",[696],{"type":25,"value":697},"from",{"type":20,"tag":344,"props":699,"children":700},{"style":373},[701],{"type":25,"value":702}," \"",{"type":20,"tag":344,"props":704,"children":705},{"style":379},[706],{"type":25,"value":707},"fs",{"type":20,"tag":344,"props":709,"children":710},{"style":373},[711],{"type":25,"value":712},"\"\n",{"type":20,"tag":344,"props":714,"children":715},{"class":346,"line":369},[716,720,725,729,733,738],{"type":20,"tag":344,"props":717,"children":718},{"style":683},[719],{"type":25,"value":686},{"type":20,"tag":344,"props":721,"children":722},{"style":363},[723],{"type":25,"value":724}," path ",{"type":20,"tag":344,"props":726,"children":727},{"style":694},[728],{"type":25,"value":697},{"type":20,"tag":344,"props":730,"children":731},{"style":373},[732],{"type":25,"value":702},{"type":20,"tag":344,"props":734,"children":735},{"style":379},[736],{"type":25,"value":737},"path",{"type":20,"tag":344,"props":739,"children":740},{"style":373},[741],{"type":25,"value":712},{"type":20,"tag":21,"props":743,"children":744},{},[745],{"type":25,"value":746},"If that works for you great, you're done and off you go! For the rest of us, keep reading...",{"type":20,"tag":51,"props":748,"children":750},{"id":749},"shrinking-contentdb-by-reducing-full-text-search-data",[751],{"type":25,"value":752},"Shrinking content.db by reducing full-text search data",{"type":20,"tag":21,"props":754,"children":755},{},[756,758,763],{"type":25,"value":757},"My first thought was to eliminate the full-text search data. We don't use it and if your site is big enough to hit a 25MB limit it might be time to consider a third-party search service like Algolia which I've used before with success. So let's change that with a tweak to ",{"type":20,"tag":106,"props":759,"children":761},{"className":760},[],[762],{"type":25,"value":331},{"type":25,"value":360},{"type":20,"tag":101,"props":765,"children":767},{"code":766,"language":337,"meta":108,"className":338,"style":108},"export default {\n  // ...\n  content: {\n    fullTextSearchFields: () => []\n  }\n",[768],{"type":20,"tag":106,"props":769,"children":770},{"__ignoreMap":108},[771,788,797,814,840],{"type":20,"tag":344,"props":772,"children":773},{"class":346,"line":347},[774,779,784],{"type":20,"tag":344,"props":775,"children":776},{"style":683},[777],{"type":25,"value":778},"export",{"type":20,"tag":344,"props":780,"children":781},{"style":694},[782],{"type":25,"value":783}," default",{"type":20,"tag":344,"props":785,"children":786},{"style":363},[787],{"type":25,"value":366},{"type":20,"tag":344,"props":789,"children":790},{"class":346,"line":369},[791],{"type":20,"tag":344,"props":792,"children":794},{"style":793},"--shiki-default:#939F91;--shiki-default-font-style:italic;--shiki-dark:#6272A4;--shiki-dark-font-style:inherit",[795],{"type":25,"value":796},"  // ...\n",{"type":20,"tag":344,"props":798,"children":799},{"class":346,"line":416},[800,805,810],{"type":20,"tag":344,"props":801,"children":802},{"style":363},[803],{"type":25,"value":804},"  content",{"type":20,"tag":344,"props":806,"children":808},{"style":807},"--shiki-default:#939F91;--shiki-dark:#FF79C6",[809],{"type":25,"value":360},{"type":20,"tag":344,"props":811,"children":812},{"style":363},[813],{"type":25,"value":366},{"type":20,"tag":344,"props":815,"children":816},{"class":346,"line":458},[817,822,826,831,835],{"type":20,"tag":344,"props":818,"children":819},{"style":533},[820],{"type":25,"value":821},"    fullTextSearchFields",{"type":20,"tag":344,"props":823,"children":824},{"style":807},[825],{"type":25,"value":360},{"type":20,"tag":344,"props":827,"children":828},{"style":363},[829],{"type":25,"value":830}," () ",{"type":20,"tag":344,"props":832,"children":833},{"style":406},[834],{"type":25,"value":409},{"type":20,"tag":344,"props":836,"children":837},{"style":363},[838],{"type":25,"value":839}," []\n",{"type":20,"tag":344,"props":841,"children":842},{"class":346,"line":507},[843],{"type":20,"tag":344,"props":844,"children":845},{"style":363},[846],{"type":25,"value":656},{"type":20,"tag":21,"props":848,"children":849},{},[850,855],{"type":20,"tag":298,"props":851,"children":852},{},[853],{"type":25,"value":854},"Note: this is a function not an array!",{"type":25,"value":856}," If you use an array it will still generate the full-text search data as the values are merged with the default values.",{"type":20,"tag":21,"props":858,"children":859},{},[860],{"type":25,"value":861},"This will prevent the full-text search data from being included cut the content.db significantly. Ours went from just over 25MB to 7MB. Not bad!",{"type":20,"tag":21,"props":863,"children":864},{},[865,867,873,875,881,883,888],{"type":25,"value":866},"Alternatively if you ",{"type":20,"tag":868,"props":869,"children":870},"em",{},[871],{"type":25,"value":872},"do",{"type":25,"value":874}," want a basic search you could just limit this to the fields you want to search on like ",{"type":20,"tag":106,"props":876,"children":878},{"className":877},[],[879],{"type":25,"value":880},"['title', 'description']",{"type":25,"value":882}," and still see a significant reduction in size. The ",{"type":20,"tag":106,"props":884,"children":886},{"className":885},[],[887],{"type":25,"value":25},{"type":25,"value":889}," field is the full body of the articles and carries most of the weight.",{"type":20,"tag":51,"props":891,"children":893},{"id":892},"shrinking-contentdb-by-reducing-content",[894],{"type":25,"value":895},"Shrinking content.db by reducing content",{"type":20,"tag":21,"props":897,"children":898},{},[899,901,906],{"type":25,"value":900},"If you still want to reduce the size of that content.db - and mine was still 7MB after removing the full text search - the the next target is the ",{"type":20,"tag":106,"props":902,"children":904},{"className":903},[],[905],{"type":25,"value":220},{"type":25,"value":907}," branch and the content it holds.",{"type":20,"tag":909,"props":910,"children":912},"h3",{"id":911},"fixing-pages-that-are-loading-content-client-side",[913],{"type":25,"value":914},"Fixing pages that are loading content client side",{"type":20,"tag":21,"props":916,"children":917},{},[918,920,925,927,932,934,940,942,947],{"type":25,"value":919},"In theory NuxtJS shouldn't need this data at build time as it's only used for client-side querying. But when I deleted the content.db it I found ",{"type":20,"tag":298,"props":921,"children":922},{},[923],{"type":25,"value":924},"some",{"type":25,"value":926}," of my components did not load data. They were components using ",{"type":20,"tag":106,"props":928,"children":930},{"className":929},[],[931],{"type":25,"value":318},{"type":25,"value":933}," to load data and all but one had both ",{"type":20,"tag":106,"props":935,"children":937},{"className":936},[],[938],{"type":25,"value":939},"fetch",{"type":25,"value":941}," and ",{"type":20,"tag":106,"props":943,"children":945},{"className":944},[],[946],{"type":25,"value":318},{"type":25,"value":948}," doing the same thing, e.g.",{"type":20,"tag":101,"props":950,"children":952},{"code":951,"language":337,"meta":108,"className":338,"style":108},"export default {\n  data() {\n    return {\n      positions: [],\n    }\n  },\n\n  async fetch() {\n    this.positions = await this.$content(\"about/jobs\").sortBy(\"title\").fetch()\n  },\n\n  async mounted() {\n    this.positions = await this.$content(\"about/jobs\").sortBy(\"title\").fetch()\n  },\n}\n",[953],{"type":20,"tag":106,"props":954,"children":955},{"__ignoreMap":108},[956,971,984,996,1013,1021,1029,1038,1055,1162,1170,1178,1195,1291,1299],{"type":20,"tag":344,"props":957,"children":958},{"class":346,"line":347},[959,963,967],{"type":20,"tag":344,"props":960,"children":961},{"style":683},[962],{"type":25,"value":778},{"type":20,"tag":344,"props":964,"children":965},{"style":694},[966],{"type":25,"value":783},{"type":20,"tag":344,"props":968,"children":969},{"style":363},[970],{"type":25,"value":366},{"type":20,"tag":344,"props":972,"children":973},{"class":346,"line":369},[974,979],{"type":20,"tag":344,"props":975,"children":976},{"style":533},[977],{"type":25,"value":978},"  data",{"type":20,"tag":344,"props":980,"children":981},{"style":363},[982],{"type":25,"value":983},"() {\n",{"type":20,"tag":344,"props":985,"children":986},{"class":346,"line":416},[987,992],{"type":20,"tag":344,"props":988,"children":989},{"style":694},[990],{"type":25,"value":991},"    return",{"type":20,"tag":344,"props":993,"children":994},{"style":363},[995],{"type":25,"value":366},{"type":20,"tag":344,"props":997,"children":998},{"class":346,"line":458},[999,1004,1008],{"type":20,"tag":344,"props":1000,"children":1001},{"style":363},[1002],{"type":25,"value":1003},"      positions",{"type":20,"tag":344,"props":1005,"children":1006},{"style":807},[1007],{"type":25,"value":360},{"type":20,"tag":344,"props":1009,"children":1010},{"style":363},[1011],{"type":25,"value":1012}," [],\n",{"type":20,"tag":344,"props":1014,"children":1015},{"class":346,"line":507},[1016],{"type":20,"tag":344,"props":1017,"children":1018},{"style":363},[1019],{"type":25,"value":1020},"    }\n",{"type":20,"tag":344,"props":1022,"children":1023},{"class":346,"line":627},[1024],{"type":20,"tag":344,"props":1025,"children":1026},{"style":363},[1027],{"type":25,"value":1028},"  },\n",{"type":20,"tag":344,"props":1030,"children":1031},{"class":346,"line":650},[1032],{"type":20,"tag":344,"props":1033,"children":1035},{"emptyLinePlaceholder":1034},true,[1036],{"type":25,"value":1037},"\n",{"type":20,"tag":344,"props":1039,"children":1040},{"class":346,"line":659},[1041,1046,1051],{"type":20,"tag":344,"props":1042,"children":1043},{"style":406},[1044],{"type":25,"value":1045},"  async",{"type":20,"tag":344,"props":1047,"children":1048},{"style":533},[1049],{"type":25,"value":1050}," fetch",{"type":20,"tag":344,"props":1052,"children":1053},{"style":363},[1054],{"type":25,"value":983},{"type":20,"tag":344,"props":1056,"children":1058},{"class":346,"line":1057},9,[1059,1065,1069,1074,1078,1083,1088,1092,1097,1102,1106,1111,1115,1120,1124,1129,1133,1137,1141,1145,1149,1153,1157],{"type":20,"tag":344,"props":1060,"children":1062},{"style":1061},"--shiki-default:#DF69BA;--shiki-default-font-style:inherit;--shiki-dark:#BD93F9;--shiki-dark-font-style:italic",[1063],{"type":25,"value":1064},"    this",{"type":20,"tag":344,"props":1066,"children":1067},{"style":357},[1068],{"type":25,"value":34},{"type":20,"tag":344,"props":1070,"children":1071},{"style":363},[1072],{"type":25,"value":1073},"positions ",{"type":20,"tag":344,"props":1075,"children":1076},{"style":406},[1077],{"type":25,"value":432},{"type":20,"tag":344,"props":1079,"children":1080},{"style":694},[1081],{"type":25,"value":1082}," await",{"type":20,"tag":344,"props":1084,"children":1085},{"style":1061},[1086],{"type":25,"value":1087}," this",{"type":20,"tag":344,"props":1089,"children":1090},{"style":357},[1091],{"type":25,"value":34},{"type":20,"tag":344,"props":1093,"children":1094},{"style":533},[1095],{"type":25,"value":1096},"$content",{"type":20,"tag":344,"props":1098,"children":1099},{"style":363},[1100],{"type":25,"value":1101},"(",{"type":20,"tag":344,"props":1103,"children":1104},{"style":373},[1105],{"type":25,"value":387},{"type":20,"tag":344,"props":1107,"children":1108},{"style":379},[1109],{"type":25,"value":1110},"about/jobs",{"type":20,"tag":344,"props":1112,"children":1113},{"style":373},[1114],{"type":25,"value":387},{"type":20,"tag":344,"props":1116,"children":1117},{"style":363},[1118],{"type":25,"value":1119},")",{"type":20,"tag":344,"props":1121,"children":1122},{"style":357},[1123],{"type":25,"value":34},{"type":20,"tag":344,"props":1125,"children":1126},{"style":533},[1127],{"type":25,"value":1128},"sortBy",{"type":20,"tag":344,"props":1130,"children":1131},{"style":363},[1132],{"type":25,"value":1101},{"type":20,"tag":344,"props":1134,"children":1135},{"style":373},[1136],{"type":25,"value":387},{"type":20,"tag":344,"props":1138,"children":1139},{"style":379},[1140],{"type":25,"value":236},{"type":20,"tag":344,"props":1142,"children":1143},{"style":373},[1144],{"type":25,"value":387},{"type":20,"tag":344,"props":1146,"children":1147},{"style":363},[1148],{"type":25,"value":1119},{"type":20,"tag":344,"props":1150,"children":1151},{"style":357},[1152],{"type":25,"value":34},{"type":20,"tag":344,"props":1154,"children":1155},{"style":533},[1156],{"type":25,"value":939},{"type":20,"tag":344,"props":1158,"children":1159},{"style":363},[1160],{"type":25,"value":1161},"()\n",{"type":20,"tag":344,"props":1163,"children":1165},{"class":346,"line":1164},10,[1166],{"type":20,"tag":344,"props":1167,"children":1168},{"style":363},[1169],{"type":25,"value":1028},{"type":20,"tag":344,"props":1171,"children":1173},{"class":346,"line":1172},11,[1174],{"type":20,"tag":344,"props":1175,"children":1176},{"emptyLinePlaceholder":1034},[1177],{"type":25,"value":1037},{"type":20,"tag":344,"props":1179,"children":1181},{"class":346,"line":1180},12,[1182,1186,1191],{"type":20,"tag":344,"props":1183,"children":1184},{"style":406},[1185],{"type":25,"value":1045},{"type":20,"tag":344,"props":1187,"children":1188},{"style":533},[1189],{"type":25,"value":1190}," mounted",{"type":20,"tag":344,"props":1192,"children":1193},{"style":363},[1194],{"type":25,"value":983},{"type":20,"tag":344,"props":1196,"children":1198},{"class":346,"line":1197},13,[1199,1203,1207,1211,1215,1219,1223,1227,1231,1235,1239,1243,1247,1251,1255,1259,1263,1267,1271,1275,1279,1283,1287],{"type":20,"tag":344,"props":1200,"children":1201},{"style":1061},[1202],{"type":25,"value":1064},{"type":20,"tag":344,"props":1204,"children":1205},{"style":357},[1206],{"type":25,"value":34},{"type":20,"tag":344,"props":1208,"children":1209},{"style":363},[1210],{"type":25,"value":1073},{"type":20,"tag":344,"props":1212,"children":1213},{"style":406},[1214],{"type":25,"value":432},{"type":20,"tag":344,"props":1216,"children":1217},{"style":694},[1218],{"type":25,"value":1082},{"type":20,"tag":344,"props":1220,"children":1221},{"style":1061},[1222],{"type":25,"value":1087},{"type":20,"tag":344,"props":1224,"children":1225},{"style":357},[1226],{"type":25,"value":34},{"type":20,"tag":344,"props":1228,"children":1229},{"style":533},[1230],{"type":25,"value":1096},{"type":20,"tag":344,"props":1232,"children":1233},{"style":363},[1234],{"type":25,"value":1101},{"type":20,"tag":344,"props":1236,"children":1237},{"style":373},[1238],{"type":25,"value":387},{"type":20,"tag":344,"props":1240,"children":1241},{"style":379},[1242],{"type":25,"value":1110},{"type":20,"tag":344,"props":1244,"children":1245},{"style":373},[1246],{"type":25,"value":387},{"type":20,"tag":344,"props":1248,"children":1249},{"style":363},[1250],{"type":25,"value":1119},{"type":20,"tag":344,"props":1252,"children":1253},{"style":357},[1254],{"type":25,"value":34},{"type":20,"tag":344,"props":1256,"children":1257},{"style":533},[1258],{"type":25,"value":1128},{"type":20,"tag":344,"props":1260,"children":1261},{"style":363},[1262],{"type":25,"value":1101},{"type":20,"tag":344,"props":1264,"children":1265},{"style":373},[1266],{"type":25,"value":387},{"type":20,"tag":344,"props":1268,"children":1269},{"style":379},[1270],{"type":25,"value":236},{"type":20,"tag":344,"props":1272,"children":1273},{"style":373},[1274],{"type":25,"value":387},{"type":20,"tag":344,"props":1276,"children":1277},{"style":363},[1278],{"type":25,"value":1119},{"type":20,"tag":344,"props":1280,"children":1281},{"style":357},[1282],{"type":25,"value":34},{"type":20,"tag":344,"props":1284,"children":1285},{"style":533},[1286],{"type":25,"value":939},{"type":20,"tag":344,"props":1288,"children":1289},{"style":363},[1290],{"type":25,"value":1161},{"type":20,"tag":344,"props":1292,"children":1294},{"class":346,"line":1293},14,[1295],{"type":20,"tag":344,"props":1296,"children":1297},{"style":363},[1298],{"type":25,"value":1028},{"type":20,"tag":344,"props":1300,"children":1302},{"class":346,"line":1301},15,[1303],{"type":20,"tag":344,"props":1304,"children":1305},{"style":363},[1306],{"type":25,"value":665},{"type":20,"tag":21,"props":1308,"children":1309},{},[1310,1312,1317,1319,1324],{"type":25,"value":1311},"A bell was ringing in my head. When I removed ",{"type":20,"tag":106,"props":1313,"children":1315},{"className":1314},[],[1316],{"type":25,"value":318},{"type":25,"value":1318}," from the component it worked fine ",{"type":20,"tag":298,"props":1320,"children":1321},{},[1322],{"type":25,"value":1323},"in dev mode",{"type":25,"value":1325}," but then failed to load the data in generate/start mode unless the page was manually refreshed with F5. Client-side page navigation did not load the data.",{"type":20,"tag":21,"props":1327,"children":1328},{},[1329,1331,1336],{"type":25,"value":1330},"This is, I believe, ",{"type":20,"tag":298,"props":1332,"children":1333},{},[1334],{"type":25,"value":1335},"a bug in NuxtJS",{"type":25,"value":1337}," given it works fine in dev mode. I was able to find a workaround when I noticed not ALL of my components had this problem.",{"type":20,"tag":21,"props":1339,"children":1340},{},[1341,1343,1349],{"type":25,"value":1342},"The ones that did not have the problem were using a ",{"type":20,"tag":106,"props":1344,"children":1346},{"className":1345},[],[1347],{"type":25,"value":1348},"fetchKey",{"type":25,"value":1350}," function to ensure that their data was page or instance specific. For example the \"latest from our blog\" section is keyed by category so it shows the correct 3 blog posts for the current category the page is used on. You're not supposed to need a fetchKey if the component uses the same data everywhere but this seems to be broken so let's just give it a constant key.",{"type":20,"tag":101,"props":1352,"children":1354},{"code":1353,"language":337,"meta":108,"className":338,"style":108},"export default {\n  data() {\n    return {\n      positions: [],\n    }\n  },\n\n  async fetch() {\n    this.positions = await this.$content(\"about/jobs\").sortBy(\"title\").fetch()\n  },\n\n  fetchKey: () => \"positionsSection\",\n}\n",[1355],{"type":20,"tag":106,"props":1356,"children":1357},{"__ignoreMap":108},[1358,1373,1384,1395,1410,1417,1424,1431,1446,1541,1548,1555,1593],{"type":20,"tag":344,"props":1359,"children":1360},{"class":346,"line":347},[1361,1365,1369],{"type":20,"tag":344,"props":1362,"children":1363},{"style":683},[1364],{"type":25,"value":778},{"type":20,"tag":344,"props":1366,"children":1367},{"style":694},[1368],{"type":25,"value":783},{"type":20,"tag":344,"props":1370,"children":1371},{"style":363},[1372],{"type":25,"value":366},{"type":20,"tag":344,"props":1374,"children":1375},{"class":346,"line":369},[1376,1380],{"type":20,"tag":344,"props":1377,"children":1378},{"style":533},[1379],{"type":25,"value":978},{"type":20,"tag":344,"props":1381,"children":1382},{"style":363},[1383],{"type":25,"value":983},{"type":20,"tag":344,"props":1385,"children":1386},{"class":346,"line":416},[1387,1391],{"type":20,"tag":344,"props":1388,"children":1389},{"style":694},[1390],{"type":25,"value":991},{"type":20,"tag":344,"props":1392,"children":1393},{"style":363},[1394],{"type":25,"value":366},{"type":20,"tag":344,"props":1396,"children":1397},{"class":346,"line":458},[1398,1402,1406],{"type":20,"tag":344,"props":1399,"children":1400},{"style":363},[1401],{"type":25,"value":1003},{"type":20,"tag":344,"props":1403,"children":1404},{"style":807},[1405],{"type":25,"value":360},{"type":20,"tag":344,"props":1407,"children":1408},{"style":363},[1409],{"type":25,"value":1012},{"type":20,"tag":344,"props":1411,"children":1412},{"class":346,"line":507},[1413],{"type":20,"tag":344,"props":1414,"children":1415},{"style":363},[1416],{"type":25,"value":1020},{"type":20,"tag":344,"props":1418,"children":1419},{"class":346,"line":627},[1420],{"type":20,"tag":344,"props":1421,"children":1422},{"style":363},[1423],{"type":25,"value":1028},{"type":20,"tag":344,"props":1425,"children":1426},{"class":346,"line":650},[1427],{"type":20,"tag":344,"props":1428,"children":1429},{"emptyLinePlaceholder":1034},[1430],{"type":25,"value":1037},{"type":20,"tag":344,"props":1432,"children":1433},{"class":346,"line":659},[1434,1438,1442],{"type":20,"tag":344,"props":1435,"children":1436},{"style":406},[1437],{"type":25,"value":1045},{"type":20,"tag":344,"props":1439,"children":1440},{"style":533},[1441],{"type":25,"value":1050},{"type":20,"tag":344,"props":1443,"children":1444},{"style":363},[1445],{"type":25,"value":983},{"type":20,"tag":344,"props":1447,"children":1448},{"class":346,"line":1057},[1449,1453,1457,1461,1465,1469,1473,1477,1481,1485,1489,1493,1497,1501,1505,1509,1513,1517,1521,1525,1529,1533,1537],{"type":20,"tag":344,"props":1450,"children":1451},{"style":1061},[1452],{"type":25,"value":1064},{"type":20,"tag":344,"props":1454,"children":1455},{"style":357},[1456],{"type":25,"value":34},{"type":20,"tag":344,"props":1458,"children":1459},{"style":363},[1460],{"type":25,"value":1073},{"type":20,"tag":344,"props":1462,"children":1463},{"style":406},[1464],{"type":25,"value":432},{"type":20,"tag":344,"props":1466,"children":1467},{"style":694},[1468],{"type":25,"value":1082},{"type":20,"tag":344,"props":1470,"children":1471},{"style":1061},[1472],{"type":25,"value":1087},{"type":20,"tag":344,"props":1474,"children":1475},{"style":357},[1476],{"type":25,"value":34},{"type":20,"tag":344,"props":1478,"children":1479},{"style":533},[1480],{"type":25,"value":1096},{"type":20,"tag":344,"props":1482,"children":1483},{"style":363},[1484],{"type":25,"value":1101},{"type":20,"tag":344,"props":1486,"children":1487},{"style":373},[1488],{"type":25,"value":387},{"type":20,"tag":344,"props":1490,"children":1491},{"style":379},[1492],{"type":25,"value":1110},{"type":20,"tag":344,"props":1494,"children":1495},{"style":373},[1496],{"type":25,"value":387},{"type":20,"tag":344,"props":1498,"children":1499},{"style":363},[1500],{"type":25,"value":1119},{"type":20,"tag":344,"props":1502,"children":1503},{"style":357},[1504],{"type":25,"value":34},{"type":20,"tag":344,"props":1506,"children":1507},{"style":533},[1508],{"type":25,"value":1128},{"type":20,"tag":344,"props":1510,"children":1511},{"style":363},[1512],{"type":25,"value":1101},{"type":20,"tag":344,"props":1514,"children":1515},{"style":373},[1516],{"type":25,"value":387},{"type":20,"tag":344,"props":1518,"children":1519},{"style":379},[1520],{"type":25,"value":236},{"type":20,"tag":344,"props":1522,"children":1523},{"style":373},[1524],{"type":25,"value":387},{"type":20,"tag":344,"props":1526,"children":1527},{"style":363},[1528],{"type":25,"value":1119},{"type":20,"tag":344,"props":1530,"children":1531},{"style":357},[1532],{"type":25,"value":34},{"type":20,"tag":344,"props":1534,"children":1535},{"style":533},[1536],{"type":25,"value":939},{"type":20,"tag":344,"props":1538,"children":1539},{"style":363},[1540],{"type":25,"value":1161},{"type":20,"tag":344,"props":1542,"children":1543},{"class":346,"line":1164},[1544],{"type":20,"tag":344,"props":1545,"children":1546},{"style":363},[1547],{"type":25,"value":1028},{"type":20,"tag":344,"props":1549,"children":1550},{"class":346,"line":1172},[1551],{"type":20,"tag":344,"props":1552,"children":1553},{"emptyLinePlaceholder":1034},[1554],{"type":25,"value":1037},{"type":20,"tag":344,"props":1556,"children":1557},{"class":346,"line":1180},[1558,1563,1567,1571,1575,1579,1584,1588],{"type":20,"tag":344,"props":1559,"children":1560},{"style":533},[1561],{"type":25,"value":1562},"  fetchKey",{"type":20,"tag":344,"props":1564,"children":1565},{"style":807},[1566],{"type":25,"value":360},{"type":20,"tag":344,"props":1568,"children":1569},{"style":363},[1570],{"type":25,"value":830},{"type":20,"tag":344,"props":1572,"children":1573},{"style":406},[1574],{"type":25,"value":409},{"type":20,"tag":344,"props":1576,"children":1577},{"style":373},[1578],{"type":25,"value":702},{"type":20,"tag":344,"props":1580,"children":1581},{"style":379},[1582],{"type":25,"value":1583},"positionsSection",{"type":20,"tag":344,"props":1585,"children":1586},{"style":373},[1587],{"type":25,"value":387},{"type":20,"tag":344,"props":1589,"children":1590},{"style":363},[1591],{"type":25,"value":1592},",\n",{"type":20,"tag":344,"props":1594,"children":1595},{"class":346,"line":1197},[1596],{"type":20,"tag":344,"props":1597,"children":1598},{"style":363},[1599],{"type":25,"value":665},{"type":20,"tag":21,"props":1601,"children":1602},{},[1603],{"type":25,"value":1604},"Hey presto! No more loading data client-side when client-side navigation is used!",{"type":20,"tag":21,"props":1606,"children":1607},{},[1608,1610,1615,1617,1622],{"type":25,"value":1609},"If your site is now fully working you can go add that ",{"type":20,"tag":106,"props":1611,"children":1613},{"className":1612},[],[1614],{"type":25,"value":382},{"type":25,"value":1616}," hook to your ",{"type":20,"tag":106,"props":1618,"children":1620},{"className":1619},[],[1621],{"type":25,"value":331},{"type":25,"value":1623}," file to purge content.db entirely and you're done!",{"type":20,"tag":21,"props":1625,"children":1626},{},[1627],{"type":25,"value":1628},"If however it turns out there are a few places you really do want to use some client-side content access...",{"type":20,"tag":909,"props":1630,"children":1632},{"id":1631},"the-component-that-does-need-to-load-content-client-side",[1633],{"type":25,"value":1634},"The component that does need to load content client-side...",{"type":20,"tag":21,"props":1636,"children":1637},{},[1638,1640,1645],{"type":25,"value":1639},"For us it's a component that shows some team members at random. If we use the server-rendered ",{"type":20,"tag":106,"props":1641,"children":1643},{"className":1642},[],[1644],{"type":25,"value":939},{"type":25,"value":1646}," function to select the individuals then it will be random at build-time but then static until the next site build. That's not what we want.",{"type":20,"tag":21,"props":1648,"children":1649},{},[1650],{"type":25,"value":1651},"Here's the code we're using to select 4 random team members on the client:",{"type":20,"tag":101,"props":1653,"children":1655},{"code":1654,"language":337,"meta":108,"className":338,"style":108},"export default {\n  props: {\n    team: { type: String, required: false },\n  },\n\n  data() {\n    return {\n      people: [{}, {}, {}, {}],\n    }\n  },\n\n  async mounted() {\n    const people = await this.$content(\"team\")\n      .sortBy(\"sequence\")\n      .sortBy(\"name\")\n      .fetch()\n    this.people = getRandom(people, 4)\n  },\n}\n\nfunction getRandom(arr, n) {\n  let result = new Array(n),\n    len = arr.length,\n    taken = new Array(len)\n  while (n--) {\n    const x = Math.floor(Math.random() * len)\n    result[n] = arr[x in taken ? taken[x] : x]\n    taken[x] = --len in taken ? taken[len] : len\n  }\n  return result\n}\n",[1656],{"type":20,"tag":106,"props":1657,"children":1658},{"__ignoreMap":108},[1659,1674,1690,1731,1738,1745,1756,1767,1784,1791,1798,1805,1820,1873,1906,1938,1954,1994,2002,2010,2018,2058,2093,2120,2146,2173,2233,2281,2330,2338,2352],{"type":20,"tag":344,"props":1660,"children":1661},{"class":346,"line":347},[1662,1666,1670],{"type":20,"tag":344,"props":1663,"children":1664},{"style":683},[1665],{"type":25,"value":778},{"type":20,"tag":344,"props":1667,"children":1668},{"style":694},[1669],{"type":25,"value":783},{"type":20,"tag":344,"props":1671,"children":1672},{"style":363},[1673],{"type":25,"value":366},{"type":20,"tag":344,"props":1675,"children":1676},{"class":346,"line":369},[1677,1682,1686],{"type":20,"tag":344,"props":1678,"children":1679},{"style":363},[1680],{"type":25,"value":1681},"  props",{"type":20,"tag":344,"props":1683,"children":1684},{"style":807},[1685],{"type":25,"value":360},{"type":20,"tag":344,"props":1687,"children":1688},{"style":363},[1689],{"type":25,"value":366},{"type":20,"tag":344,"props":1691,"children":1692},{"class":346,"line":416},[1693,1698,1702,1707,1711,1716,1720,1726],{"type":20,"tag":344,"props":1694,"children":1695},{"style":363},[1696],{"type":25,"value":1697},"    team",{"type":20,"tag":344,"props":1699,"children":1700},{"style":807},[1701],{"type":25,"value":360},{"type":20,"tag":344,"props":1703,"children":1704},{"style":363},[1705],{"type":25,"value":1706}," { type",{"type":20,"tag":344,"props":1708,"children":1709},{"style":807},[1710],{"type":25,"value":360},{"type":20,"tag":344,"props":1712,"children":1713},{"style":363},[1714],{"type":25,"value":1715}," String, required",{"type":20,"tag":344,"props":1717,"children":1718},{"style":807},[1719],{"type":25,"value":360},{"type":20,"tag":344,"props":1721,"children":1723},{"style":1722},"--shiki-default:#DF69BA;--shiki-dark:#BD93F9",[1724],{"type":25,"value":1725}," false",{"type":20,"tag":344,"props":1727,"children":1728},{"style":363},[1729],{"type":25,"value":1730}," },\n",{"type":20,"tag":344,"props":1732,"children":1733},{"class":346,"line":458},[1734],{"type":20,"tag":344,"props":1735,"children":1736},{"style":363},[1737],{"type":25,"value":1028},{"type":20,"tag":344,"props":1739,"children":1740},{"class":346,"line":507},[1741],{"type":20,"tag":344,"props":1742,"children":1743},{"emptyLinePlaceholder":1034},[1744],{"type":25,"value":1037},{"type":20,"tag":344,"props":1746,"children":1747},{"class":346,"line":627},[1748,1752],{"type":20,"tag":344,"props":1749,"children":1750},{"style":533},[1751],{"type":25,"value":978},{"type":20,"tag":344,"props":1753,"children":1754},{"style":363},[1755],{"type":25,"value":983},{"type":20,"tag":344,"props":1757,"children":1758},{"class":346,"line":650},[1759,1763],{"type":20,"tag":344,"props":1760,"children":1761},{"style":694},[1762],{"type":25,"value":991},{"type":20,"tag":344,"props":1764,"children":1765},{"style":363},[1766],{"type":25,"value":366},{"type":20,"tag":344,"props":1768,"children":1769},{"class":346,"line":659},[1770,1775,1779],{"type":20,"tag":344,"props":1771,"children":1772},{"style":363},[1773],{"type":25,"value":1774},"      people",{"type":20,"tag":344,"props":1776,"children":1777},{"style":807},[1778],{"type":25,"value":360},{"type":20,"tag":344,"props":1780,"children":1781},{"style":363},[1782],{"type":25,"value":1783}," [{}, {}, {}, {}],\n",{"type":20,"tag":344,"props":1785,"children":1786},{"class":346,"line":1057},[1787],{"type":20,"tag":344,"props":1788,"children":1789},{"style":363},[1790],{"type":25,"value":1020},{"type":20,"tag":344,"props":1792,"children":1793},{"class":346,"line":1164},[1794],{"type":20,"tag":344,"props":1795,"children":1796},{"style":363},[1797],{"type":25,"value":1028},{"type":20,"tag":344,"props":1799,"children":1800},{"class":346,"line":1172},[1801],{"type":20,"tag":344,"props":1802,"children":1803},{"emptyLinePlaceholder":1034},[1804],{"type":25,"value":1037},{"type":20,"tag":344,"props":1806,"children":1807},{"class":346,"line":1180},[1808,1812,1816],{"type":20,"tag":344,"props":1809,"children":1810},{"style":406},[1811],{"type":25,"value":1045},{"type":20,"tag":344,"props":1813,"children":1814},{"style":533},[1815],{"type":25,"value":1190},{"type":20,"tag":344,"props":1817,"children":1818},{"style":363},[1819],{"type":25,"value":983},{"type":20,"tag":344,"props":1821,"children":1822},{"class":346,"line":1197},[1823,1827,1832,1836,1840,1844,1848,1852,1856,1860,1865,1869],{"type":20,"tag":344,"props":1824,"children":1825},{"style":406},[1826],{"type":25,"value":422},{"type":20,"tag":344,"props":1828,"children":1829},{"style":363},[1830],{"type":25,"value":1831}," people ",{"type":20,"tag":344,"props":1833,"children":1834},{"style":406},[1835],{"type":25,"value":432},{"type":20,"tag":344,"props":1837,"children":1838},{"style":694},[1839],{"type":25,"value":1082},{"type":20,"tag":344,"props":1841,"children":1842},{"style":1061},[1843],{"type":25,"value":1087},{"type":20,"tag":344,"props":1845,"children":1846},{"style":357},[1847],{"type":25,"value":34},{"type":20,"tag":344,"props":1849,"children":1850},{"style":533},[1851],{"type":25,"value":1096},{"type":20,"tag":344,"props":1853,"children":1854},{"style":363},[1855],{"type":25,"value":1101},{"type":20,"tag":344,"props":1857,"children":1858},{"style":373},[1859],{"type":25,"value":387},{"type":20,"tag":344,"props":1861,"children":1862},{"style":379},[1863],{"type":25,"value":1864},"team",{"type":20,"tag":344,"props":1866,"children":1867},{"style":373},[1868],{"type":25,"value":387},{"type":20,"tag":344,"props":1870,"children":1871},{"style":363},[1872],{"type":25,"value":624},{"type":20,"tag":344,"props":1874,"children":1875},{"class":346,"line":1293},[1876,1881,1885,1889,1893,1898,1902],{"type":20,"tag":344,"props":1877,"children":1878},{"style":357},[1879],{"type":25,"value":1880},"      .",{"type":20,"tag":344,"props":1882,"children":1883},{"style":533},[1884],{"type":25,"value":1128},{"type":20,"tag":344,"props":1886,"children":1887},{"style":363},[1888],{"type":25,"value":1101},{"type":20,"tag":344,"props":1890,"children":1891},{"style":373},[1892],{"type":25,"value":387},{"type":20,"tag":344,"props":1894,"children":1895},{"style":379},[1896],{"type":25,"value":1897},"sequence",{"type":20,"tag":344,"props":1899,"children":1900},{"style":373},[1901],{"type":25,"value":387},{"type":20,"tag":344,"props":1903,"children":1904},{"style":363},[1905],{"type":25,"value":624},{"type":20,"tag":344,"props":1907,"children":1908},{"class":346,"line":1301},[1909,1913,1917,1921,1925,1930,1934],{"type":20,"tag":344,"props":1910,"children":1911},{"style":357},[1912],{"type":25,"value":1880},{"type":20,"tag":344,"props":1914,"children":1915},{"style":533},[1916],{"type":25,"value":1128},{"type":20,"tag":344,"props":1918,"children":1919},{"style":363},[1920],{"type":25,"value":1101},{"type":20,"tag":344,"props":1922,"children":1923},{"style":373},[1924],{"type":25,"value":387},{"type":20,"tag":344,"props":1926,"children":1927},{"style":379},[1928],{"type":25,"value":1929},"name",{"type":20,"tag":344,"props":1931,"children":1932},{"style":373},[1933],{"type":25,"value":387},{"type":20,"tag":344,"props":1935,"children":1936},{"style":363},[1937],{"type":25,"value":624},{"type":20,"tag":344,"props":1939,"children":1941},{"class":346,"line":1940},16,[1942,1946,1950],{"type":20,"tag":344,"props":1943,"children":1944},{"style":357},[1945],{"type":25,"value":1880},{"type":20,"tag":344,"props":1947,"children":1948},{"style":533},[1949],{"type":25,"value":939},{"type":20,"tag":344,"props":1951,"children":1952},{"style":363},[1953],{"type":25,"value":1161},{"type":20,"tag":344,"props":1955,"children":1957},{"class":346,"line":1956},17,[1958,1962,1966,1971,1975,1980,1985,1990],{"type":20,"tag":344,"props":1959,"children":1960},{"style":1061},[1961],{"type":25,"value":1064},{"type":20,"tag":344,"props":1963,"children":1964},{"style":357},[1965],{"type":25,"value":34},{"type":20,"tag":344,"props":1967,"children":1968},{"style":363},[1969],{"type":25,"value":1970},"people ",{"type":20,"tag":344,"props":1972,"children":1973},{"style":406},[1974],{"type":25,"value":432},{"type":20,"tag":344,"props":1976,"children":1977},{"style":533},[1978],{"type":25,"value":1979}," getRandom",{"type":20,"tag":344,"props":1981,"children":1982},{"style":363},[1983],{"type":25,"value":1984},"(people, ",{"type":20,"tag":344,"props":1986,"children":1987},{"style":1722},[1988],{"type":25,"value":1989},"4",{"type":20,"tag":344,"props":1991,"children":1992},{"style":363},[1993],{"type":25,"value":624},{"type":20,"tag":344,"props":1995,"children":1997},{"class":346,"line":1996},18,[1998],{"type":20,"tag":344,"props":1999,"children":2000},{"style":363},[2001],{"type":25,"value":1028},{"type":20,"tag":344,"props":2003,"children":2005},{"class":346,"line":2004},19,[2006],{"type":20,"tag":344,"props":2007,"children":2008},{"style":363},[2009],{"type":25,"value":665},{"type":20,"tag":344,"props":2011,"children":2013},{"class":346,"line":2012},20,[2014],{"type":20,"tag":344,"props":2015,"children":2016},{"emptyLinePlaceholder":1034},[2017],{"type":25,"value":1037},{"type":20,"tag":344,"props":2019,"children":2021},{"class":346,"line":2020},21,[2022,2027,2031,2035,2040,2045,2050,2054],{"type":20,"tag":344,"props":2023,"children":2024},{"style":694},[2025],{"type":25,"value":2026},"function",{"type":20,"tag":344,"props":2028,"children":2029},{"style":533},[2030],{"type":25,"value":1979},{"type":20,"tag":344,"props":2032,"children":2033},{"style":363},[2034],{"type":25,"value":1101},{"type":20,"tag":344,"props":2036,"children":2037},{"style":395},[2038],{"type":25,"value":2039},"arr",{"type":20,"tag":344,"props":2041,"children":2042},{"style":363},[2043],{"type":25,"value":2044},",",{"type":20,"tag":344,"props":2046,"children":2047},{"style":395},[2048],{"type":25,"value":2049}," n",{"type":20,"tag":344,"props":2051,"children":2052},{"style":363},[2053],{"type":25,"value":1119},{"type":20,"tag":344,"props":2055,"children":2056},{"style":363},[2057],{"type":25,"value":366},{"type":20,"tag":344,"props":2059,"children":2061},{"class":346,"line":2060},22,[2062,2067,2072,2077,2083,2088],{"type":20,"tag":344,"props":2063,"children":2064},{"style":406},[2065],{"type":25,"value":2066},"  let",{"type":20,"tag":344,"props":2068,"children":2069},{"style":363},[2070],{"type":25,"value":2071}," result",{"type":20,"tag":344,"props":2073,"children":2074},{"style":406},[2075],{"type":25,"value":2076}," =",{"type":20,"tag":344,"props":2078,"children":2080},{"style":2079},"--shiki-default:#F85552;--shiki-default-font-weight:inherit;--shiki-dark:#FF79C6;--shiki-dark-font-weight:bold",[2081],{"type":25,"value":2082}," new",{"type":20,"tag":344,"props":2084,"children":2085},{"style":533},[2086],{"type":25,"value":2087}," Array",{"type":20,"tag":344,"props":2089,"children":2090},{"style":363},[2091],{"type":25,"value":2092},"(n),\n",{"type":20,"tag":344,"props":2094,"children":2096},{"class":346,"line":2095},23,[2097,2102,2106,2111,2115],{"type":20,"tag":344,"props":2098,"children":2099},{"style":363},[2100],{"type":25,"value":2101},"    len",{"type":20,"tag":344,"props":2103,"children":2104},{"style":406},[2105],{"type":25,"value":2076},{"type":20,"tag":344,"props":2107,"children":2108},{"style":363},[2109],{"type":25,"value":2110}," arr",{"type":20,"tag":344,"props":2112,"children":2113},{"style":357},[2114],{"type":25,"value":34},{"type":20,"tag":344,"props":2116,"children":2117},{"style":363},[2118],{"type":25,"value":2119},"length,\n",{"type":20,"tag":344,"props":2121,"children":2123},{"class":346,"line":2122},24,[2124,2129,2133,2137,2141],{"type":20,"tag":344,"props":2125,"children":2126},{"style":363},[2127],{"type":25,"value":2128},"    taken",{"type":20,"tag":344,"props":2130,"children":2131},{"style":406},[2132],{"type":25,"value":2076},{"type":20,"tag":344,"props":2134,"children":2135},{"style":2079},[2136],{"type":25,"value":2082},{"type":20,"tag":344,"props":2138,"children":2139},{"style":533},[2140],{"type":25,"value":2087},{"type":20,"tag":344,"props":2142,"children":2143},{"style":363},[2144],{"type":25,"value":2145},"(len)\n",{"type":20,"tag":344,"props":2147,"children":2149},{"class":346,"line":2148},25,[2150,2155,2160,2165,2169],{"type":20,"tag":344,"props":2151,"children":2152},{"style":694},[2153],{"type":25,"value":2154},"  while",{"type":20,"tag":344,"props":2156,"children":2157},{"style":363},[2158],{"type":25,"value":2159}," (n",{"type":20,"tag":344,"props":2161,"children":2162},{"style":406},[2163],{"type":25,"value":2164},"--",{"type":20,"tag":344,"props":2166,"children":2167},{"style":363},[2168],{"type":25,"value":1119},{"type":20,"tag":344,"props":2170,"children":2171},{"style":363},[2172],{"type":25,"value":366},{"type":20,"tag":344,"props":2174,"children":2176},{"class":346,"line":2175},26,[2177,2181,2186,2190,2195,2199,2204,2209,2213,2218,2223,2228],{"type":20,"tag":344,"props":2178,"children":2179},{"style":406},[2180],{"type":25,"value":422},{"type":20,"tag":344,"props":2182,"children":2183},{"style":363},[2184],{"type":25,"value":2185}," x",{"type":20,"tag":344,"props":2187,"children":2188},{"style":406},[2189],{"type":25,"value":2076},{"type":20,"tag":344,"props":2191,"children":2192},{"style":363},[2193],{"type":25,"value":2194}," Math",{"type":20,"tag":344,"props":2196,"children":2197},{"style":357},[2198],{"type":25,"value":34},{"type":20,"tag":344,"props":2200,"children":2201},{"style":533},[2202],{"type":25,"value":2203},"floor",{"type":20,"tag":344,"props":2205,"children":2206},{"style":363},[2207],{"type":25,"value":2208},"(Math",{"type":20,"tag":344,"props":2210,"children":2211},{"style":357},[2212],{"type":25,"value":34},{"type":20,"tag":344,"props":2214,"children":2215},{"style":533},[2216],{"type":25,"value":2217},"random",{"type":20,"tag":344,"props":2219,"children":2220},{"style":363},[2221],{"type":25,"value":2222},"()",{"type":20,"tag":344,"props":2224,"children":2225},{"style":406},[2226],{"type":25,"value":2227}," *",{"type":20,"tag":344,"props":2229,"children":2230},{"style":363},[2231],{"type":25,"value":2232}," len)\n",{"type":20,"tag":344,"props":2234,"children":2236},{"class":346,"line":2235},27,[2237,2242,2246,2251,2256,2261,2266,2271,2276],{"type":20,"tag":344,"props":2238,"children":2239},{"style":363},[2240],{"type":25,"value":2241},"    result[n]",{"type":20,"tag":344,"props":2243,"children":2244},{"style":406},[2245],{"type":25,"value":2076},{"type":20,"tag":344,"props":2247,"children":2248},{"style":363},[2249],{"type":25,"value":2250}," arr[x",{"type":20,"tag":344,"props":2252,"children":2253},{"style":694},[2254],{"type":25,"value":2255}," in",{"type":20,"tag":344,"props":2257,"children":2258},{"style":363},[2259],{"type":25,"value":2260}," taken",{"type":20,"tag":344,"props":2262,"children":2263},{"style":406},[2264],{"type":25,"value":2265}," ?",{"type":20,"tag":344,"props":2267,"children":2268},{"style":363},[2269],{"type":25,"value":2270}," taken[x]",{"type":20,"tag":344,"props":2272,"children":2273},{"style":406},[2274],{"type":25,"value":2275}," :",{"type":20,"tag":344,"props":2277,"children":2278},{"style":363},[2279],{"type":25,"value":2280}," x]\n",{"type":20,"tag":344,"props":2282,"children":2284},{"class":346,"line":2283},28,[2285,2290,2294,2299,2304,2308,2312,2316,2321,2325],{"type":20,"tag":344,"props":2286,"children":2287},{"style":363},[2288],{"type":25,"value":2289},"    taken[x]",{"type":20,"tag":344,"props":2291,"children":2292},{"style":406},[2293],{"type":25,"value":2076},{"type":20,"tag":344,"props":2295,"children":2296},{"style":406},[2297],{"type":25,"value":2298}," --",{"type":20,"tag":344,"props":2300,"children":2301},{"style":363},[2302],{"type":25,"value":2303},"len",{"type":20,"tag":344,"props":2305,"children":2306},{"style":694},[2307],{"type":25,"value":2255},{"type":20,"tag":344,"props":2309,"children":2310},{"style":363},[2311],{"type":25,"value":2260},{"type":20,"tag":344,"props":2313,"children":2314},{"style":406},[2315],{"type":25,"value":2265},{"type":20,"tag":344,"props":2317,"children":2318},{"style":363},[2319],{"type":25,"value":2320}," taken[len]",{"type":20,"tag":344,"props":2322,"children":2323},{"style":406},[2324],{"type":25,"value":2275},{"type":20,"tag":344,"props":2326,"children":2327},{"style":363},[2328],{"type":25,"value":2329}," len\n",{"type":20,"tag":344,"props":2331,"children":2333},{"class":346,"line":2332},29,[2334],{"type":20,"tag":344,"props":2335,"children":2336},{"style":363},[2337],{"type":25,"value":656},{"type":20,"tag":344,"props":2339,"children":2341},{"class":346,"line":2340},30,[2342,2347],{"type":20,"tag":344,"props":2343,"children":2344},{"style":694},[2345],{"type":25,"value":2346},"  return",{"type":20,"tag":344,"props":2348,"children":2349},{"style":363},[2350],{"type":25,"value":2351}," result\n",{"type":20,"tag":344,"props":2353,"children":2355},{"class":346,"line":2354},31,[2356],{"type":20,"tag":344,"props":2357,"children":2358},{"style":363},[2359],{"type":25,"value":665},{"type":20,"tag":21,"props":2361,"children":2362},{},[2363,2365,2370,2372,2376,2378,2383,2385,2390],{"type":25,"value":2364},"So because the ",{"type":20,"tag":106,"props":2366,"children":2368},{"className":2367},[],[2369],{"type":25,"value":318},{"type":25,"value":2371}," hook runs client-side it's going to need ",{"type":20,"tag":868,"props":2373,"children":2374},{},[2375],{"type":25,"value":924},{"type":25,"value":2377}," content in the ",{"type":20,"tag":106,"props":2379,"children":2381},{"className":2380},[],[2382],{"type":25,"value":220},{"type":25,"value":2384}," branch of the content.db file but not ",{"type":20,"tag":868,"props":2386,"children":2387},{},[2388],{"type":25,"value":2389},"all",{"type":25,"value":2391}," of it.",{"type":20,"tag":21,"props":2393,"children":2394},{},[2395,2397,2402],{"type":25,"value":2396},"Nuxt content doesn't include a way to prune just the content we need so we're going to have to do it ourselves but no problem it's only JSON. So adding to our ",{"type":20,"tag":106,"props":2398,"children":2400},{"className":2399},[],[2401],{"type":25,"value":331},{"type":25,"value":360},{"type":20,"tag":101,"props":2404,"children":2406},{"code":2405,"language":337,"meta":108,"className":338,"style":108},"export default {\n  // ...\n  hooks: {\n    \"generate:done\": (builder) => {\n      const options = builder.nuxt.options\n      const hash = options.publicRuntimeConfig.content.dbHash\n      const fileName = path.resolve(options.generate.dir, '_nuxt', 'content', `db-${hash}.json`)\n\n      console.log('Pruning content database file:', fileName)\n      const data = JSON.parse(fs.readFileSync(fileName, 'utf8'))\n      const collection = data._collections[0]\n      collection._data = collection._data.filter(item => item.path.startsWith('/team/'))\n      fs.writeFileSync(fileName, JSON.stringify(data))\n    },\n  },\n",[2407],{"type":20,"tag":106,"props":2408,"children":2409},{"__ignoreMap":108},[2410,2425,2432,2448,2489,2525,2568,2671,2678,2717,2785,2825,2925,2965,2973],{"type":20,"tag":344,"props":2411,"children":2412},{"class":346,"line":347},[2413,2417,2421],{"type":20,"tag":344,"props":2414,"children":2415},{"style":683},[2416],{"type":25,"value":778},{"type":20,"tag":344,"props":2418,"children":2419},{"style":694},[2420],{"type":25,"value":783},{"type":20,"tag":344,"props":2422,"children":2423},{"style":363},[2424],{"type":25,"value":366},{"type":20,"tag":344,"props":2426,"children":2427},{"class":346,"line":369},[2428],{"type":20,"tag":344,"props":2429,"children":2430},{"style":793},[2431],{"type":25,"value":796},{"type":20,"tag":344,"props":2433,"children":2434},{"class":346,"line":416},[2435,2440,2444],{"type":20,"tag":344,"props":2436,"children":2437},{"style":363},[2438],{"type":25,"value":2439},"  hooks",{"type":20,"tag":344,"props":2441,"children":2442},{"style":807},[2443],{"type":25,"value":360},{"type":20,"tag":344,"props":2445,"children":2446},{"style":363},[2447],{"type":25,"value":366},{"type":20,"tag":344,"props":2449,"children":2450},{"class":346,"line":458},[2451,2456,2460,2464,2468,2473,2477,2481,2485],{"type":20,"tag":344,"props":2452,"children":2453},{"style":373},[2454],{"type":25,"value":2455},"    \"",{"type":20,"tag":344,"props":2457,"children":2458},{"style":379},[2459],{"type":25,"value":382},{"type":20,"tag":344,"props":2461,"children":2462},{"style":373},[2463],{"type":25,"value":387},{"type":20,"tag":344,"props":2465,"children":2466},{"style":807},[2467],{"type":25,"value":360},{"type":20,"tag":344,"props":2469,"children":2470},{"style":363},[2471],{"type":25,"value":2472}," (",{"type":20,"tag":344,"props":2474,"children":2475},{"style":395},[2476],{"type":25,"value":398},{"type":20,"tag":344,"props":2478,"children":2479},{"style":363},[2480],{"type":25,"value":403},{"type":20,"tag":344,"props":2482,"children":2483},{"style":406},[2484],{"type":25,"value":409},{"type":20,"tag":344,"props":2486,"children":2487},{"style":363},[2488],{"type":25,"value":366},{"type":20,"tag":344,"props":2490,"children":2491},{"class":346,"line":507},[2492,2497,2501,2505,2509,2513,2517,2521],{"type":20,"tag":344,"props":2493,"children":2494},{"style":406},[2495],{"type":25,"value":2496},"      const",{"type":20,"tag":344,"props":2498,"children":2499},{"style":363},[2500],{"type":25,"value":427},{"type":20,"tag":344,"props":2502,"children":2503},{"style":406},[2504],{"type":25,"value":432},{"type":20,"tag":344,"props":2506,"children":2507},{"style":363},[2508],{"type":25,"value":437},{"type":20,"tag":344,"props":2510,"children":2511},{"style":357},[2512],{"type":25,"value":34},{"type":20,"tag":344,"props":2514,"children":2515},{"style":363},[2516],{"type":25,"value":446},{"type":20,"tag":344,"props":2518,"children":2519},{"style":357},[2520],{"type":25,"value":34},{"type":20,"tag":344,"props":2522,"children":2523},{"style":363},[2524],{"type":25,"value":455},{"type":20,"tag":344,"props":2526,"children":2527},{"class":346,"line":627},[2528,2532,2536,2540,2544,2548,2552,2556,2560,2564],{"type":20,"tag":344,"props":2529,"children":2530},{"style":406},[2531],{"type":25,"value":2496},{"type":20,"tag":344,"props":2533,"children":2534},{"style":363},[2535],{"type":25,"value":468},{"type":20,"tag":344,"props":2537,"children":2538},{"style":406},[2539],{"type":25,"value":432},{"type":20,"tag":344,"props":2541,"children":2542},{"style":363},[2543],{"type":25,"value":477},{"type":20,"tag":344,"props":2545,"children":2546},{"style":357},[2547],{"type":25,"value":34},{"type":20,"tag":344,"props":2549,"children":2550},{"style":363},[2551],{"type":25,"value":486},{"type":20,"tag":344,"props":2553,"children":2554},{"style":357},[2555],{"type":25,"value":34},{"type":20,"tag":344,"props":2557,"children":2558},{"style":363},[2559],{"type":25,"value":495},{"type":20,"tag":344,"props":2561,"children":2562},{"style":357},[2563],{"type":25,"value":34},{"type":20,"tag":344,"props":2565,"children":2566},{"style":363},[2567],{"type":25,"value":504},{"type":20,"tag":344,"props":2569,"children":2570},{"class":346,"line":650},[2571,2575,2579,2583,2587,2591,2595,2599,2603,2607,2611,2615,2619,2623,2627,2631,2635,2639,2643,2647,2651,2655,2659,2663,2667],{"type":20,"tag":344,"props":2572,"children":2573},{"style":406},[2574],{"type":25,"value":2496},{"type":20,"tag":344,"props":2576,"children":2577},{"style":363},[2578],{"type":25,"value":517},{"type":20,"tag":344,"props":2580,"children":2581},{"style":406},[2582],{"type":25,"value":432},{"type":20,"tag":344,"props":2584,"children":2585},{"style":363},[2586],{"type":25,"value":526},{"type":20,"tag":344,"props":2588,"children":2589},{"style":357},[2590],{"type":25,"value":34},{"type":20,"tag":344,"props":2592,"children":2593},{"style":533},[2594],{"type":25,"value":536},{"type":20,"tag":344,"props":2596,"children":2597},{"style":363},[2598],{"type":25,"value":541},{"type":20,"tag":344,"props":2600,"children":2601},{"style":357},[2602],{"type":25,"value":34},{"type":20,"tag":344,"props":2604,"children":2605},{"style":363},[2606],{"type":25,"value":550},{"type":20,"tag":344,"props":2608,"children":2609},{"style":357},[2610],{"type":25,"value":34},{"type":20,"tag":344,"props":2612,"children":2613},{"style":363},[2614],{"type":25,"value":559},{"type":20,"tag":344,"props":2616,"children":2617},{"style":373},[2618],{"type":25,"value":564},{"type":20,"tag":344,"props":2620,"children":2621},{"style":379},[2622],{"type":25,"value":569},{"type":20,"tag":344,"props":2624,"children":2625},{"style":373},[2626],{"type":25,"value":564},{"type":20,"tag":344,"props":2628,"children":2629},{"style":363},[2630],{"type":25,"value":238},{"type":20,"tag":344,"props":2632,"children":2633},{"style":373},[2634],{"type":25,"value":564},{"type":20,"tag":344,"props":2636,"children":2637},{"style":379},[2638],{"type":25,"value":495},{"type":20,"tag":344,"props":2640,"children":2641},{"style":373},[2642],{"type":25,"value":564},{"type":20,"tag":344,"props":2644,"children":2645},{"style":363},[2646],{"type":25,"value":238},{"type":20,"tag":344,"props":2648,"children":2649},{"style":379},[2650],{"type":25,"value":598},{"type":20,"tag":344,"props":2652,"children":2653},{"style":601},[2654],{"type":25,"value":604},{"type":20,"tag":344,"props":2656,"children":2657},{"style":363},[2658],{"type":25,"value":609},{"type":20,"tag":344,"props":2660,"children":2661},{"style":601},[2662],{"type":25,"value":614},{"type":20,"tag":344,"props":2664,"children":2665},{"style":379},[2666],{"type":25,"value":619},{"type":20,"tag":344,"props":2668,"children":2669},{"style":363},[2670],{"type":25,"value":624},{"type":20,"tag":344,"props":2672,"children":2673},{"class":346,"line":659},[2674],{"type":20,"tag":344,"props":2675,"children":2676},{"emptyLinePlaceholder":1034},[2677],{"type":25,"value":1037},{"type":20,"tag":344,"props":2679,"children":2680},{"class":346,"line":1057},[2681,2686,2690,2695,2699,2703,2708,2712],{"type":20,"tag":344,"props":2682,"children":2683},{"style":363},[2684],{"type":25,"value":2685},"      console",{"type":20,"tag":344,"props":2687,"children":2688},{"style":357},[2689],{"type":25,"value":34},{"type":20,"tag":344,"props":2691,"children":2692},{"style":533},[2693],{"type":25,"value":2694},"log",{"type":20,"tag":344,"props":2696,"children":2697},{"style":363},[2698],{"type":25,"value":1101},{"type":20,"tag":344,"props":2700,"children":2701},{"style":373},[2702],{"type":25,"value":564},{"type":20,"tag":344,"props":2704,"children":2705},{"style":379},[2706],{"type":25,"value":2707},"Pruning content database file:",{"type":20,"tag":344,"props":2709,"children":2710},{"style":373},[2711],{"type":25,"value":564},{"type":20,"tag":344,"props":2713,"children":2714},{"style":363},[2715],{"type":25,"value":2716},", fileName)\n",{"type":20,"tag":344,"props":2718,"children":2719},{"class":346,"line":1164},[2720,2724,2729,2733,2739,2743,2748,2753,2757,2762,2767,2771,2776,2780],{"type":20,"tag":344,"props":2721,"children":2722},{"style":406},[2723],{"type":25,"value":2496},{"type":20,"tag":344,"props":2725,"children":2726},{"style":363},[2727],{"type":25,"value":2728}," data ",{"type":20,"tag":344,"props":2730,"children":2731},{"style":406},[2732],{"type":25,"value":432},{"type":20,"tag":344,"props":2734,"children":2736},{"style":2735},"--shiki-default:#5C6A72;--shiki-dark:#BD93F9",[2737],{"type":25,"value":2738}," JSON",{"type":20,"tag":344,"props":2740,"children":2741},{"style":357},[2742],{"type":25,"value":34},{"type":20,"tag":344,"props":2744,"children":2745},{"style":533},[2746],{"type":25,"value":2747},"parse",{"type":20,"tag":344,"props":2749,"children":2750},{"style":363},[2751],{"type":25,"value":2752},"(fs",{"type":20,"tag":344,"props":2754,"children":2755},{"style":357},[2756],{"type":25,"value":34},{"type":20,"tag":344,"props":2758,"children":2759},{"style":533},[2760],{"type":25,"value":2761},"readFileSync",{"type":20,"tag":344,"props":2763,"children":2764},{"style":363},[2765],{"type":25,"value":2766},"(fileName, ",{"type":20,"tag":344,"props":2768,"children":2769},{"style":373},[2770],{"type":25,"value":564},{"type":20,"tag":344,"props":2772,"children":2773},{"style":379},[2774],{"type":25,"value":2775},"utf8",{"type":20,"tag":344,"props":2777,"children":2778},{"style":373},[2779],{"type":25,"value":564},{"type":20,"tag":344,"props":2781,"children":2782},{"style":363},[2783],{"type":25,"value":2784},"))\n",{"type":20,"tag":344,"props":2786,"children":2787},{"class":346,"line":1172},[2788,2792,2797,2801,2806,2810,2815,2820],{"type":20,"tag":344,"props":2789,"children":2790},{"style":406},[2791],{"type":25,"value":2496},{"type":20,"tag":344,"props":2793,"children":2794},{"style":363},[2795],{"type":25,"value":2796}," collection ",{"type":20,"tag":344,"props":2798,"children":2799},{"style":406},[2800],{"type":25,"value":432},{"type":20,"tag":344,"props":2802,"children":2803},{"style":363},[2804],{"type":25,"value":2805}," data",{"type":20,"tag":344,"props":2807,"children":2808},{"style":357},[2809],{"type":25,"value":34},{"type":20,"tag":344,"props":2811,"children":2812},{"style":363},[2813],{"type":25,"value":2814},"_collections[",{"type":20,"tag":344,"props":2816,"children":2817},{"style":1722},[2818],{"type":25,"value":2819},"0",{"type":20,"tag":344,"props":2821,"children":2822},{"style":363},[2823],{"type":25,"value":2824},"]\n",{"type":20,"tag":344,"props":2826,"children":2827},{"class":346,"line":1180},[2828,2833,2837,2842,2846,2851,2855,2859,2863,2868,2872,2877,2882,2887,2891,2895,2899,2904,2908,2912,2917,2921],{"type":20,"tag":344,"props":2829,"children":2830},{"style":363},[2831],{"type":25,"value":2832},"      collection",{"type":20,"tag":344,"props":2834,"children":2835},{"style":357},[2836],{"type":25,"value":34},{"type":20,"tag":344,"props":2838,"children":2839},{"style":363},[2840],{"type":25,"value":2841},"_data ",{"type":20,"tag":344,"props":2843,"children":2844},{"style":406},[2845],{"type":25,"value":432},{"type":20,"tag":344,"props":2847,"children":2848},{"style":363},[2849],{"type":25,"value":2850}," collection",{"type":20,"tag":344,"props":2852,"children":2853},{"style":357},[2854],{"type":25,"value":34},{"type":20,"tag":344,"props":2856,"children":2857},{"style":363},[2858],{"type":25,"value":220},{"type":20,"tag":344,"props":2860,"children":2861},{"style":357},[2862],{"type":25,"value":34},{"type":20,"tag":344,"props":2864,"children":2865},{"style":533},[2866],{"type":25,"value":2867},"filter",{"type":20,"tag":344,"props":2869,"children":2870},{"style":363},[2871],{"type":25,"value":1101},{"type":20,"tag":344,"props":2873,"children":2874},{"style":395},[2875],{"type":25,"value":2876},"item",{"type":20,"tag":344,"props":2878,"children":2879},{"style":406},[2880],{"type":25,"value":2881}," =>",{"type":20,"tag":344,"props":2883,"children":2884},{"style":363},[2885],{"type":25,"value":2886}," item",{"type":20,"tag":344,"props":2888,"children":2889},{"style":357},[2890],{"type":25,"value":34},{"type":20,"tag":344,"props":2892,"children":2893},{"style":363},[2894],{"type":25,"value":737},{"type":20,"tag":344,"props":2896,"children":2897},{"style":357},[2898],{"type":25,"value":34},{"type":20,"tag":344,"props":2900,"children":2901},{"style":533},[2902],{"type":25,"value":2903},"startsWith",{"type":20,"tag":344,"props":2905,"children":2906},{"style":363},[2907],{"type":25,"value":1101},{"type":20,"tag":344,"props":2909,"children":2910},{"style":373},[2911],{"type":25,"value":564},{"type":20,"tag":344,"props":2913,"children":2914},{"style":379},[2915],{"type":25,"value":2916},"/team/",{"type":20,"tag":344,"props":2918,"children":2919},{"style":373},[2920],{"type":25,"value":564},{"type":20,"tag":344,"props":2922,"children":2923},{"style":363},[2924],{"type":25,"value":2784},{"type":20,"tag":344,"props":2926,"children":2927},{"class":346,"line":1197},[2928,2933,2937,2942,2946,2951,2955,2960],{"type":20,"tag":344,"props":2929,"children":2930},{"style":363},[2931],{"type":25,"value":2932},"      fs",{"type":20,"tag":344,"props":2934,"children":2935},{"style":357},[2936],{"type":25,"value":34},{"type":20,"tag":344,"props":2938,"children":2939},{"style":533},[2940],{"type":25,"value":2941},"writeFileSync",{"type":20,"tag":344,"props":2943,"children":2944},{"style":363},[2945],{"type":25,"value":2766},{"type":20,"tag":344,"props":2947,"children":2948},{"style":2735},[2949],{"type":25,"value":2950},"JSON",{"type":20,"tag":344,"props":2952,"children":2953},{"style":357},[2954],{"type":25,"value":34},{"type":20,"tag":344,"props":2956,"children":2957},{"style":533},[2958],{"type":25,"value":2959},"stringify",{"type":20,"tag":344,"props":2961,"children":2962},{"style":363},[2963],{"type":25,"value":2964},"(data))\n",{"type":20,"tag":344,"props":2966,"children":2967},{"class":346,"line":1293},[2968],{"type":20,"tag":344,"props":2969,"children":2970},{"style":363},[2971],{"type":25,"value":2972},"    },\n",{"type":20,"tag":344,"props":2974,"children":2975},{"class":346,"line":1301},[2976],{"type":20,"tag":344,"props":2977,"children":2978},{"style":363},[2979],{"type":25,"value":1028},{"type":20,"tag":21,"props":2981,"children":2982},{},[2983,2985,2990],{"type":25,"value":2984},"This brings our content.db down to just ",{"type":20,"tag":298,"props":2986,"children":2987},{},[2988],{"type":25,"value":2989},"53KB",{"type":25,"value":2991},"!",{"type":20,"tag":21,"props":2993,"children":2994},{},[2995,2997,3003,3005,3011],{"type":25,"value":2996},"Technically there's more we could do in there - pruning the ",{"type":20,"tag":106,"props":2998,"children":3000},{"className":2999},[],[3001],{"type":25,"value":3002},"body",{"type":25,"value":3004}," branch of each team profile in our case as we only use the meta - and sorting out the ",{"type":20,"tag":106,"props":3006,"children":3008},{"className":3007},[],[3009],{"type":25,"value":3010},"idIndex",{"type":25,"value":3012}," branch but it doesn't seem to cause any problems here and 53KB is small enough for me.",{"type":20,"tag":51,"props":3014,"children":3016},{"id":3015},"conclusion",[3017],{"type":25,"value":3018},"Conclusion",{"type":20,"tag":21,"props":3020,"children":3021},{},[3022],{"type":25,"value":3023},"There we go! That 25MB hard-limit of CloudFlare pages is no longer a problem and you've either eliminated it entirely (no full-text search, no client-side content access) or halved it (no full-text search) or shrunk it to a tiny stub (minimal client-side content access).",{"type":20,"tag":21,"props":3025,"children":3026},{},[3027],{"type":25,"value":3028},"Enjoy!",{"type":20,"tag":21,"props":3030,"children":3031},{},[3032],{"type":25,"value":3033},"Damien",{"type":20,"tag":3035,"props":3036,"children":3037},"style",{},[3038],{"type":25,"value":3039},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":108,"searchDepth":369,"depth":369,"links":3041},[3042,3043,3044,3045,3046,3050],{"id":53,"depth":369,"text":56},{"id":118,"depth":369,"text":121},{"id":260,"depth":369,"text":263},{"id":749,"depth":369,"text":752},{"id":892,"depth":369,"text":895,"children":3047},[3048,3049],{"id":911,"depth":416,"text":914},{"id":1631,"depth":416,"text":1634},{"id":3015,"depth":369,"text":3018},"markdown","content:blog:2024:nuxt-content-db-and-size.md","blog/2024/nuxt-content-db-and-size.md","blog/2024/nuxt-content-db-and-size","md","/blog/2024/nuxt-content-db-and-size/",1782,0,{"alt":170,"src":171},[3061,3065,3069],{"title":3062,"date":3063,"url":3064},"HTML5 Video Cheatsheet: Optimizing videos for the web","2025-12-05T00:00:00Z","/blog/2025/html5-video-cheatsheet/",{"title":3066,"date":3067,"url":3068},"Transactions in the MongoDB EF Core Provider","2025-10-25","/blog/2025/mongodb-explicit-transactions/",{"title":3070,"date":3071,"url":3072},"Queryable Encryption with the MongoDB EF Core Provider","2025-09-22","/blog/2025/mongodb-queryable-encryption/",[],1779224630563]