[{"data":1,"prerenderedAt":1069},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-configuration":71,"-getting-started-configuration-surround":1065},[4,34,58],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,14,18,22,26,30],{"title":11,"path":12,"stem":13},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":15,"path":16,"stem":17},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F3.configuration",{"title":19,"path":20,"stem":21},"Usage","\u002Fgetting-started\u002Fusage","1.getting-started\u002F4.usage",{"title":23,"path":24,"stem":25},"Visual Editing","\u002Fgetting-started\u002Fvisual-editing","1.getting-started\u002F5.visual-editing",{"title":27,"path":28,"stem":29},"Live Content","\u002Fgetting-started\u002Flive-content","1.getting-started\u002F6.live-content",{"title":31,"path":32,"stem":33},"Typegen","\u002Fgetting-started\u002Ftypegen","1.getting-started\u002F7.typegen",{"title":35,"icon":6,"path":36,"stem":37,"children":38,"page":6},"Helpers","\u002Fhelpers","2.helpers",[39,43,47,51,55],{"title":40,"path":41,"stem":42},"Portable Text","\u002Fhelpers\u002Fportable-text","2.helpers\u002F1.portable-text",{"title":44,"path":45,"stem":46},"Images","\u002Fhelpers\u002Fimages","2.helpers\u002F2.images",{"title":48,"path":49,"stem":50},"Files","\u002Fhelpers\u002Ffiles","2.helpers\u002F3.files",{"title":52,"path":53,"stem":54},"Groq","\u002Fhelpers\u002Fgroq","2.helpers\u002F4.groq",{"title":23,"path":56,"stem":57},"\u002Fhelpers\u002Fvisual-editing","2.helpers\u002F5.visual-editing",{"title":59,"icon":6,"path":60,"stem":61,"children":62,"page":6},"Community","\u002Fcommunity","3.community",[63,67],{"title":64,"path":65,"stem":66},"Credits","\u002Fcommunity\u002Fcredits","3.community\u002F1.credits",{"title":68,"path":69,"stem":70},"Changelog","\u002Fcommunity\u002Fchangelog","3.community\u002F2.changelog",{"id":72,"title":15,"body":73,"description":1059,"extension":1060,"links":1061,"meta":1062,"navigation":145,"path":16,"seo":1063,"stem":17,"__hash__":1064},"docs\u002F1.getting-started\u002F3.configuration.md",{"type":74,"value":75,"toc":1041},"minimark",[76,97,219,222,313,318,332,335,456,460,467,484,498,503,515,518,525,529,542,548,561,569,574,580,583,589,601,604,610,623,628,640,653,664,670,682,697,703,717,720,723,745,748,844,850,861,867,872,882,888,891,1012,1018,1029,1037],[77,78,79,80,84,85,88,89,92,93,96],"p",{},"By default, ",[81,82,83],"code",{},"@nuxtjs\u002Fsanity"," will look for a ",[81,86,87],{},"~~\u002Fcms\u002Fsanity.config.ts"," file relative to your project's root directory, and it will read your ",[81,90,91],{},"projectId"," and ",[81,94,95],{},"dataset"," from there.",[98,99,105],"pre",{"className":100,"code":101,"filename":102,"language":103,"meta":104,"style":104},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { defineConfig } from 'sanity'\n\nexport default defineConfig({\n  projectId: '\u003Csample-project-id>',\n  dataset: 'production',\n  \u002F\u002F rest of your configuration\n})\n","sanity.config.ts","ts","",[81,106,107,140,147,165,186,203,210],{"__ignoreMap":104},[108,109,112,116,120,124,127,130,133,137],"span",{"class":110,"line":111},"line",1,[108,113,115],{"class":114},"s7zQu","import",[108,117,119],{"class":118},"sMK4o"," {",[108,121,123],{"class":122},"sTEyZ"," defineConfig",[108,125,126],{"class":118}," }",[108,128,129],{"class":114}," from",[108,131,132],{"class":118}," '",[108,134,136],{"class":135},"sfazB","sanity",[108,138,139],{"class":118},"'\n",[108,141,143],{"class":110,"line":142},2,[108,144,146],{"emptyLinePlaceholder":145},true,"\n",[108,148,150,153,156,159,162],{"class":110,"line":149},3,[108,151,152],{"class":114},"export",[108,154,155],{"class":114}," default",[108,157,123],{"class":158},"s2Zo4",[108,160,161],{"class":122},"(",[108,163,164],{"class":118},"{\n",[108,166,168,172,175,177,180,183],{"class":110,"line":167},4,[108,169,171],{"class":170},"swJcz","  projectId",[108,173,174],{"class":118},":",[108,176,132],{"class":118},[108,178,179],{"class":135},"\u003Csample-project-id>",[108,181,182],{"class":118},"'",[108,184,185],{"class":118},",\n",[108,187,189,192,194,196,199,201],{"class":110,"line":188},5,[108,190,191],{"class":170},"  dataset",[108,193,174],{"class":118},[108,195,132],{"class":118},[108,197,198],{"class":135},"production",[108,200,182],{"class":118},[108,202,185],{"class":118},[108,204,206],{"class":110,"line":205},6,[108,207,209],{"class":208},"sHwdD","  \u002F\u002F rest of your configuration\n",[108,211,213,216],{"class":110,"line":212},7,[108,214,215],{"class":118},"}",[108,217,218],{"class":122},")\n",[77,220,221],{},"If you need to provide additional configuration, you can pass in an object in your Nuxt config with key details:",[98,223,226],{"className":100,"code":224,"filename":225,"language":103,"meta":104,"style":104},"export default defineNuxtConfig({\n  modules: ['@nuxtjs\u002Fsanity'],\n  sanity: {\n    projectId: 'myProject',\n    apiVersion: '2021-10-18'\n  },\n})\n","nuxt.config.ts",[81,227,228,241,262,272,288,302,307],{"__ignoreMap":104},[108,229,230,232,234,237,239],{"class":110,"line":111},[108,231,152],{"class":114},[108,233,155],{"class":114},[108,235,236],{"class":158}," defineNuxtConfig",[108,238,161],{"class":122},[108,240,164],{"class":118},[108,242,243,246,248,251,253,255,257,260],{"class":110,"line":142},[108,244,245],{"class":170},"  modules",[108,247,174],{"class":118},[108,249,250],{"class":122}," [",[108,252,182],{"class":118},[108,254,83],{"class":135},[108,256,182],{"class":118},[108,258,259],{"class":122},"]",[108,261,185],{"class":118},[108,263,264,267,269],{"class":110,"line":149},[108,265,266],{"class":170},"  sanity",[108,268,174],{"class":118},[108,270,271],{"class":118}," {\n",[108,273,274,277,279,281,284,286],{"class":110,"line":167},[108,275,276],{"class":170},"    projectId",[108,278,174],{"class":118},[108,280,132],{"class":118},[108,282,283],{"class":135},"myProject",[108,285,182],{"class":118},[108,287,185],{"class":118},[108,289,290,293,295,297,300],{"class":110,"line":188},[108,291,292],{"class":170},"    apiVersion",[108,294,174],{"class":118},[108,296,132],{"class":118},[108,298,299],{"class":135},"2021-10-18",[108,301,139],{"class":118},[108,303,304],{"class":110,"line":205},[108,305,306],{"class":118},"  },\n",[108,308,309,311],{"class":110,"line":212},[108,310,215],{"class":118},[108,312,218],{"class":122},[314,315,317],"h2",{"id":316},"runtime-configuration","Runtime configuration",[77,319,320,321,328,329,331],{},"It is also possible to pass options to this module through ",[322,323,327],"a",{"href":324,"rel":325},"https:\u002F\u002Fnuxtjs.org\u002Fguide\u002Fruntime-config\u002F",[326],"nofollow","runtime configuration",", via a ",[81,330,136],{}," key. If you do so they will be merged with (and override) any other options passed in.",[77,333,334],{},"For example:",[98,336,338],{"className":100,"code":337,"filename":225,"language":103,"meta":104,"style":104},"export default defineNuxtConfig({\n  modules: ['@nuxtjs\u002Fsanity'],\n  runtimeConfig: {\n    sanity: {\n      token: process.env.NUXT_SANITY_TOKEN,\n    },\n  },\n  sanity: {\n    projectId: 'myProject',\n  },\n})\n",[81,339,340,352,370,379,388,411,416,420,429,444,449],{"__ignoreMap":104},[108,341,342,344,346,348,350],{"class":110,"line":111},[108,343,152],{"class":114},[108,345,155],{"class":114},[108,347,236],{"class":158},[108,349,161],{"class":122},[108,351,164],{"class":118},[108,353,354,356,358,360,362,364,366,368],{"class":110,"line":142},[108,355,245],{"class":170},[108,357,174],{"class":118},[108,359,250],{"class":122},[108,361,182],{"class":118},[108,363,83],{"class":135},[108,365,182],{"class":118},[108,367,259],{"class":122},[108,369,185],{"class":118},[108,371,372,375,377],{"class":110,"line":149},[108,373,374],{"class":170},"  runtimeConfig",[108,376,174],{"class":118},[108,378,271],{"class":118},[108,380,381,384,386],{"class":110,"line":167},[108,382,383],{"class":170},"    sanity",[108,385,174],{"class":118},[108,387,271],{"class":118},[108,389,390,393,395,398,401,404,406,409],{"class":110,"line":188},[108,391,392],{"class":170},"      token",[108,394,174],{"class":118},[108,396,397],{"class":122}," process",[108,399,400],{"class":118},".",[108,402,403],{"class":122},"env",[108,405,400],{"class":118},[108,407,408],{"class":122},"NUXT_SANITY_TOKEN",[108,410,185],{"class":118},[108,412,413],{"class":110,"line":205},[108,414,415],{"class":118},"    },\n",[108,417,418],{"class":110,"line":212},[108,419,306],{"class":118},[108,421,423,425,427],{"class":110,"line":422},8,[108,424,266],{"class":170},[108,426,174],{"class":118},[108,428,271],{"class":118},[108,430,432,434,436,438,440,442],{"class":110,"line":431},9,[108,433,276],{"class":170},[108,435,174],{"class":118},[108,437,132],{"class":118},[108,439,283],{"class":135},[108,441,182],{"class":118},[108,443,185],{"class":118},[108,445,447],{"class":110,"line":446},10,[108,448,306],{"class":118},[108,450,452,454],{"class":110,"line":451},11,[108,453,215],{"class":118},[108,455,218],{"class":122},[314,457,459],{"id":458},"reference","Reference",[461,462,464],"h3",{"id":463},"globalhelper",[81,465,466],{},"globalHelper",[468,469,470,478],"ul",{},[471,472,473,474],"li",{},"Type: ",[475,476,477],"strong",{},"boolean",[471,479,480,481],{},"Default: ",[475,482,483],{},"false",[77,485,486,487,490,491,92,494,497],{},"Whether to provide a global ",[81,488,489],{},"$sanity"," helper that you can use throughout your project. (It's recommended not to do this but to use the ",[81,492,493],{},"useSanity",[81,495,496],{},"useSanityQuery"," composables.)",[461,499,501],{"id":500},"projectid",[81,502,91],{},[468,504,505,510],{},[471,506,507],{},[475,508,509],{},"Required",[471,511,473,512],{},[475,513,514],{},"string",[77,516,517],{},"Your Sanity Project ID, which you can find in your Sanity dashboard.",[77,519,520],{},[521,522],"img",{"alt":523,"src":524},"Sanity dashboard","\u002Fsanity-dashboard.png",[461,526,527],{"id":95},[81,528,95],{},[468,530,531,535],{},[471,532,473,533],{},[475,534,514],{},[471,536,480,537],{},[475,538,539],{},[81,540,541],{},"'production'",[461,543,545],{"id":544},"apiversion",[81,546,547],{},"apiVersion",[468,549,550,554],{},[471,551,473,552],{},[475,553,514],{},[471,555,480,556],{},[475,557,558],{},[81,559,560],{},"'1'",[77,562,563,564],{},"You can specify the Sanity API version to use. ",[322,565,568],{"href":566,"rel":567},"https:\u002F\u002Fwww.sanity.io\u002Fhelp\u002Fjs-client-api-version",[326],"More info here.",[461,570,572],{"id":571},"token",[81,573,571],{},[468,575,576],{},[471,577,473,578],{},[475,579,514],{},[77,581,582],{},"You can provide a token or leave blank to be an anonymous user. (You can also set a token programmatically in a Nuxt plugin.)",[461,584,586],{"id":585},"withcredentials",[81,587,588],{},"withCredentials",[468,590,591,595],{},[471,592,473,593],{},[475,594,477],{},[471,596,480,597],{},[475,598,599],{},[81,600,483],{},[77,602,603],{},"Include credentials in requests made to Sanity. Useful if you want to take advantage of an existing authorisation to the Sanity CMS.",[461,605,607],{"id":606},"usecdn",[81,608,609],{},"useCdn",[468,611,612,616],{},[471,613,473,614],{},[475,615,477],{},[471,617,480,618],{},[475,619,620],{},[81,621,622],{},"true",[461,624,626],{"id":625},"minimal",[81,627,625],{},[468,629,630,634],{},[471,631,473,632],{},[475,633,477],{},[471,635,480,636],{},[475,637,638],{},[81,639,483],{},[77,641,642,643,648,649,652],{},"Use an ultra-minimal Sanity client for making requests (a fork of ",[322,644,647],{"href":645,"rel":646},"https:\u002F\u002Fgithub.com\u002Frexxars\u002Fpicosanity",[326],"picosanity"," with SSR-specific changes). It only supports ",[81,650,651],{},"fetch"," requests, but will significantly decrease your bundle size.",[654,655,656,657,660,661,663],"tip",{},"If you don't have ",[81,658,659],{},"@sanity\u002Fclient"," installed, then ",[81,662,83],{}," will use the minimal client by default.",[461,665,667],{"id":666},"disablesmartcdn",[81,668,669],{},"disableSmartCdn",[468,671,672,676],{},[471,673,473,674],{},[475,675,477],{},[471,677,480,678],{},[475,679,680],{},[81,681,483],{},[77,683,684,685,690,691,693,694,400],{},"By default, if ",[322,686,689],{"href":687,"rel":688},"https:\u002F\u002Fnuxtjs.org\u002Fdocs\u002F2.x\u002Ffeatures\u002Flive-preview",[326],"Preview Mode"," has been switched on, ",[81,692,609],{}," will be disabled. If this behaviour isn't desirable, you can disable it by setting ",[81,695,696],{},"{ disableSmartCdn: false }",[461,698,700],{"id":699},"additionalclients",[81,701,702],{},"additionalClients",[468,704,705,710],{},[471,706,473,707],{},[475,708,709],{},"Object",[471,711,480,712],{},[475,713,714],{},[81,715,716],{},"{}",[77,718,719],{},"You can create additional clients. Each client's name will be the key of the object provided, and the options provided will be merged with the options of the default client.",[77,721,722],{},"The options that can be provided are:",[468,724,725,729,733,737,741],{},[471,726,727],{},[81,728,91],{},[471,730,731],{},[81,732,95],{},[471,734,735],{},[81,736,571],{},[471,738,739],{},[81,740,588],{},[471,742,743],{},[81,744,609],{},[77,746,747],{},"So, for example:",[98,749,751],{"className":100,"code":750,"filename":225,"language":103,"meta":104,"style":104},"export default defineNuxtConfig({\n  modules: ['@nuxtjs\u002Fsanity'],\n  sanity: {\n    additionalClients: {\n      another: {\n        projectId: 'anotherproject',\n      },\n    },\n  },\n})\n",[81,752,753,765,783,791,800,809,825,830,834,838],{"__ignoreMap":104},[108,754,755,757,759,761,763],{"class":110,"line":111},[108,756,152],{"class":114},[108,758,155],{"class":114},[108,760,236],{"class":158},[108,762,161],{"class":122},[108,764,164],{"class":118},[108,766,767,769,771,773,775,777,779,781],{"class":110,"line":142},[108,768,245],{"class":170},[108,770,174],{"class":118},[108,772,250],{"class":122},[108,774,182],{"class":118},[108,776,83],{"class":135},[108,778,182],{"class":118},[108,780,259],{"class":122},[108,782,185],{"class":118},[108,784,785,787,789],{"class":110,"line":149},[108,786,266],{"class":170},[108,788,174],{"class":118},[108,790,271],{"class":118},[108,792,793,796,798],{"class":110,"line":167},[108,794,795],{"class":170},"    additionalClients",[108,797,174],{"class":118},[108,799,271],{"class":118},[108,801,802,805,807],{"class":110,"line":188},[108,803,804],{"class":170},"      another",[108,806,174],{"class":118},[108,808,271],{"class":118},[108,810,811,814,816,818,821,823],{"class":110,"line":205},[108,812,813],{"class":170},"        projectId",[108,815,174],{"class":118},[108,817,132],{"class":118},[108,819,820],{"class":135},"anotherproject",[108,822,182],{"class":118},[108,824,185],{"class":118},[108,826,827],{"class":110,"line":212},[108,828,829],{"class":118},"      },\n",[108,831,832],{"class":110,"line":422},[108,833,415],{"class":118},[108,835,836],{"class":110,"line":431},[108,837,306],{"class":118},[108,839,840,842],{"class":110,"line":446},[108,841,215],{"class":118},[108,843,218],{"class":122},[461,845,847],{"id":846},"visualediting",[81,848,849],{},"visualEditing",[468,851,852,856],{},[471,853,473,854],{},[475,855,709],{},[471,857,480,858],{},[475,859,860],{},"undefined",[77,862,863,864,866],{},"Used to enable and configure Visual Editing. See the ",[322,865,23],{"href":24}," section for more details.",[461,868,870],{"id":869},"typegen",[81,871,869],{},[468,873,874,878],{},[471,875,473,876],{},[475,877,709],{},[471,879,480,880],{},[475,881,860],{},[77,883,884,885,866],{},"Used to enable and configure automatic TypeScript type generation for GROQ queries. See the ",[322,886,887],{"href":32},"Type Generation",[77,889,890],{},"Available options:",[892,893,894,913],"table",{},[895,896,897],"thead",{},[898,899,900,904,907,910],"tr",{},[901,902,903],"th",{},"Option",[901,905,906],{},"Type",[901,908,909],{},"Default",[901,911,912],{},"Description",[914,915,916,935,952,971,991],"tbody",{},[898,917,918,924,928,932],{},[919,920,921],"td",{},[81,922,923],{},"enabled",[919,925,926],{},[81,927,477],{},[919,929,930],{},[81,931,483],{},[919,933,934],{},"Enable type generation",[898,936,937,942,946,949],{},[919,938,939],{},[81,940,941],{},"schemaTypesPath",[919,943,944],{},[81,945,514],{},[919,947,948],{},"-",[919,950,951],{},"Path to schema types module (required when enabled)",[898,953,954,959,963,968],{},[919,955,956],{},[81,957,958],{},"schemaTypesExport",[919,960,961],{},[81,962,514],{},[919,964,965],{},[81,966,967],{},"'schemaTypes'",[919,969,970],{},"Export name to read schema types from",[898,972,973,978,983,988],{},[919,974,975],{},[81,976,977],{},"queryPaths",[919,979,980],{},[81,981,982],{},"string | string[]",[919,984,985],{},[81,986,987],{},"['**\u002F*.{ts,tsx,js,jsx,mjs,cjs,vue,astro}']",[919,989,990],{},"Glob patterns for files to scan",[898,992,993,998,1002,1006],{},[919,994,995],{},[81,996,997],{},"overloadClientMethods",[919,999,1000],{},[81,1001,477],{},[919,1003,1004],{},[81,1005,622],{},[919,1007,1008,1009,1011],{},"Generate ",[81,1010,659],{}," method overloads",[461,1013,1015],{"id":1014},"queryendpoint",[81,1016,1017],{},"queryEndpoint",[468,1019,1020,1025],{},[471,1021,473,1022],{},[475,1023,1024],{},"String",[471,1026,480,1027],{},[475,1028,860],{},[77,1030,1031,1032,1034,1035,866],{},"The endpoint that ",[81,1033,496],{}," requests are sent to. See the ",[322,1036,19],{"href":20},[1038,1039,1040],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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":104,"searchDepth":142,"depth":142,"links":1042},[1043,1044],{"id":316,"depth":142,"text":317},{"id":458,"depth":142,"text":459,"children":1045},[1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058],{"id":463,"depth":149,"text":466},{"id":500,"depth":149,"text":91},{"id":95,"depth":149,"text":95},{"id":544,"depth":149,"text":547},{"id":571,"depth":149,"text":571},{"id":585,"depth":149,"text":588},{"id":606,"depth":149,"text":609},{"id":625,"depth":149,"text":625},{"id":666,"depth":149,"text":669},{"id":699,"depth":149,"text":702},{"id":846,"depth":149,"text":849},{"id":869,"depth":149,"text":869},{"id":1014,"depth":149,"text":1017},"By default, @nuxtjs\u002Fsanity will look for a ~~\u002Fcms\u002Fsanity.config.ts file relative to your project's root directory, and it will read your projectId and dataset from there.","md",null,{},{"description":1059},"VwFfGXlCzGfiujxEwIZrSVTiw2niY7kh9Jad_q0FzHQ",[1066,1067],{"title":11,"path":12,"stem":13,"description":104,"children":-1},{"title":19,"path":20,"stem":21,"description":1068,"children":-1},"@nuxtjs\u002Fsanity provides key composables to interact with data from your Sanity project.",1775669592365]