[{"data":1,"prerenderedAt":4645},["ShallowReactive",2],{"content-navigation":3,"$fY4mAj2l3kRkTDttxn6FGzqBc2O9HAJ2qp-_8LmMX7aw":1825,"/tutorials/tips-and-tricks/search-engine-optimization-best-practices":1830},[4,112,119,224,333,429,481,1087,1113,1142],{"title":5,"path":6,"stem":7,"children":8,"page":89},"Partials","/_partials","_partials",[9,15,20,25,29,33,38,42,47,51,56,60,64,68,90,94,98,103,108],{"title":10,"path":11,"stem":12,"description":13,"icon":14,"links":14},"Advanced Field Creation Mode","/_partials/advanced-field-creation-mode","_partials/advanced-field-creation-mode","You can use these advanced options to automatically set the values of fields at specific events by clicking on \"Continue in Advanced Field Creation Mode\".",null,{"title":16,"path":17,"stem":18,"description":19,"icon":14,"links":14},"Authentication","/_partials/authentication","_partials/authentication","While the Public role can be configured to make data available without authentication, anything that is not public requires a user to authenticate their requests.",{"title":21,"path":22,"stem":23,"description":24,"icon":14,"links":14},"Config Env Vars","/_partials/config-env-vars","_partials/config-env-vars","",{"title":26,"path":27,"stem":28,"description":24,"icon":14,"links":14},"Deployment Public Instance","/_partials/deployment-public-instance","_partials/deployment-public-instance",{"title":30,"path":31,"stem":32,"description":24,"icon":14,"links":14},"Engine Studio Box","/_partials/engine-studio-box","_partials/engine-studio-box",{"title":34,"path":35,"stem":36,"description":37,"icon":14,"links":14},"Extension Hook Footguns","/_partials/extension-hook-footguns","_partials/extension-hook-footguns","Directus reads system collections to operate. Be careful when modifying the output of system collection read or query events. Also ensure not to directly or indirectly emit the same event your hook is handling or you will create an infinite loop.",{"title":39,"path":40,"stem":41,"description":24,"icon":14,"links":14},"Extension Hook System Collections","/_partials/extension-hook-system-collections","_partials/extension-hook-system-collections",{"title":43,"path":44,"stem":45,"description":46,"icon":14,"links":14},"Extensions Api","/_partials/extensions-api","_partials/extensions-api","This extension type is loaded into the Directus process. They can use the provided services exported by the @directus/extensions-sdk package and can be written in JavaScript or TypeScript.",{"title":48,"path":49,"stem":50,"description":24,"icon":14,"links":14},"Extensions Api Internals","/_partials/extensions-api-internals","_partials/extensions-api-internals",{"title":52,"path":53,"stem":54,"description":55,"icon":14,"links":14},"Extensions App","/_partials/extensions-app","_partials/extensions-app","This extension type is loaded into the Directus Data Studio. They are are built with Vue 3, and can use the provided composables exported by the @directus/extensions-sdk package. Extensions can be written in JavaScript or TypeScript.",{"title":57,"path":58,"stem":59,"description":24,"icon":14,"links":14},"Extensions App Internals","/_partials/extensions-app-internals","_partials/extensions-app-internals",{"title":61,"path":62,"stem":63,"description":24,"icon":14,"links":14},"Extensions Theme","/_partials/extensions-theme","_partials/extensions-theme",{"title":65,"path":66,"stem":67,"description":24,"icon":14,"links":14},"Extensions Uid","/_partials/extensions-uid","_partials/extensions-uid",{"title":69,"path":70,"stem":71,"children":72,"page":89},"Home Hero","/_partials/home-hero","_partials/home-hero",[73,77,81,85],{"title":74,"path":75,"stem":76,"description":24,"icon":14,"links":14},"Auth","/_partials/home-hero/auth","_partials/home-hero/auth",{"title":78,"path":79,"stem":80,"description":24,"icon":14,"links":14},"Data","/_partials/home-hero/data","_partials/home-hero/data",{"title":82,"path":83,"stem":84,"description":24,"icon":14,"links":14},"File","/_partials/home-hero/file","_partials/home-hero/file",{"title":86,"path":87,"stem":88,"description":24,"icon":14,"links":14},"Realtime","/_partials/home-hero/realtime","_partials/home-hero/realtime",false,{"title":91,"path":92,"stem":93,"description":24,"icon":14,"links":14},"Json Function","/_partials/json-function","_partials/json-function",{"title":95,"path":96,"stem":97,"description":24,"icon":14,"links":14},"License","/_partials/license","_partials/license",{"title":99,"path":100,"stem":101,"description":102,"icon":14,"links":14},"Query Functions","/_partials/query-functions","_partials/query-functions","Functions accept a field and return a modified value. Functions can be used in any query parameter you'd normally supply a field key, including fields, aggregation, and filters.",{"title":104,"path":105,"stem":106,"description":107,"icon":14,"links":14},"Quickstart Making Calls","/_partials/quickstart-making-calls","_partials/quickstart-making-calls","You can use a visual API testing tool like Postman or Hoppscotch, a terminal-based based tool like curl or HTTPie, or make HTTP requests directly in a script written in your programming language of choice.",{"title":109,"path":110,"stem":111,"description":24,"icon":14,"links":14},"Snippet Auth Token","/_partials/snippet-auth-token","_partials/snippet-auth-token",{"title":113,"path":114,"stem":115,"children":116,"description":118,"icon":14,"links":14},"Directus API Reference","/api","api/index",[117],{"title":113,"path":114,"stem":115,"description":118,"icon":14,"links":14},"Learn how to use our API",{"title":120,"path":121,"stem":122,"children":123,"page":89},"Cloud","/cloud","cloud",[124,144,174,204],{"title":125,"path":126,"stem":127,"children":128,"page":89},"Getting Started","/cloud/getting-started","cloud/1.getting-started",[129,134,139],{"title":130,"path":131,"stem":132,"description":133,"icon":14,"links":14},"Introduction","/cloud/getting-started/introduction","cloud/1.getting-started/1.introduction","Whether you're a hobbyist, startup, or enterprise, our flexible Directus Cloud platform lets you get up and running with Directus quickly.",{"title":135,"path":136,"stem":137,"description":138,"icon":14,"links":14},"Cloud Teams","/cloud/getting-started/teams","cloud/1.getting-started/2.teams","A team is an organizational system that groups accounts together as team members and provides consolidated billing for projects.",{"title":140,"path":141,"stem":142,"description":143,"icon":14,"links":14},"Managing Cloud Accounts","/cloud/getting-started/accounts","cloud/1.getting-started/3.accounts","An account is your portal to Directus Cloud. You can use it to manage your teams, team members, projects and billing.",{"title":145,"path":146,"stem":147,"children":148,"page":89},"Projects","/cloud/projects","cloud/2.projects",[149,154,159,164,169],{"title":150,"path":151,"stem":152,"description":153,"icon":14,"links":14},"Create a Project","/cloud/projects/create","cloud/2.projects/1.create","Create a project in Directus Cloud.",{"title":155,"path":156,"stem":157,"description":158,"icon":14,"links":14},"Destroy a Project","/cloud/projects/destroy","cloud/2.projects/2.destroy","Destroy a Directus Cloud project and cancel your subscription.",{"title":160,"path":161,"stem":162,"description":163,"icon":14,"links":14},"Version Upgrades","/cloud/projects/version-upgrades","cloud/2.projects/3.version-upgrades","Learn about automatic upgrades and version locking in Directus Cloud.",{"title":165,"path":166,"stem":167,"description":168,"icon":14,"links":14},"Monitoring Projects","/cloud/projects/monitoring","cloud/2.projects/4.monitoring","Learn how to monitor your Directus Cloud project.",{"title":170,"path":171,"stem":172,"description":173,"icon":14,"links":14},"Backups","/cloud/projects/backups","cloud/2.projects/5.backups","Learn about automatic backups in Directus Cloud.",{"title":175,"path":176,"stem":177,"children":178,"page":89},"Configuration","/cloud/configuration","cloud/3.configuration",[179,184,189,194,199],{"title":180,"path":181,"stem":182,"description":183,"icon":14,"links":14},"Custom Domains","/cloud/configuration/custom-domains","cloud/3.configuration/1.custom-domains","Learn how to set up a custom domain for your Directus Enterprise Cloud project.",{"title":185,"path":186,"stem":187,"description":188,"icon":14,"links":14},"Environment Variables","/cloud/configuration/environment-variables","cloud/3.configuration/2.environment-variables","Learn about environment variables in Directus Cloud.",{"title":190,"path":191,"stem":192,"description":193,"icon":14,"links":14},"Direct Database Access","/cloud/configuration/direct-database-access","cloud/3.configuration/3.direct-database-access","Learn how to directly access your Directus Cloud project's database.",{"title":195,"path":196,"stem":197,"description":198,"icon":14,"links":14},"Custom Extensions","/cloud/configuration/custom-extensions","cloud/3.configuration/4.custom-extensions","Learn how to deploy custom extensions to your Directus Cloud project.",{"title":200,"path":201,"stem":202,"description":203,"icon":14,"links":14},"Datacenter Regions","/cloud/configuration/datacenter-regions","cloud/3.configuration/5.datacenter-regions","Learn where datacenters for cloud projects are located.",{"title":205,"path":206,"stem":207,"children":208,"page":89},"Billing","/cloud/billing","cloud/4.billing",[209,214,219],{"title":210,"path":211,"stem":212,"description":213,"icon":14,"links":14},"Manage Billing","/cloud/billing/manage-billing","cloud/4.billing/1.manage-billing","Learn how to manage billing for your Directus Cloud project.",{"title":215,"path":216,"stem":217,"description":218,"icon":14,"links":14},"Changing Your Tier","/cloud/billing/changing-tier","cloud/4.billing/2.changing-tier","Learn how to change the tier of your Directus Cloud project.",{"title":220,"path":221,"stem":222,"description":223,"icon":14,"links":14},"Cancel Your Subscription","/cloud/billing/cancel-subscription","cloud/4.billing/3.cancel-subscription","Learn how to cancel your Directus Cloud project subscription.",{"title":225,"path":226,"stem":227,"children":228,"page":89},"Community","/community","community",[229,249,274,293,318],{"title":230,"path":231,"stem":232,"children":233,"page":89},"Overview","/community/overview","community/1.overview",[234,239,244],{"title":235,"path":236,"stem":237,"description":238,"icon":14,"links":14},"Welcome","/community/overview/welcome","community/1.overview/1.welcome","Welcome to the Directus community!",{"title":240,"path":241,"stem":242,"description":243,"icon":14,"links":14},"Code of Conduct","/community/overview/conduct","community/1.overview/2.conduct","Our standards, responsibilities, and enforcement guidelines to create a positive community.",{"title":245,"path":246,"stem":247,"description":248,"icon":14,"links":14},"Moderation Guidelines","/community/overview/moderation","community/1.overview/3.moderation","Guidelines we give to community moderators.",{"title":250,"path":251,"stem":252,"children":253,"page":89},"Contribution","/community/contribution","community/2.contribution",[254,259,264,269],{"title":255,"path":256,"stem":257,"description":258,"icon":14,"links":14},"Translations","/community/contribution/translations","community/2.contribution/1.translations","How to contribute to translating the Data Studio.",{"title":260,"path":261,"stem":262,"description":263,"icon":14,"links":14},"Documentation","/community/contribution/documentation","community/2.contribution/2.documentation","How to contribute to the Directus documentation.",{"title":265,"path":266,"stem":267,"description":268,"icon":14,"links":14},"Feature Requests","/community/contribution/feature-requests","community/2.contribution/3.feature-requests","How to add feature requests, and our process for reviewing them.",{"title":270,"path":271,"stem":272,"description":273,"icon":14,"links":14},"Pull Requests","/community/contribution/pull-requests","community/2.contribution/4.pull-requests","Our process for contributing pull requests to Directus.",{"title":275,"path":276,"stem":277,"children":278,"page":89},"Codebase","/community/codebase","community/3.codebase",[279,283,288],{"title":275,"path":280,"stem":281,"description":282,"icon":14,"links":14},"/community/codebase/overview","community/3.codebase/1.overview","Overview of the Directus codebase for new contributors",{"title":284,"path":285,"stem":286,"description":287,"icon":14,"links":14},"Development Environment","/community/codebase/dev-environment","community/3.codebase/2.dev-environment","How to set up and run a development environment for Directus so that you can work on the platform's source code.",{"title":289,"path":290,"stem":291,"description":292,"icon":14,"links":14},"Testing","/community/codebase/testing","community/3.codebase/3.testing","How to run unit and blackbox tests in the Directus codebase.",{"title":294,"path":295,"stem":296,"children":297,"page":89},"Reporting And Support","/community/reporting-and-support","community/4.reporting-and-support",[298,303,308,313],{"title":299,"path":300,"stem":301,"description":302,"icon":14,"links":14},"Troubleshooting Steps","/community/reporting-and-support/troubleshooting-steps","community/4.reporting-and-support/1.troubleshooting-steps","If you're experiencing issues or think you have found a problem in Directus, be sure to follow these steps.",{"title":304,"path":305,"stem":306,"description":307,"icon":14,"links":14},"Bug Reporting","/community/reporting-and-support/bug-reporting","community/4.reporting-and-support/2.bug-reporting","How to report bugs in Directus.",{"title":309,"path":310,"stem":311,"description":312,"icon":14,"links":14},"Security Reporting","/community/reporting-and-support/security-reporting","community/4.reporting-and-support/3.security-reporting","How to report security issues in Directus.",{"title":314,"path":315,"stem":316,"description":317,"icon":14,"links":14},"Customer Support","/community/reporting-and-support/customer-support","community/4.reporting-and-support/4.customer-support","How to get help with Directus as a user and customer.",{"title":319,"path":320,"stem":321,"children":322,"page":89},"Programs","/community/programs","community/5.programs",[323,328],{"title":324,"path":325,"stem":326,"description":327,"icon":14,"links":14},"Guest Authors","/community/programs/guest-authors","community/5.programs/1.guest-authors","Our guest author program invites authors to join and get paid to write tutorials for the Directus community.",{"title":329,"path":330,"stem":331,"description":332,"icon":14,"links":14},"Directus Labs","/community/programs/directus-labs","community/5.programs/2.directus-labs","Directus Labs is the official organization for Directus templates, settings and experimental projects.",{"title":175,"path":334,"stem":335,"children":336,"page":89},"/configuration","configuration",[337,341,346,351,356,361,366,371,376,381,386,391,396,401,406,410,415,420,425],{"title":130,"path":338,"stem":339,"description":340,"icon":14,"links":14},"/configuration/intro","configuration/0.intro","Environment variables are used for all configuration within a Directus project. These variables can be defined in a number of ways, which we cover below.",{"title":342,"path":343,"stem":344,"description":345,"icon":14,"links":14},"General","/configuration/general","configuration/1.general","Configuration for the general system, server, first admin user, and telemetry.",{"title":347,"path":348,"stem":349,"description":350,"icon":14,"links":14},"AI","/configuration/ai","configuration/ai","Configuration for AI Assistant and Model Context Protocol (MCP) features.",{"title":352,"path":353,"stem":354,"description":355,"icon":14,"links":14},"Auth & SSO","/configuration/auth-sso","configuration/auth-sso","Configuration for authentication methods, including local email/password, OAuth 2.0, OpenID, LDAP, and SAML.",{"title":357,"path":358,"stem":359,"description":360,"icon":14,"links":14},"Cache","/configuration/cache","configuration/cache","Configuration for internal and output caching.",{"title":362,"path":363,"stem":364,"description":365,"icon":14,"links":14},"Database","/configuration/database","configuration/database","Configuration for database connections.",{"title":367,"path":368,"stem":369,"description":370,"icon":14,"links":14},"Email","/configuration/email","configuration/email","Configuration for email settings and templates.",{"title":372,"path":373,"stem":374,"description":375,"icon":14,"links":14},"Extensions","/configuration/extensions","configuration/extensions","Configuration for extensions and the Directus Marketplace.",{"title":377,"path":378,"stem":379,"description":380,"icon":14,"links":14},"Files","/configuration/files","configuration/files","Configuration for storage locations, metadata, upload limits, and transformations.",{"title":382,"path":383,"stem":384,"description":385,"icon":14,"links":14},"Flows","/configuration/flows","configuration/flows","Configure environment variables, memory, and timeout for Flows.",{"title":387,"path":388,"stem":389,"description":390,"icon":14,"links":14},"Logging","/configuration/logging","configuration/logging","Configuration for general and Realtime logging.",{"title":392,"path":393,"stem":394,"description":395,"icon":14,"links":14},"Metrics","/configuration/metrics","configuration/metrics","Configuration for metrics.",{"title":397,"path":398,"stem":399,"description":400,"icon":14,"links":14},"Migrations","/configuration/migrations","configuration/migrations","Creation of custom migration files to automate database changes.",{"title":402,"path":403,"stem":404,"description":405,"icon":14,"links":14},"PM2","/configuration/pm2","configuration/pm2","Configuration for PM2, the process manager for Directus.",{"title":86,"path":407,"stem":408,"description":409,"icon":14,"links":14},"/configuration/realtime","configuration/realtime","Configuration for WebSockets and GraphQL Subscriptions.",{"title":411,"path":412,"stem":413,"description":414,"icon":14,"links":14},"Security & Limits","/configuration/security-limits","configuration/security-limits","Configuration for access tokens, cookies, CSP, hashing, CORS, rate limiting, and request limits.",{"title":416,"path":417,"stem":418,"description":419,"icon":14,"links":14},"Synchronization","/configuration/synchronization","configuration/synchronization","Configuration around synchronization and Redis.",{"title":421,"path":422,"stem":423,"description":424,"icon":14,"links":14},"Theming","/configuration/theming","configuration/theming","Configuration of the Data Studio's theming engine and appearance settings.",{"title":255,"path":426,"stem":427,"description":428,"icon":14,"links":14},"/configuration/translations","configuration/translations","Directus supports translations for both the Data Studio UI and authored content.",{"title":125,"description":14,"icon":14,"links":14,"path":430,"stem":431,"children":432,"page":89},"/getting-started","getting-started",[433,437,442,446,451,456,461,466,471,476],{"title":230,"path":434,"stem":435,"description":436,"icon":14,"links":14},"/getting-started/overview","getting-started/1.overview","Learn about the Directus Data Engine and Studio, when to use it, and a how it works.",{"title":438,"path":439,"stem":440,"description":441,"icon":14,"links":14},"Accessibility","/getting-started/accessibility","getting-started/10.accessibility","We are always looking for ways to make Directus Studio more accessible. Here are some of the methods we currently support.",{"title":150,"path":443,"stem":444,"description":445,"icon":14,"links":14},"/getting-started/create-a-project","getting-started/2.create-a-project","Learn about how to create a managed Directus project or self-host with Docker.",{"title":447,"path":448,"stem":449,"description":450,"icon":14,"links":14,"label":447},"Configure a Data Model","/getting-started/data-model","getting-started/3.data-model","This guide will cover creating a collection in Directus via the Data Studio, creating fields, and configuring relationships.",{"title":452,"path":453,"stem":454,"description":455,"icon":14,"links":14},"Use the API","/getting-started/use-the-api","getting-started/4.use-the-api","Get started with Directus APIs. Learn to interact with collections, fetch, and create data.",{"title":457,"path":458,"stem":459,"description":460,"icon":14,"links":14},"Authenticate a User","/getting-started/authenticate-user","getting-started/5.authenticate-user","Get started with Directus Auth. Learn how to register, login, create users, and make authenticated requests.",{"title":462,"path":463,"stem":464,"description":465,"icon":14,"links":14},"Upload & Access Files","/getting-started/upload-files","getting-started/6.upload-files","This guide will cover importing a file via URL, requesting assets, and using transformation parameters.",{"title":467,"path":468,"stem":469,"description":470,"icon":14,"links":14},"Create an Automation","/getting-started/create-an-automation","getting-started/7.create-an-automation","Get started using flows, triggers, operations and the data chain in Directus Automate.",{"title":472,"path":473,"stem":474,"description":475,"icon":14,"links":14},"Connect to Realtime Data","/getting-started/connect-to-realtime","getting-started/8.connect-to-realtime","This guide will cover connecting to Directus via WebSockets on the web, subscribing to changes, and creating new items over the connection.",{"title":477,"path":478,"stem":479,"description":480,"icon":14,"links":14},"Resources & Links","/getting-started/resources","getting-started/9.resources","Key links across the Directus ecosystem.",{"title":482,"path":483,"stem":484,"children":485,"page":89},"Guides","/guides","guides",[486,512,595,642,677,707,732,756,771,886,899,988],{"title":487,"description":14,"icon":488,"links":14,"path":489,"stem":490,"children":491,"page":89},"Data Model","directus-explore","/guides/data-model","guides/01.data-model",[492,497,502,507],{"title":493,"path":494,"stem":495,"description":496,"icon":14,"links":14},"Collections","/guides/data-model/collections","guides/01.data-model/1.collections","Directus collections help you manage your data. Create custom collections, define fields, configure relationships, and leverage features like content versioning and access control. Learn how to create, configure, and manage collections in Directus.",{"title":498,"path":499,"stem":500,"description":501,"icon":14,"links":14},"Fields","/guides/data-model/fields","guides/01.data-model/2.fields","Directus fields let you define how your data is stored and displayed. Learn about creating fields, data types, interfaces, validations, relationships, and more. Discover how to configure fields to perfectly suit your data modeling needs in Directus.",{"title":503,"path":504,"stem":505,"description":506,"icon":14,"links":14},"Interfaces","/guides/data-model/interfaces","guides/01.data-model/3.interfaces","Manage your data effectively with Directus fields. Discover various field types, interfaces, validations, and relationships to perfectly suit your data modeling needs.",{"title":508,"path":509,"stem":510,"description":511,"icon":14,"links":14},"Relationships","/guides/data-model/relationships","guides/01.data-model/4.relationships","Leverage Directus relationships to create powerful data connections. Explore Many to One, One to Many, Many to Many, and Many to Any relationships, along with Translations for multilingual content management.",{"title":513,"description":14,"icon":514,"links":14,"path":515,"stem":516,"children":517,"page":89},"Content","directus-editor","/guides/content","guides/02.content",[518,523,528,533,538,543,548,552,574],{"title":519,"path":520,"stem":521,"description":522,"icon":14,"links":14},"Collection Explorer","/guides/content/explore","guides/02.content/1.explore","Learn to filter, layout, batch edit and more with collections in the collection explorer.",{"title":524,"path":525,"stem":526,"description":527,"icon":14,"links":14},"Item Editor","/guides/content/editor","guides/02.content/2.editor","Learn to create, duplicate, archive and perform other actions with items using Directus.",{"title":529,"path":530,"stem":531,"description":532,"icon":14,"links":14},"Layouts","/guides/content/layouts","guides/02.content/3.layouts","Learn to use layouts for viewing and interacting with items in a collection using Directus.",{"title":534,"path":535,"stem":536,"description":537,"icon":14,"links":14},"Import & Export","/guides/content/import-export","guides/02.content/4.import-export","Learn to import and export multiple items stored as files using Directus.",{"title":539,"path":540,"stem":541,"description":542,"icon":14,"links":14},"Live Preview","/guides/content/live-preview","guides/02.content/5.live-preview","Learn to set up your project for live previewing items from your application.",{"title":544,"path":545,"stem":546,"description":547,"icon":14,"links":14},"Content Versioning","/guides/content/content-versioning","guides/02.content/6.content-versioning","This guide covers the process of enabling and utilizing Content Versioning in Directus.",{"title":255,"path":549,"stem":550,"description":551,"icon":14,"links":14},"/guides/content/translations","guides/02.content/7.translations","Both content and the data studio can be translated into multiple languages.",{"title":553,"path":554,"stem":555,"children":556,"description":558,"icon":14,"links":14},"Visual Editor","/guides/content/visual-editor","guides/02.content/8.visual-editor/0.index",[557,559,564,569],{"title":553,"path":554,"stem":555,"description":558,"icon":14,"links":14},"The Directus visual editor module allows you to visually edit the content of your website directly in-place.",{"title":560,"path":561,"stem":562,"description":563,"icon":14,"links":14},"Frontend Library","/guides/content/visual-editor/frontend-library","guides/02.content/8.visual-editor/1.frontend-library","A library that allows your website to communicate with your Directus project and enables Visual Editing.",{"title":565,"path":566,"stem":567,"description":568,"icon":14,"links":14},"Studio Module","/guides/content/visual-editor/studio-module","guides/02.content/8.visual-editor/2.studio-module","Learn how to edit your website's content in place from within the Directus Studio.",{"title":570,"path":571,"stem":572,"description":573,"icon":14,"links":14},"Customization","/guides/content/visual-editor/customization","guides/02.content/8.visual-editor/3.customization","Customize the styling of your Visual Editing experience to suit your brand or website theming.",{"title":575,"path":576,"stem":577,"children":578,"description":580,"icon":14,"links":14},"Collaborative Editing","/guides/content/collaborative-editing","guides/02.content/9.collaborative-editing/0.index",[579,581,585,590],{"title":575,"path":576,"stem":577,"description":580,"icon":14,"links":14},"Directus Collaborative Editing enables real-time data synchronization and collaborative editing across collections, allowing multiple users to edit content simultaneously without conflicts.",{"title":175,"path":582,"stem":583,"description":584,"icon":14,"links":14},"/guides/content/collaborative-editing/configuration","guides/02.content/9.collaborative-editing/1.configuration","Learn how to configure Collaborative Editing in your Directus project.",{"title":586,"path":587,"stem":588,"description":589,"icon":14,"links":14},"Usage Guide","/guides/content/collaborative-editing/usage","guides/02.content/9.collaborative-editing/2.usage","Learn how to use Collaborative Editing for real-time collaboration on content in your Directus project.",{"title":591,"path":592,"stem":593,"description":594,"icon":14,"links":14},"Development & Custom Extensions","/guides/content/collaborative-editing/development","guides/02.content/9.collaborative-editing/3.development","Learn how Custom Interfaces integrate with Collaborative Editing in Directus.",{"title":74,"description":14,"icon":596,"links":14,"path":597,"stem":598,"children":599,"page":89},"directus-auth","/guides/auth","guides/03.auth",[600,605,610,615,620,625,630],{"title":601,"path":602,"stem":603,"description":604,"icon":14,"links":14},"Access Tokens","/guides/auth/tokens-cookies","guides/03.auth/1.tokens-cookies","Learn how to authenticate requests & explore standard, session, and static token types.",{"title":606,"path":607,"stem":608,"description":609,"icon":14,"links":14},"Access Control","/guides/auth/access-control","guides/03.auth/2.access-control","Manage user and role permissions and policies for interacting with data in Directus.",{"title":611,"path":612,"stem":613,"description":614,"icon":14,"links":14},"Creating Users","/guides/auth/creating-users","guides/03.auth/3.creating-users","Learn about creating users in directus, including API creation, inviting users, and seamless invites.",{"title":616,"path":617,"stem":618,"description":619,"icon":14,"links":14},"Email Login","/guides/auth/email-login","guides/03.auth/4.email-login","Learn about user registration, login with standard/session tokens, refresh, logout, and resetting passwords.",{"title":621,"path":622,"stem":623,"description":624,"icon":14,"links":14},"Two-Factor Auth","/guides/auth/2fa","guides/03.auth/5.2fa","Secure your logins with one-time codes! Learn how to generate secrets, enable/disable 2FA.",{"title":626,"path":627,"stem":628,"description":629,"icon":14,"links":14},"Accountability","/guides/auth/accountability","guides/03.auth/6.accountability","Learn to audit user activity and enforce accountability using the activity feed.",{"title":631,"path":632,"stem":633,"children":634,"description":636,"icon":14,"links":14},"Single Sign-On","/guides/auth/sso","guides/03.auth/7.sso/1.index",[635,637],{"title":631,"path":632,"stem":633,"description":636,"icon":14,"links":14},"Single Sign-On is a mechanism which allows to use external providers to login into systems.",{"title":638,"path":639,"stem":640,"description":641,"icon":14,"links":14},"Seamless SSO","/guides/auth/sso/seamless","guides/03.auth/7.sso/2.seamless","Seamless SSO is a setup to allow logging in without the user ever seeing Directus' login page.",{"title":643,"description":14,"icon":644,"links":14,"path":645,"stem":646,"children":647,"page":89},"Connect","directus-connect","/guides/connect","guides/04.connect",[648,652,657,662,667,672],{"title":16,"path":649,"stem":650,"description":651,"icon":14,"links":14},"/guides/connect/authentication","guides/04.connect/1.authentication","Discover how to authenticate Directus Connect requests using authorization headers, session cookies, or query parameters.",{"title":653,"path":654,"stem":655,"description":656,"icon":14,"links":14},"Filter Rules","/guides/connect/filter-rules","guides/04.connect/2.filter-rules","Learn about filter rules in Directus - available operators, filter syntax, relational fields, dynamic variables, logical operators, and functions parameters. Understand how to build complex filters for permissions, validations, and automations.",{"title":658,"path":659,"stem":660,"description":661,"icon":14,"links":14},"Query Parameters","/guides/connect/query-parameters","guides/04.connect/3.query-parameters","Learn about Directus query parameters - fields, filter, search, sort, limit, offset, page, aggregate, groupBy, deep, alias, and export. Understand how to customize your API requests and retrieve specific data from your collections.",{"title":663,"path":664,"stem":665,"description":666,"icon":14,"links":14},"Relational Data","/guides/connect/relations","guides/04.connect/4.relations","Directus enables you to manage and interact with relational data. This section will guide you through the different types of relationships and how to work with them.",{"title":668,"path":669,"stem":670,"description":671,"icon":14,"links":14},"Error Codes","/guides/connect/errors","guides/04.connect/5.errors","Learn about Directus error codes - understand what each code means, from validation failures to rate limits exceeded. Troubleshoot issues with your API requests and resolve errors efficiently.",{"title":673,"path":674,"stem":675,"description":676,"icon":14,"links":14},"Directus SDK","/guides/connect/sdk","guides/04.connect/6.sdk","A JavaScript and TypeScript library that simplifies working with Directus.",{"title":377,"description":14,"icon":678,"links":14,"path":679,"stem":680,"children":681,"page":89},"directus-files","/guides/files","guides/05.files",[682,687,692,697,702],{"title":683,"path":684,"stem":685,"description":686,"icon":14,"links":14},"Upload Files","/guides/files/upload","guides/05.files/1.upload","Learn to upload files to Directus via both the data studio or API.",{"title":688,"path":689,"stem":690,"description":691,"icon":14,"links":14},"Download Files","/guides/files/download","guides/05.files/2.download","Learn to download content from the File Library",{"title":693,"path":694,"stem":695,"description":696,"icon":14,"links":14},"Manage Files","/guides/files/manage","guides/05.files/3.manage","Learn to view, modify, edit and set files' focal points.",{"title":698,"path":699,"stem":700,"description":701,"icon":14,"links":14},"Access Files","/guides/files/access","guides/05.files/4.access","Learn how to access uploaded files, authenticate, provide optional filenames and directly download them.",{"title":703,"path":704,"stem":705,"description":706,"icon":14,"links":14},"Transform Files","/guides/files/transform","guides/05.files/5.transform","Learn how to transform files and set custom presets for these transformations.",{"title":708,"description":14,"icon":709,"links":14,"path":710,"stem":711,"children":712,"page":89},"Automate","directus-automate","/guides/automate","guides/06.automate",[713,717,722,727],{"title":382,"path":714,"stem":715,"description":716,"icon":14,"links":14},"/guides/automate/flows","guides/06.automate/1.flows","Flows enable custom, event-driven data processing and task automation within Directus.",{"title":718,"path":719,"stem":720,"description":721,"icon":14,"links":14},"Data Chain","/guides/automate/data-chain","guides/06.automate/2.data-chain","Data chains are created by each flow and hold information that can be accessed within different operations.",{"title":723,"path":724,"stem":725,"description":726,"icon":14,"links":14},"Triggers","/guides/automate/triggers","guides/06.automate/3.triggers","Triggers define the action or events that start flows.",{"title":728,"path":729,"stem":730,"description":731,"icon":14,"links":14},"Operations","/guides/automate/operations","guides/06.automate/4.operations","Operations are individual customizable actions in a flow.",{"title":86,"description":14,"icon":733,"links":14,"path":734,"stem":735,"children":736,"page":89},"directus-realtime","/guides/realtime","guides/07.realtime",[737,741,746,751],{"title":16,"path":738,"stem":739,"description":740,"icon":14,"links":14},"/guides/realtime/authentication","guides/07.realtime/1.authentication","Learn to implement the three authentication modes.",{"title":742,"path":743,"stem":744,"description":745,"icon":14,"links":14},"Subscriptions","/guides/realtime/subscriptions","guides/07.realtime/2.subscriptions","Learn to manage realtime subscriptions with both websockets and GraphQL.",{"title":747,"path":748,"stem":749,"description":750,"icon":14,"links":14},"Actions","/guides/realtime/actions","guides/07.realtime/3.actions","Learn to execute CRUD actions via websockets.",{"title":752,"path":753,"stem":754,"description":755,"icon":14,"links":14},"Custom WebSocket Handlers","/guides/realtime/custom-handlers","guides/07.realtime/4.custom-handlers","Build custom WebSocket message handlers, push messages to connected clients, and react to WebSocket events using hook extensions.",{"title":757,"description":14,"icon":758,"links":14,"path":759,"stem":760,"children":761,"page":89},"Insights","directus-insights","/guides/insights","guides/08.insights",[762,766],{"title":230,"path":763,"stem":764,"description":765,"icon":14,"links":14},"/guides/insights/overview","guides/08.insights/1.overview","Insights is a module in Directus that allows rapid, no-code build-out of analytics dashboards.",{"title":767,"path":768,"stem":769,"description":770,"icon":14,"links":14},"Panels","/guides/insights/panels","guides/08.insights/2.panels","Panels are the building-blocks you can add onto insights dashboards to create, save and display data analytics.",{"title":372,"description":14,"icon":772,"links":14,"path":773,"stem":774,"children":775,"page":89},"directus-marketplace","/guides/extensions","guides/09.extensions",[776,780,785,817,864,869,881],{"title":230,"path":777,"stem":778,"description":779,"icon":14,"links":14},"/guides/extensions/overview","guides/09.extensions/0.overview","Extensions are used to extend the functionality of Directus.",{"title":781,"path":782,"stem":783,"description":784,"icon":14,"links":14},"Quickstart","/guides/extensions/quickstart","guides/09.extensions/1.quickstart","This guide will cover how to get started with developing an extension for Directus.",{"title":786,"path":787,"stem":788,"children":789,"description":791,"icon":14,"links":14},"API Extensions","/guides/extensions/api-extensions","guides/09.extensions/2.api-extensions/0.index",[790,792,797,802,807,812],{"title":786,"path":787,"stem":788,"description":791,"icon":14,"links":14},"API Extensions extend the functionality of the API.",{"title":793,"path":794,"stem":795,"description":796,"icon":14,"links":14},"Event Hooks","/guides/extensions/api-extensions/hooks","guides/09.extensions/2.api-extensions/1.hooks","Hooks allow running code when during the Directus lifecycle or database events.",{"title":798,"path":799,"stem":800,"description":801,"icon":14,"links":14},"API Endpoints","/guides/extensions/api-extensions/endpoints","guides/09.extensions/2.api-extensions/2.endpoints","Endpoints allow you to register new API routes in your Directus project.",{"title":803,"path":804,"stem":805,"description":806,"icon":14,"links":14},"Flow Operations","/guides/extensions/api-extensions/operations","guides/09.extensions/2.api-extensions/3.operations","Operations are single steps in a Flow - the no-code automation tool part of Directus Automate.",{"title":808,"path":809,"stem":810,"description":811,"icon":14,"links":14},"Services","/guides/extensions/api-extensions/services","guides/09.extensions/2.api-extensions/4.services","When building extensions, you may use internal Directus services directly.",{"title":813,"path":814,"stem":815,"description":816,"icon":14,"links":14},"Sandbox","/guides/extensions/api-extensions/sandbox","guides/09.extensions/2.api-extensions/5.sandbox","Sandboxed Extensions run in an isolated environment and must request permission scopes.",{"title":818,"path":819,"stem":820,"children":821,"description":823,"icon":14,"links":14},"App Extensions","/guides/extensions/app-extensions","guides/09.extensions/3.app-extensions/0.index",[822,824,829,834,839,844,849,854,859],{"title":818,"path":819,"stem":820,"description":823,"icon":14,"links":14},"App Extensions extend the functionality of the Data Studio.",{"title":825,"path":826,"stem":827,"description":828,"icon":14,"links":14},"Editor Interfaces","/guides/extensions/app-extensions/interfaces","guides/09.extensions/3.app-extensions/1.interfaces","Interfaces are form inputs used primarily inside of the Directus Editor.",{"title":830,"path":831,"stem":832,"description":833,"icon":14,"links":14},"Inline Displays","/guides/extensions/app-extensions/displays","guides/09.extensions/3.app-extensions/2.displays","Displays are used to display a single value throughout the Data Studio.",{"title":835,"path":836,"stem":837,"description":838,"icon":14,"links":14},"Explore Layouts","/guides/extensions/app-extensions/layouts","guides/09.extensions/3.app-extensions/3.layouts","Layouts are used to display a list of items in Explore pages in different ways.",{"title":840,"path":841,"stem":842,"description":843,"icon":14,"links":14},"Dashboard Panels","/guides/extensions/app-extensions/panels","guides/09.extensions/3.app-extensions/4.panels","Panels are customizable components within Directus Insights dashboards.",{"title":845,"path":846,"stem":847,"description":848,"icon":14,"links":14},"Custom Modules","/guides/extensions/app-extensions/modules","guides/09.extensions/3.app-extensions/5.modules","Modules are top-level areas of the Data Studio, navigated to from the left-hand module bar.",{"title":850,"path":851,"stem":852,"description":853,"icon":14,"links":14},"Custom Themes","/guides/extensions/app-extensions/themes","guides/09.extensions/3.app-extensions/6.themes","Themes are used to style elements of the Data Studio including colors and fonts.",{"title":855,"path":856,"stem":857,"description":858,"icon":14,"links":14},"UI Library","/guides/extensions/app-extensions/ui-library","guides/09.extensions/3.app-extensions/7.ui-library","Directus offers globally-registered UI components for building extensions.",{"title":860,"path":861,"stem":862,"description":863,"icon":14,"links":14},"Composables","/guides/extensions/app-extensions/composables","guides/09.extensions/3.app-extensions/8.composables","Vue composables for working with Directus services when building extensions.",{"title":865,"path":866,"stem":867,"description":868,"icon":14,"links":14},"Bundling Extensions","/guides/extensions/bundles","guides/09.extensions/4.bundles","Bundles are a way to group extensions together as a single distributable package.",{"title":870,"path":871,"stem":872,"children":873,"description":875,"icon":14,"links":14},"Marketplace Beta","/guides/extensions/marketplace","guides/09.extensions/5.marketplace/0.index",[874,876],{"title":870,"path":871,"stem":872,"description":875,"icon":14,"links":14},"The Directus Marketplace provides a way for users to install extensions in their projects directly the Data Studio.",{"title":877,"path":878,"stem":879,"description":880,"icon":14,"links":14},"Publishing Extensions","/guides/extensions/marketplace/publishing","guides/09.extensions/5.marketplace/1.publishing","Publish extensions to the Directus Marketplace via npm, including required metadata, best practices, and author profile setup.",{"title":882,"path":883,"stem":884,"description":885,"icon":14,"links":14},"CLI","/guides/extensions/cli","guides/09.extensions/6.cli","Using the create-directus-extension to build, validate and manage extensions.",{"title":887,"path":888,"stem":889,"children":890,"description":14,"icon":898,"links":14},"Deployments","/guides/deployments","guides/10.deployments/0.index",[891,893],{"title":230,"path":888,"stem":889,"description":892,"icon":14,"links":14},"Trigger, monitor, and manage frontend deployments directly from Directus.",{"title":894,"path":895,"stem":896,"description":897,"icon":14,"links":14},"Security","/guides/deployments/security","guides/10.deployments/1.security","Access control, permissions, and credential protection for the Deployment module.","directus-deployments",{"title":347,"path":900,"stem":901,"children":902,"description":14,"icon":987,"links":14},"/guides/ai","guides/11.ai/0.index",[903,906,937],{"title":904,"path":900,"stem":901,"description":905,"icon":14,"links":14},"AI + Directus","Use AI to interact with Directus - either through the built-in AI Assistant or by connecting external AI tools via MCP.",{"title":907,"path":908,"stem":909,"children":910,"description":14,"icon":14,"links":14},"AI Assistant","/guides/ai/assistant","guides/11.ai/1.assistant/0.index",[911,913,918,923,928,933],{"title":230,"path":908,"stem":909,"description":912,"icon":14,"links":14},"Chat with an AI assistant directly inside Directus. Create content, manage your schema, trigger automations, and explore your data through natural conversation.",{"title":914,"path":915,"stem":916,"description":917,"icon":14,"links":14},"Setup","/guides/ai/assistant/setup","guides/11.ai/1.assistant/1.setup","Configure AI Assistant by adding your AI provider API keys and customizing assistant behavior.",{"title":919,"path":920,"stem":921,"description":922,"icon":14,"links":14},"Usage","/guides/ai/assistant/usage","guides/11.ai/1.assistant/2.usage","Learn how to use AI Assistant to interact with your Directus instance through natural conversation.",{"title":924,"path":925,"stem":926,"description":927,"icon":14,"links":14},"Tools","/guides/ai/assistant/tools","guides/11.ai/1.assistant/3.tools","Reference of all tools available to AI Assistant for interacting with your Directus instance.",{"title":929,"path":930,"stem":931,"description":932,"icon":14,"links":14},"Best Practices","/guides/ai/assistant/tips","guides/11.ai/1.assistant/4.tips","Get the most out of AI Assistant with practical tips, example prompts, and common pitfalls to avoid.",{"title":894,"path":934,"stem":935,"description":936,"icon":14,"links":14},"/guides/ai/assistant/security","guides/11.ai/1.assistant/5.security","Security considerations for using AI Assistant safely with your Directus data.",{"title":938,"path":939,"stem":940,"children":941,"description":14,"icon":14,"links":14},"MCP Server","/guides/ai/mcp","guides/11.ai/2.mcp/0.index",[942,944,949,954,958,963,968,972],{"title":230,"path":939,"stem":940,"description":943,"icon":14,"links":14},"Connect AI assistants directly to your Directus instance. Let Claude, ChatGPT, and other AI tools manage your content without manual copy-pasting.",{"title":945,"path":946,"stem":947,"description":948,"icon":14,"links":14},"Installation","/guides/ai/mcp/installation","guides/11.ai/2.mcp/1.installation","Set up the Directus MCP server and connect your AI tools in under 5 minutes.",{"title":950,"path":951,"stem":952,"description":953,"icon":14,"links":14},"Use Cases","/guides/ai/mcp/use-cases","guides/11.ai/2.mcp/2.use-cases","Real examples of how to use AI with your Directus content to save time and reduce repetitive work.",{"title":924,"path":955,"stem":956,"description":957,"icon":14,"links":14},"/guides/ai/mcp/tools","guides/11.ai/2.mcp/3.tools","Learn about the tools available in the Directus remote MCP server and how they enable AI-powered content management.",{"title":959,"path":960,"stem":961,"description":962,"icon":14,"links":14},"Prompts","/guides/ai/mcp/prompts","guides/11.ai/2.mcp/4.prompts","Learn how to configure and use stored prompts with the Directus MCP Server.",{"title":964,"path":965,"stem":966,"description":967,"icon":14,"links":14},"Troubleshooting","/guides/ai/mcp/troubleshooting","guides/11.ai/2.mcp/5.troubleshooting","Common issues and solutions when setting up and using the Directus MCP server.",{"title":894,"path":969,"stem":970,"description":971,"icon":14,"links":14},"/guides/ai/mcp/security","guides/11.ai/2.mcp/6.security","Practical security guidelines for using the Directus MCP server safely and protecting your data.",{"title":973,"path":974,"stem":975,"children":976,"description":14,"icon":14,"links":14},"Local MCP","/guides/ai/mcp/local-mcp","guides/11.ai/2.mcp/7.local-mcp/0.index",[977,979,983],{"title":945,"path":974,"stem":975,"description":978,"icon":14,"links":14},"The Directus Content MCP Server allows you to interact with your Directus data through AI tools using the Model Context Protocol.",{"title":924,"path":980,"stem":981,"description":982,"icon":14,"links":14},"/guides/ai/mcp/local-mcp/tools","guides/11.ai/2.mcp/7.local-mcp/1.tools","Learn about the tools available in the local Directus Content MCP Server and how to configure them.",{"title":959,"path":984,"stem":985,"description":986,"icon":14,"links":14},"/guides/ai/mcp/local-mcp/prompts","guides/11.ai/2.mcp/7.local-mcp/2.prompts","Configure stored prompts with the local MCP server using environment variables and manual collection setup.","directus-ai",{"title":989,"description":14,"icon":990,"links":14,"path":991,"stem":992,"children":993},"Integrations","directus-integrations","/guides/integrations","guides/12.integrations/index",[994,996,1003,1024,1046,1065,1076],{"title":989,"path":991,"stem":992,"description":995,"icon":14,"links":14},"Connect Directus with third-party tools and services to extend functionality and automate workflows.",{"title":997,"path":998,"stem":999,"children":1000,"description":14,"icon":14,"links":14},"Framer","/guides/integrations/framer","guides/11.integrations/6.framer/0.index",[1001],{"title":997,"path":998,"stem":999,"description":1002,"icon":14,"links":14},"Connect your Directus collections to Framer's CMS to sync content in both directions using the Directus Framer plugin.",{"title":1004,"path":1005,"stem":1006,"children":1007,"description":14,"icon":14,"links":14},"n8n","/guides/integrations/n8n","guides/12.integrations/1.n8n/0.index",[1008,1011,1015,1020],{"title":1009,"path":1005,"stem":1006,"description":1010,"icon":14,"links":14},"Integration","Connect Directus with n8n to automate workflows, sync data, and integrate your CMS with other services using the Directus community node.",{"title":747,"path":1012,"stem":1013,"description":1014,"icon":14,"links":14},"/guides/integrations/n8n/directus-n8n-actions","guides/12.integrations/1.n8n/directus-n8n-actions","Complete guide for using Directus actions in n8n workflows, including working with items, users, and files.",{"title":1016,"path":1017,"stem":1018,"description":1019,"icon":14,"links":14},"Advanced","/guides/integrations/n8n/directus-n8n-advanced","guides/12.integrations/1.n8n/directus-n8n-advanced","Advanced guide for using Directus raw CRUD operations in n8n, including raw JSON operations, complex filters, relational queries, and query parameters.",{"title":723,"path":1021,"stem":1022,"description":1023,"icon":14,"links":14},"/guides/integrations/n8n/directus-n8n-triggers","guides/12.integrations/1.n8n/directus-n8n-triggers","Complete guide for using Directus triggers in n8n workflows to automate workflows when events happen in Directus.",{"title":1025,"path":1026,"stem":1027,"children":1028,"description":14,"icon":14,"links":14},"Clay","/guides/integrations/clay","guides/12.integrations/2.clay/0.index",[1029,1031,1036,1041],{"title":1009,"path":1026,"stem":1027,"description":1030,"icon":14,"links":14},"Connect Directus with Clay to automate data enrichment and sync content between platforms using webhooks and HTTP API templates.",{"title":1032,"path":1033,"stem":1034,"description":1035,"icon":14,"links":14},"Data Operations","/guides/integrations/clay/directus-clay-data-operations","guides/12.integrations/2.clay/directus-clay-data-operations","Advanced techniques for working with Directus data in Clay, including filters, pagination, common use cases, and best practices.",{"title":1037,"path":1038,"stem":1039,"description":1040,"icon":14,"links":14},"Templates","/guides/integrations/clay/use-clay-templates-with-directus","guides/12.integrations/2.clay/use-clay-templates-with-directus","Learn how to use Clay's pre-built HTTP API templates to connect with Directus for data enrichment and synchronization.",{"title":1042,"path":1043,"stem":1044,"description":1045,"icon":14,"links":14},"Webhooks","/guides/integrations/clay/use-directus-webhooks-with-clay","guides/12.integrations/2.clay/use-directus-webhooks-with-clay","Learn how to set up Directus Flows to automatically send data to Clay webhooks for real-time data synchronization.",{"title":1047,"path":1048,"stem":1049,"children":1050,"description":14,"icon":14,"links":14},"Zapier","/guides/integrations/zapier","guides/12.integrations/3.zapier/0.index",[1051,1053,1057,1061],{"title":1009,"path":1048,"stem":1049,"description":1052,"icon":14,"links":14},"Connect Directus with Zapier to automate workflows, sync data, and integrate your CMS with thousands of other apps using the Directus Zapier integration.",{"title":747,"path":1054,"stem":1055,"description":1056,"icon":14,"links":14},"/guides/integrations/zapier/actions","guides/12.integrations/3.zapier/actions","Complete guide for using Directus actions in Zapier workflows, including working with items, users, and files.",{"title":1016,"path":1058,"stem":1059,"description":1060,"icon":14,"links":14},"/guides/integrations/zapier/advanced","guides/12.integrations/3.zapier/advanced","Advanced guide for using Directus API features in Zapier, including raw request actions, advanced filtering, and custom API calls.",{"title":723,"path":1062,"stem":1063,"description":1064,"icon":14,"links":14},"/guides/integrations/zapier/triggers","guides/12.integrations/3.zapier/triggers","Complete guide for using Directus triggers in Zapier workflows to automatically start Zaps when events happen in Directus.",{"title":1066,"path":1067,"stem":1068,"children":1069,"description":14,"icon":14,"links":14},"Vercel","/guides/integrations/vercel","guides/12.integrations/4.vercel/0.index",[1070,1072],{"title":1066,"path":1067,"stem":1068,"description":1071,"icon":14,"links":14},"Connect Directus with Vercel to trigger deployments, monitor build status, and manage your frontend projects directly from your Directus instance.",{"title":887,"path":1073,"stem":1074,"description":1075,"icon":14,"links":14},"/guides/integrations/vercel/deployments","guides/12.integrations/4.vercel/deployments","Complete guide for triggering deployments, monitoring build status, and viewing logs for your Vercel projects from Directus.",{"title":1077,"path":1078,"stem":1079,"children":1080,"description":14,"icon":14,"links":14},"Netlify","/guides/integrations/netlify","guides/12.integrations/5.netlify/0.index",[1081,1083],{"title":1077,"path":1078,"stem":1079,"description":1082,"icon":14,"links":14},"Integrate Directus with Netlify to deploy your sites, track build progress, and manage frontend projects from within your Directus instance.",{"title":887,"path":1084,"stem":1085,"description":1086,"icon":14,"links":14},"/guides/integrations/netlify/deployments","guides/12.integrations/5.netlify/deployments","Full guide for triggering builds, tracking deployment progress, and viewing logs for your Netlify sites from Directus.",{"title":230,"path":1088,"stem":1089,"children":1090,"description":1092,"icon":14,"links":14},"/releases","releases/1.index",[1091,1093,1098],{"title":230,"path":1088,"stem":1089,"description":1092,"icon":14,"links":14},"Releases are how we roll out new features, updates, and fixes to Directus.",{"title":1094,"path":1095,"stem":1096,"description":1097,"icon":14,"links":14},"Changelog","/releases/changelog","releases/2.changelog","A monthly summary of what's new from the Directus team.",{"title":1099,"path":1100,"stem":1101,"children":1102,"description":1104,"icon":14,"links":14},"Breaking Changes","/releases/breaking-changes","releases/3.breaking-changes/0.index",[1103,1105,1109],{"title":1099,"path":1100,"stem":1101,"description":1104,"icon":14,"links":14},"Breaking changes may require action on your part before upgrading.",{"title":1106,"path":1107,"stem":1108,"description":1104,"icon":14,"links":14},"Version 10","/releases/breaking-changes/version-10","releases/3.breaking-changes/1.version-10",{"title":1110,"path":1111,"stem":1112,"description":1104,"icon":14,"links":14},"Version 11","/releases/breaking-changes/version-11","releases/3.breaking-changes/2.version-11",{"title":1114,"description":14,"icon":14,"links":14,"path":1115,"stem":1116,"children":1117,"page":89},"Self-Hosting","/self-hosting","self-hosting",[1118,1122,1127,1132,1137],{"title":230,"path":1119,"stem":1120,"description":1121,"icon":14,"links":14},"/self-hosting/overview","self-hosting/1.overview","Self-hosting Directus means running the Directus software on your own infrastructure.",{"title":1123,"path":1124,"stem":1125,"description":1126,"icon":14,"links":14},"Requirements","/self-hosting/requirements","self-hosting/2.requirements","This page outlines the requirements for self-hosting Directus.",{"title":1128,"path":1129,"stem":1130,"description":1131,"icon":14,"links":14},"Deployment","/self-hosting/deploying","self-hosting/3.deploying","This section covers the deployment process of Directus, including environment variables, versioning, persistence, and initial admin user setup.",{"title":1133,"path":1134,"stem":1135,"description":1136,"icon":14,"links":14},"Upgrading","/self-hosting/upgrading","self-hosting/4.upgrading","Learn how to upgrade Directus to the latest version.",{"title":1138,"path":1139,"stem":1140,"description":1141,"icon":14,"links":14},"Including Extensions","/self-hosting/including-extensions","self-hosting/5.including-extensions","Learn how to include extensions in your self-hosted Directus project.",{"title":1143,"path":1144,"stem":1145,"children":1146},"Tutorials","/tutorials","tutorials",[1147,1150,1370,1530,1576,1602,1719,1749],{"title":1143,"path":1144,"stem":1148,"description":1149,"icon":14,"links":14},"tutorials/index","This is a collection of step-by-step guides and practical examples to help you get the most out of our platform. Whether you're a beginner or an experienced user, our tutorials are designed to provide you with the knowledge and skills you need to succeed.",{"title":125,"path":1151,"stem":1152,"children":1153,"description":24,"icon":14,"links":14},"/tutorials/getting-started","tutorials/1.getting-started/index",[1154,1155,1160,1165,1170,1175,1180,1185,1190,1195,1200,1205,1210,1215,1220,1225,1230,1235,1240,1245,1250,1255,1260,1265,1270,1275,1280,1285,1290,1295,1300,1305,1310,1315,1320,1325,1330,1335,1340,1345,1350,1355,1360,1365],{"title":125,"path":1151,"stem":1152,"description":24,"icon":14,"links":14},{"title":1156,"path":1157,"stem":1158,"description":1159,"icon":14,"links":14},"Create Reusable Blocks with Many-to-Any Relationships","/tutorials/getting-started/create-reusable-blocks-with-many-to-any-relationships","tutorials/1.getting-started/create-reusable-blocks-with-many-to-any-relationships","Learn how to data model for multiple, repeating sections of content.",{"title":1161,"path":1162,"stem":1163,"description":1164,"icon":14,"links":14},"Fetch Data from Directus in Android with Kotlin","/tutorials/getting-started/fetch-data-from-directus-in-android-with-kotlin","tutorials/1.getting-started/fetch-data-from-directus-in-android-with-kotlin","Learn how to integrate Directus in your Android app with Kotlin.",{"title":1166,"path":1167,"stem":1168,"description":1169,"icon":14,"links":14},"Fetch Data from Directus in iOS with Swift","/tutorials/getting-started/fetch-data-from-directus-in-ios-with-swift","tutorials/1.getting-started/fetch-data-from-directus-in-ios-with-swift","Learn how to integrate Directus in your iOS app with Swift.",{"title":1171,"path":1172,"stem":1173,"description":1174,"icon":14,"links":14},"Fetch Data from Directus with Angular","/tutorials/getting-started/fetch-data-from-directus-with-angular","tutorials/1.getting-started/fetch-data-from-directus-with-angular","Learn how to integrate Directus in your Angular web application.",{"title":1176,"path":1177,"stem":1178,"description":1179,"icon":14,"links":14},"Fetch Data from Directus with Astro","/tutorials/getting-started/fetch-data-from-directus-with-astro","tutorials/1.getting-started/fetch-data-from-directus-with-astro","Learn how to integrate Directus in your Astro web application.",{"title":1181,"path":1182,"stem":1183,"description":1184,"icon":14,"links":14},"Fetch Data from Directus with Django","/tutorials/getting-started/fetch-data-from-directus-with-django","tutorials/1.getting-started/fetch-data-from-directus-with-django","Learn how to integrate Directus in your Django web application.",{"title":1186,"path":1187,"stem":1188,"description":1189,"icon":14,"links":14},"Fetch Data from Directus with Eleventy 3","/tutorials/getting-started/fetch-data-from-directus-with-eleventy-3","tutorials/1.getting-started/fetch-data-from-directus-with-eleventy-3","Learn how to integrate Directus in your 11ty web application.",{"title":1191,"path":1192,"stem":1193,"description":1194,"icon":14,"links":14},"Fetch Data from Directus with Flask","/tutorials/getting-started/fetch-data-from-directus-with-flask","tutorials/1.getting-started/fetch-data-from-directus-with-flask","Learn how to integrate Directus in your Flask web application.",{"title":1196,"path":1197,"stem":1198,"description":1199,"icon":14,"links":14},"Fetch Data from Directus with Flutter","/tutorials/getting-started/fetch-data-from-directus-with-flutter","tutorials/1.getting-started/fetch-data-from-directus-with-flutter","Learn how to integrate Directus in your Flutter app with Dart.",{"title":1201,"path":1202,"stem":1203,"description":1204,"icon":14,"links":14},"Fetch Data from Directus with Laravel","/tutorials/getting-started/fetch-data-from-directus-with-laravel","tutorials/1.getting-started/fetch-data-from-directus-with-laravel","Learn how to integrate Directus in your Laravel web application.",{"title":1206,"path":1207,"stem":1208,"description":1209,"icon":14,"links":14},"Fetch Data from Directus with Next.js","/tutorials/getting-started/fetch-data-from-directus-with-nextjs","tutorials/1.getting-started/fetch-data-from-directus-with-nextjs","Learn how to integrate Directus in your Next.js web application.",{"title":1211,"path":1212,"stem":1213,"description":1214,"icon":14,"links":14},"Fetch Data from Directus with Nuxt","/tutorials/getting-started/fetch-data-from-directus-with-nuxt","tutorials/1.getting-started/fetch-data-from-directus-with-nuxt","Learn how to integrate Directus in your Nuxt web application.",{"title":1216,"path":1217,"stem":1218,"description":1219,"icon":14,"links":14},"Fetch Data from Directus with SolidStart","/tutorials/getting-started/fetch-data-from-directus-with-solidstart","tutorials/1.getting-started/fetch-data-from-directus-with-solidstart","Learn how to integrate Directus in your SolidStart web application.",{"title":1221,"path":1222,"stem":1223,"description":1224,"icon":14,"links":14},"Fetch Data from Directus with Spring Boot","/tutorials/getting-started/fetch-data-from-directus-with-spring-boot","tutorials/1.getting-started/fetch-data-from-directus-with-spring-boot","Learn how to integrate Directus in your Spring Boot web application.",{"title":1226,"path":1227,"stem":1228,"description":1229,"icon":14,"links":14},"Fetch Data from Directus with SvelteKit","/tutorials/getting-started/fetch-data-from-directus-with-sveltekit","tutorials/1.getting-started/fetch-data-from-directus-with-sveltekit","Learn how to integrate Directus in your SvelteKit web application.",{"title":1231,"path":1232,"stem":1233,"description":1234,"icon":14,"links":14},"Implement Directus Auth with iOS","/tutorials/getting-started/implement-directus-auth-with-ios","tutorials/1.getting-started/implement-directus-auth-with-ios","Learn how to register, login, and protect content in your iOS app.",{"title":1236,"path":1237,"stem":1238,"description":1239,"icon":14,"links":14},"Implement Multilingual Content with Directus and SvelteKit","/tutorials/getting-started/implement-multilingual-content-with-directus-and-svelte-kit","tutorials/1.getting-started/implement-multilingual-content-with-directus-and-svelte-kit","Learn how to handle internationalization in your SvelteKit application.",{"title":1241,"path":1242,"stem":1243,"description":1244,"icon":14,"links":14},"Implementing Live Preview in Astro","/tutorials/getting-started/implementing-live-preview-in-astro","tutorials/1.getting-started/implementing-live-preview-in-astro","Learn how to setup Directus live preview with Astro.",{"title":1246,"path":1247,"stem":1248,"description":1249,"icon":14,"links":14},"Implementing Live Preview in Next.js","/tutorials/getting-started/implementing-live-preview-in-next-js","tutorials/1.getting-started/implementing-live-preview-in-next-js","Learn how to setup Directus live preview with Next.js.",{"title":1251,"path":1252,"stem":1253,"description":1254,"icon":14,"links":14},"Implementing Live Preview in Nuxt","/tutorials/getting-started/implementing-live-preview-in-nuxt","tutorials/1.getting-started/implementing-live-preview-in-nuxt","Learn how to setup Directus live preview with Nuxt.",{"title":1256,"path":1257,"stem":1258,"description":1259,"icon":14,"links":14},"Implementing Live Preview in React","/tutorials/getting-started/implementing-live-preview-in-react","tutorials/1.getting-started/implementing-live-preview-in-react","Learn how to setup Directus live preview with React.",{"title":1261,"path":1262,"stem":1263,"description":1264,"icon":14,"links":14},"Implementing Live Preview in SvelteKit","/tutorials/getting-started/implementing-live-preview-in-sveltekit","tutorials/1.getting-started/implementing-live-preview-in-sveltekit","Learn how to setup Directus live preview with SvelteKit.",{"title":1266,"path":1267,"stem":1268,"description":1269,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Astro","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-astro","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-astro","Learn how to access multilingual Directus content using Astro.",{"title":1271,"path":1272,"stem":1273,"description":1274,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Next.js","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-next","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-next","Learn how to access multilingual Directus content using Next.js.",{"title":1276,"path":1277,"stem":1278,"description":1279,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Nuxt","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-nuxt","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-nuxt","Learn how to access multilingual Directus content using Nuxt.",{"title":1281,"path":1282,"stem":1283,"description":1284,"icon":14,"links":14},"Implementing Multilingual Content using Directus and SvelteKit","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-sveltekit","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-sveltekit","Learn how to access multilingual Directus content using SvelteKit.",{"title":1286,"path":1287,"stem":1288,"description":1289,"icon":14,"links":14},"Integrating the Directus Visual Editor with Next.js","/tutorials/getting-started/integrating-the-directus-visual-editor-with-nextjs","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-nextjs","Learn how to integrate the Directus Visual Editor with Next.js.",{"title":1291,"path":1292,"stem":1293,"description":1294,"icon":14,"links":14},"Integrating the Directus Visual Editor with Nuxt","/tutorials/getting-started/integrating-the-directus-visual-editor-with-nuxt","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-nuxt","Learn how to integrate the Directus Visual Editor with Nuxt.",{"title":1296,"path":1297,"stem":1298,"description":1299,"icon":14,"links":14},"Integrating the Directus Visual Editor with SvelteKit","/tutorials/getting-started/integrating-the-directus-visual-editor-with-sveltekit","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-sveltekit","Learn how to integrate the Directus Visual Editor with SvelteKit.",{"title":1301,"path":1302,"stem":1303,"description":1304,"icon":14,"links":14},"Rendering Dynamic Blocks Using Astro","/tutorials/getting-started/rendering-dynamic-blocks-using-astro","tutorials/1.getting-started/rendering-dynamic-blocks-using-astro","Learn how to render dynamic blocks using Astro.",{"title":1306,"path":1307,"stem":1308,"description":1309,"icon":14,"links":14},"Rendering Dynamic Blocks Using Next.js","/tutorials/getting-started/rendering-dynamic-blocks-using-next","tutorials/1.getting-started/rendering-dynamic-blocks-using-next","Learn how to render dynamic blocks using Next.js.",{"title":1311,"path":1312,"stem":1313,"description":1314,"icon":14,"links":14},"Rendering Dynamic Blocks Using Nuxt","/tutorials/getting-started/rendering-dynamic-blocks-using-nuxt","tutorials/1.getting-started/rendering-dynamic-blocks-using-nuxt","Learn how to render dynamic blocks using Nuxt.",{"title":1316,"path":1317,"stem":1318,"description":1319,"icon":14,"links":14},"Rendering Dynamic Blocks Using SvelteKit","/tutorials/getting-started/rendering-dynamic-blocks-using-sveltekit","tutorials/1.getting-started/rendering-dynamic-blocks-using-sveltekit","Learn how to render dynamic blocks using SvelteKit.",{"title":1321,"path":1322,"stem":1323,"description":1324,"icon":14,"links":14},"Set Up Live Preview with Next.js","/tutorials/getting-started/set-up-live-preview-with-next-js","tutorials/1.getting-started/set-up-live-preview-with-next-js","Learn how to confgure Live Preview with Next.js' draft mode.",{"title":1326,"path":1327,"stem":1328,"description":1329,"icon":14,"links":14},"Set Up Live Preview with Nuxt","/tutorials/getting-started/set-up-live-preview-with-nuxt","tutorials/1.getting-started/set-up-live-preview-with-nuxt","Learn how to create a Nuxt preview plugin to configure Live Preview.",{"title":1331,"path":1332,"stem":1333,"description":1334,"icon":14,"links":14},"Submit Forms Using Directus and Next.js","/tutorials/getting-started/submit-forms-using-directus-and-nextjs","tutorials/1.getting-started/submit-forms-using-directus-and-nextjs","Learn how to submit forms using Directus and Next.js.",{"title":1336,"path":1337,"stem":1338,"description":1339,"icon":14,"links":14},"Submit Forms Using Directus and Nuxt","/tutorials/getting-started/submit-forms-using-directus-and-nuxt","tutorials/1.getting-started/submit-forms-using-directus-and-nuxt","Learn how to submit forms using Directus and Nuxt.",{"title":1341,"path":1342,"stem":1343,"description":1344,"icon":14,"links":14},"Submit Forms Using Directus and SvelteKit","/tutorials/getting-started/submit-forms-using-directus-and-sveltekit","tutorials/1.getting-started/submit-forms-using-directus-and-sveltekit","Learn how to submit forms using Directus and SvelteKit.",{"title":1346,"path":1347,"stem":1348,"description":1349,"icon":14,"links":14},"Using Authentication in Astro","/tutorials/getting-started/using-authentication-in-astro","tutorials/1.getting-started/using-authentication-in-astro","Learn how to setup Directus authentication with Astro.",{"title":1351,"path":1352,"stem":1353,"description":1354,"icon":14,"links":14},"Using Authentication in Next.js","/tutorials/getting-started/using-authentication-in-next-js","tutorials/1.getting-started/using-authentication-in-next-js","Learn how to setup Directus authentication with Next.js.",{"title":1356,"path":1357,"stem":1358,"description":1359,"icon":14,"links":14},"Using Authentication in Nuxt","/tutorials/getting-started/using-authentication-in-nuxt","tutorials/1.getting-started/using-authentication-in-nuxt","Learn how to setup Directus authentication with Nuxt.",{"title":1361,"path":1362,"stem":1363,"description":1364,"icon":14,"links":14},"Using Authentication in React","/tutorials/getting-started/using-authentication-in-react","tutorials/1.getting-started/using-authentication-in-react","Learn how to setup Directus authentication with React.",{"title":1366,"path":1367,"stem":1368,"description":1369,"icon":14,"links":14},"Using Authentication in SvelteKit","/tutorials/getting-started/using-authentication-in-sveltekit","tutorials/1.getting-started/using-authentication-in-sveltekit","Learn how to setup Directus authentication with SvelteKit.",{"title":145,"path":1371,"stem":1372,"children":1373,"description":24,"icon":14,"links":14},"/tutorials/projects","tutorials/2.projects/index",[1374,1375,1380,1385,1390,1395,1400,1405,1410,1415,1420,1425,1430,1435,1440,1445,1450,1455,1460,1465,1470,1475,1480,1485,1490,1495,1500,1505,1510,1515,1520,1525],{"title":145,"path":1371,"stem":1372,"description":24,"icon":14,"links":14},{"title":1376,"path":1377,"stem":1378,"description":1379,"icon":14,"links":14},"Build a Multi-User Chat with JavaScript and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-javascript-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-javascript-and-directus-realtime","Learn how to send and receive data over a realtime connection with JavaScript.",{"title":1381,"path":1382,"stem":1383,"description":1384,"icon":14,"links":14},"Build a Multi-User Chat with React and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-react-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-react-and-directus-realtime","Learn how to send and receive data over a realtime connection in React applications.",{"title":1386,"path":1387,"stem":1388,"description":1389,"icon":14,"links":14},"Build a Multi-User Chat with Vue.js and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-vue-js-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-vue-js-and-directus-realtime","Learn how to send and receive data over a realtime connection in a Vue.js application.",{"title":1391,"path":1392,"stem":1393,"description":1394,"icon":14,"links":14},"Build a Notebook Chrome Extension with Directus Auth","/tutorials/projects/build-a-notebook-chrome-extension-with-directus-auth","tutorials/2.projects/build-a-notebook-chrome-extension-with-directus-auth","Learn to build and integrate a Chrome Extension with Directus Auth.",{"title":1396,"path":1397,"stem":1398,"description":1399,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Astro","/tutorials/projects/build-a-realtime-chat-app-using-directus-and-astro","tutorials/2.projects/build-a-realtime-chat-app-using-directus-and-astro","Learn how to setup Directus realtime with Astro.",{"title":1401,"path":1402,"stem":1403,"description":1404,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Nuxt","/tutorials/projects/build-a-realtime-chat-app-using-directus-and-nuxt","tutorials/2.projects/build-a-realtime-chat-app-using-directus-and-nuxt","Learn how to setup Directus realtime with Nuxt.",{"title":1406,"path":1407,"stem":1408,"description":1409,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Next.js","/tutorials/projects/build-a-realtime-chat-app-with-directus-and-next","tutorials/2.projects/build-a-realtime-chat-app-with-directus-and-next","Learn how to setup Directus realtime with Next.js.",{"title":1411,"path":1412,"stem":1413,"description":1414,"icon":14,"links":14},"Build a Realtime Chat App with Directus and SvelteKit","/tutorials/projects/build-a-realtime-chat-app-with-directus-and-sveltekit","tutorials/2.projects/build-a-realtime-chat-app-with-directus-and-sveltekit","Learn how to setup Directus realtime with SvelteKit.",{"title":1416,"path":1417,"stem":1418,"description":1419,"icon":14,"links":14},"Build a Testimonial Widget with SvelteKit and Directus","/tutorials/projects/build-a-testimonial-widget-with-sveltekit-and-directus","tutorials/2.projects/build-a-testimonial-widget-with-sveltekit-and-directus","Learn how to set up a testimonial widget using SvelteKit and Directus.",{"title":1421,"path":1422,"stem":1423,"description":1424,"icon":14,"links":14},"Build a User Feedback Widget with Vue.js","/tutorials/projects/build-a-user-feedback-widget-with-vue-js","tutorials/2.projects/build-a-user-feedback-widget-with-vue-js-","Learn how we built our docs feedback widget with Directus.",{"title":1426,"path":1427,"stem":1428,"description":1429,"icon":14,"links":14},"Build a Video Streaming App with SvelteKit and Directus","/tutorials/projects/build-a-video-streaming-app-with-sveltekit-and-directus","tutorials/2.projects/build-a-video-streaming-app-with-sveltekit-and-directus","Learn how to store and retrieve video metadata, and then build a streaming application.",{"title":1431,"path":1432,"stem":1433,"description":1434,"icon":14,"links":14},"Build an Ecommerce Platform with Next.js, Stripe, and Directus Automate","/tutorials/projects/build-an-ecommerce-platform-with-next-js-stripe-and-directus-automate","tutorials/2.projects/build-an-ecommerce-platform-with-next-js-stripe-and-directus-automate","Learn to integrate Stripe with Directus Automate to build an e-commerce website.",{"title":1436,"path":1437,"stem":1438,"description":1439,"icon":14,"links":14},"Build an Hotel Booking Platform with Next.js, Stripe, and Directus Automate","/tutorials/projects/build-an-hotel-booking-platform-with-next-js-stripe-and-directus-automate","tutorials/2.projects/build-an-hotel-booking-platform-with-next-js-stripe-and-directus-automate","Learn to build a hotel booking site with dynamic availability and payments via Stripe.",{"title":1441,"path":1442,"stem":1443,"description":1444,"icon":14,"links":14},"Build Directus Garden - A Passive Collaborative Event Booth Demo","/tutorials/projects/build-directus-garden-a-passive-collaborative-event-booth-demo","tutorials/2.projects/build-directus-garden-a-passive-collaborative-event-booth-demo","Learn how we built our engagement platform for live in-person events with P5.js.",{"title":1446,"path":1447,"stem":1448,"description":1449,"icon":14,"links":14},"Build Forms Dynamically using Directus and Astro","/tutorials/projects/build-forms-dynamically-using-directus-and-astro","tutorials/2.projects/build-forms-dynamically-using-directus-and-astro","Learn how to setup Directus fields with Astro.",{"title":1451,"path":1452,"stem":1453,"description":1454,"icon":14,"links":14},"Build Forms Dynamically using Directus and Next.js","/tutorials/projects/build-forms-dynamically-using-directus-and-next","tutorials/2.projects/build-forms-dynamically-using-directus-and-next","Learn how to setup Directus fields with Next.js.",{"title":1456,"path":1457,"stem":1458,"description":1459,"icon":14,"links":14},"Build Forms Dynamically using Directus and Nuxt","/tutorials/projects/build-forms-dynamically-using-directus-and-nuxt","tutorials/2.projects/build-forms-dynamically-using-directus-and-nuxt","Learn how to setup Directus fields with Nuxt.",{"title":1461,"path":1462,"stem":1463,"description":1464,"icon":14,"links":14},"Build Forms Dynamically using Directus and SvelteKit","/tutorials/projects/build-forms-dynamically-using-directus-and-sveltekit","tutorials/2.projects/build-forms-dynamically-using-directus-and-sveltekit","Learn how to setup Directus fields with SvelteKit.",{"title":1466,"path":1467,"stem":1468,"description":1469,"icon":14,"links":14},"Build the Leap Week Registration and Referral System","/tutorials/projects/build-the-leap-week-registration-and-referral-system","tutorials/2.projects/build-the-leap-week-registration-and-referral-system-","Learn how we built our referral-based ticketing and raffle system with AI-generated rabbitars.",{"title":1471,"path":1472,"stem":1473,"description":1474,"icon":14,"links":14},"Building AIVenture - An AI-Powered Game with Directus","/tutorials/projects/building-ai-venture-an-ai-powered-game-with-directus","tutorials/2.projects/building-ai-venture-an-ai-powered-game-with-directus","Learn the advanced techniques used with Directus Automate to build a game.",{"title":1476,"path":1477,"stem":1478,"description":1479,"icon":14,"links":14},"Create a CMS using Directus and Astro","/tutorials/projects/create-a-cms-using-directus-and-astro","tutorials/2.projects/create-a-cms-using-directus-and-astro","Learn how to create a CMS using Directus and Astro.",{"title":1481,"path":1482,"stem":1483,"description":1484,"icon":14,"links":14},"Create a CMS using Directus and Next.js","/tutorials/projects/create-a-cms-using-directus-and-nextjs","tutorials/2.projects/create-a-cms-using-directus-and-nextjs","Learn how to create a CMS using Directus and Next.js.",{"title":1486,"path":1487,"stem":1488,"description":1489,"icon":14,"links":14},"Create a CMS using Directus and Nuxt","/tutorials/projects/create-a-cms-using-directus-and-nuxt","tutorials/2.projects/create-a-cms-using-directus-and-nuxt","Learn how to create a CMS using Directus and Nuxt.",{"title":1491,"path":1492,"stem":1493,"description":1494,"icon":14,"links":14},"Create a CMS using Directus and SvelteKit","/tutorials/projects/create-a-cms-using-directus-and-sveltekit","tutorials/2.projects/create-a-cms-using-directus-and-sveltekit","Learn how to create a CMS using Directus and SvelteKit.",{"title":1496,"path":1497,"stem":1498,"description":1499,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Astro","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-astro","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-astro","Learn how to create dynamic pages you can use in your CMS using Directus and Astro.",{"title":1501,"path":1502,"stem":1503,"description":1504,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Next.js","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-nextjs","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-nextjs","Learn how to create dynamic pages you can use in your CMS using Directus and Next.js.",{"title":1506,"path":1507,"stem":1508,"description":1509,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Nuxt","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-nuxt","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-nuxt","Learn how to create dynamic pages you can use in your CMS using Directus and Nuxt.",{"title":1511,"path":1512,"stem":1513,"description":1514,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and SvelteKit","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-sveltekit","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-sveltekit","Learn how to create dynamic pages you can use in your CMS using Directus and SvelteKit.",{"title":1516,"path":1517,"stem":1518,"description":1519,"icon":14,"links":14},"How I Built an AI Open Source Santa Roast App with Directus and Nuxt","/tutorials/projects/how-i-built-an-ai-open-source-santa-roast-app-with-directus-and-nuxt","tutorials/2.projects/how-i-built-an-ai-open-source-santa-roast-app-with-directus-and-nuxt","Bryant breaks down how he built an AI-powered app that roasts developers based on their GitHub contributions.",{"title":1521,"path":1522,"stem":1523,"description":1524,"icon":14,"links":14},"Integrate Directus with ESP32 Hardware Sensors","/tutorials/projects/integrate-directus-with-esp-32-hardware-sensors","tutorials/2.projects/integrate-directus-with-esp-32-hardware-sensors","Learn how to integrate Directus with IoT systems by reading and publishing sensor data.",{"title":1526,"path":1527,"stem":1528,"description":1529,"icon":14,"links":14},"Use Directus as a Baby Health Tracker with Owlet and OpsGenie","/tutorials/projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","tutorials/2.projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","Learn how to integrate Directus with hardware sensors and incident repsonse systems.",{"title":1531,"path":1532,"stem":1533,"children":1534,"description":24,"icon":14,"links":14},"Tips & Tricks","/tutorials/tips-and-tricks","tutorials/3.tips-and-tricks/index",[1535,1536,1541,1546,1551,1556,1561,1566,1571],{"title":1531,"path":1532,"stem":1533,"description":24,"icon":14,"links":14},{"title":1537,"path":1538,"stem":1539,"description":1540,"icon":14,"links":14},"Advanced Types with the Directus SDK","/tutorials/tips-and-tricks/advanced-types-with-the-directus-sdk","tutorials/3.tips-and-tricks/advanced-types-with-the-directus-sdk","Learn how to more-easily work with types and the Directus SDK.",{"title":1542,"path":1543,"stem":1544,"description":1545,"icon":14,"links":14},"Build a Monitoring Pipeline For Flows And Extensions","/tutorials/tips-and-tricks/build-a-monitoring-pipeline-for-flows-and-extensions","tutorials/3.tips-and-tricks/build-a-monitoring-pipeline-for-flows-and-extensions-","Learn how to set up complex pipelines to monitor automations and extensions.",{"title":1547,"path":1548,"stem":1549,"description":1550,"icon":14,"links":14},"Configure Okta as a Single Sign-On Provider","/tutorials/tips-and-tricks/configure-okta-as-a-single-sign-on-provider","tutorials/3.tips-and-tricks/configure-okta-as-a-single-sign-on-provider","Learn how to set up Okta SSO with the SAML authentication mechanism.",{"title":1552,"path":1553,"stem":1554,"description":1555,"icon":14,"links":14},"Implement Pagination and Infinite Scrolling in Next.js","/tutorials/tips-and-tricks/implement-pagination-and-infinite-scrolling-in-next-js","tutorials/3.tips-and-tricks/implement-pagination-and-infinite-scrolling-in-next-js-","Learn various techniques to load paginated data in your Next.js application.",{"title":1557,"path":1558,"stem":1559,"description":1560,"icon":14,"links":14},"Importing Files in Directus Automate","/tutorials/tips-and-tricks/importing-files-in-directus-automate","tutorials/3.tips-and-tricks/importing-files-in-directus-automate","Learn how to use the Request URL operation to import files in Directus Automate.",{"title":1562,"path":1563,"stem":1564,"description":1565,"icon":14,"links":14},"Preview Files in Live Preview with Google Docs Previews","/tutorials/tips-and-tricks/preview-files-in-live-preview-with-google-docs-previews","tutorials/3.tips-and-tricks/preview-files-in-live-preview-with-google-docs-previews","Learn how to use Google Gview to preview many file formats in Directus Editor.",{"title":1567,"path":1568,"stem":1569,"description":1570,"icon":14,"links":14},"Search Engine Optimization Best Practices","/tutorials/tips-and-tricks/search-engine-optimization-best-practices","tutorials/3.tips-and-tricks/search-engine-optimization-best-practices","Learn some best practices for enabling SEO in your projects using Directus.",{"title":1572,"path":1573,"stem":1574,"description":1575,"icon":14,"links":14},"Understanding Kubernetes","/tutorials/tips-and-tricks/understanding-kubernetes","tutorials/3.tips-and-tricks/understanding-kubernetes","Learn about key Kubernetes concepts and how they interact with each other.",{"title":1577,"path":1578,"stem":1579,"children":1580,"description":24,"icon":14,"links":14},"Migration","/tutorials/migration","tutorials/4.migration/index",[1581,1582,1587,1592,1597],{"title":1577,"path":1578,"stem":1579,"description":24,"icon":14,"links":14},{"title":1583,"path":1584,"stem":1585,"description":1586,"icon":14,"links":14},"Migrate from Notion to Directus","/tutorials/migration/migrate-from-notion-to-directus","tutorials/4.migration/migrate-from-notion-to-directus","Learn how to migrate data from Notion databases to Directus.",{"title":1588,"path":1589,"stem":1590,"description":1591,"icon":14,"links":14},"Migrate from Nuxt Content to Directus","/tutorials/migration/migrate-from-nuxt-content-to-directus","tutorials/4.migration/migrate-from-nuxt-content-to-directus","Learn how to move from a flat-file CMS to Directus.",{"title":1593,"path":1594,"stem":1595,"description":1596,"icon":14,"links":14},"Migrate from WordPress to Directus","/tutorials/migration/migrate-from-wordpress-to-directus","tutorials/4.migration/migrate-from-wordpress-to-directus","Learn how to migrate posts and images to Directus, with tips on plugins.",{"title":1598,"path":1599,"stem":1600,"description":1601,"icon":14,"links":14},"Promoting Changes Between Environments in Directus","/tutorials/migration/promoting-changes-between-environments-in-directus","tutorials/4.migration/promoting-changes-between-environments-in-directus","Learn the options to migrate schema and data between Directus projects.",{"title":372,"path":1603,"stem":1604,"children":1605,"description":1607,"icon":14,"links":14},"/tutorials/extensions","tutorials/5.extensions/index",[1606,1608,1613,1618,1623,1628,1633,1638,1643,1650,1657,1664,1669,1674,1679,1684,1689,1694,1699,1704,1709,1714],{"title":372,"path":1603,"stem":1604,"description":1607,"icon":14,"links":14},"All about extensions",{"title":1609,"path":1610,"stem":1611,"description":1612,"icon":14,"links":14},"Check Permissions in a Custom Endpoint","/tutorials/extensions/check-permissions-in-a-custom-endpoint","tutorials/5.extensions/check-permissions-in-a-custom-endpoint","Learn how to use internal Directus permissions when creating a custom endpoint.",{"title":1614,"path":1615,"stem":1616,"description":1617,"icon":14,"links":14},"Create Collection Items in Custom Panels","/tutorials/extensions/create-collection-items-in-custom-panels","tutorials/5.extensions/create-collection-items-in-custom-panels","Learn how to use built-in interfaces and composables to create new collections.",{"title":1619,"path":1620,"stem":1621,"description":1622,"icon":14,"links":14},"Create New Customers in Stripe in a Custom Hook","/tutorials/extensions/create-new-customers-in-stripe-in-a-custom-hook","tutorials/5.extensions/create-new-customers-in-stripe-in-a-custom-hook","Learn how to use the Stripe SDK to create data when actions occur in Directus.",{"title":1624,"path":1625,"stem":1626,"description":1627,"icon":14,"links":14},"Display External API Data From Vonage In Custom Panels","/tutorials/extensions/display-external-api-data-from-vonage-in-custom-panels","tutorials/5.extensions/display-external-api-data-from-vonage-in-custom-panels","Learn how to display records from external systems in Directus Insights.",{"title":1629,"path":1630,"stem":1631,"description":1632,"icon":14,"links":14},"Display External Weather API Data In Custom Panels","/tutorials/extensions/display-external-weather-api-data-in-custom-panels","tutorials/5.extensions/display-external-weather-api-data-in-custom-panels","Learn how to display external data in panels with a bundle and endpoint.",{"title":1634,"path":1635,"stem":1636,"description":1637,"icon":14,"links":14},"Format Dates in a Custom Display Extension","/tutorials/extensions/format-dates-in-a-custom-display-extension","tutorials/5.extensions/format-dates-in-a-custom-display-extension","Learn how to build a custom display to format data in Directus.",{"title":1639,"path":1640,"stem":1641,"description":1642,"icon":14,"links":14},"Implement Navigation in Multipage Custom Modules","/tutorials/extensions/implement-navigation-in-multipage-custom-modules","tutorials/5.extensions/implement-navigation-in-multipage-custom-modules","Learn how to navigate between multiple pages in module extensions.",{"title":1644,"path":1645,"stem":1646,"children":1647,"description":1649,"icon":14,"links":14},"Integrate Algolia Indexing with Custom Hooks","/tutorials/extensions/integrate-algolia-indexing-with-custom-hooks","tutorials/5.extensions/integrate-algolia-indexing-with-custom-hooks",[1648],{"title":1644,"path":1645,"stem":1646,"description":1649,"icon":14,"links":14},"Learn how to maintain an Algolia index when data is created, updated, and deleted.",{"title":1651,"path":1652,"stem":1653,"children":1654,"description":1656,"icon":14,"links":14},"Integrate Elasticsearch Indexing with Custom Hooks","/tutorials/extensions/integrate-elasticsearch-indexing-with-custom-hooks","tutorials/5.extensions/integrate-elasticsearch-indexing-with-custom-hooks",[1655],{"title":1651,"path":1652,"stem":1653,"description":1656,"icon":14,"links":14},"Learn how to maintain an Elasticsearch index when data is created, updated, and deleted.",{"title":1658,"path":1659,"stem":1660,"children":1661,"description":1663,"icon":14,"links":14},"Integrate Meilisearch Indexing with Custom Hooks","/tutorials/extensions/integrate-meilisearch-indexing-with-custom-hooks","tutorials/5.extensions/integrate-meilisearch-indexing-with-custom-hooks",[1662],{"title":1658,"path":1659,"stem":1660,"description":1663,"icon":14,"links":14},"Learn how to maintain an Meilisearch index when data is created, updated, and deleted.",{"title":1665,"path":1666,"stem":1667,"description":1668,"icon":14,"links":14},"Monitor and Error Track with Sentry in Custom Hooks","/tutorials/extensions/monitor-and-error-track-with-sentry-in-custom-hooks","tutorials/5.extensions/monitor-and-error-track-with-sentry-in-custom-hooks","Learn how to integrate Sentry error tracking in both your API and Data Studio.",{"title":1670,"path":1671,"stem":1672,"description":1673,"icon":14,"links":14},"Proxy an External API in a Custom Endpoint Extension","/tutorials/extensions/proxy-an-external-api-in-a-custom-endpoint-extension","tutorials/5.extensions/proxy-an-external-api-in-a-custom-endpoint-extension","Learn how to make external APIs available via Directus in a custom endpoint.",{"title":1675,"path":1676,"stem":1677,"description":1678,"icon":14,"links":14},"Read Collection Data in Custom Layouts","/tutorials/extensions/read-collection-data-in-custom-layouts","tutorials/5.extensions/read-collection-data-in-custom-layouts","Learn how to build your first layout with data from a collection.",{"title":1680,"path":1681,"stem":1682,"description":1683,"icon":14,"links":14},"Send SMS Messages with Twilio in Custom Operations","/tutorials/extensions/send-sms-messages-with-twilio-in-custom-operations","tutorials/5.extensions/send-sms-messages-with-twilio-in-custom-operations","Learn how to build a custom operation that uses the Twilio SDK.",{"title":1685,"path":1686,"stem":1687,"description":1688,"icon":14,"links":14},"Send SMS Messages with Twilio in Custom Panels","/tutorials/extensions/send-sms-messages-with-twilio-in-custom-panels","tutorials/5.extensions/send-sms-messages-with-twilio-in-custom-panels","Learn how to build a form inside a panel extension and use external APIs.",{"title":1690,"path":1691,"stem":1692,"description":1693,"icon":14,"links":14},"Summarize Relational Items in a Custom Display Extension","/tutorials/extensions/summarize-relational-items-in-a-custom-display-extension","tutorials/5.extensions/summarize-relational-items-in-a-custom-display-extension","Learn how to work with relational data in display extensions.",{"title":1695,"path":1696,"stem":1697,"description":1698,"icon":14,"links":14},"Understand Available Slots in Custom Modules","/tutorials/extensions/understand-available-slots-in-custom-modules","tutorials/5.extensions/understand-available-slots-in-custom-modules","Learn about all of the slots available in your custom modules.",{"title":1700,"path":1701,"stem":1702,"description":1703,"icon":14,"links":14},"Use Dynamic Values in Custom Email Templates","/tutorials/extensions/use-dynamic-values-in-custom-email-templates","tutorials/5.extensions/use-dynamic-values-in-custom-email-templates","Learn how to inject dynamic data into liquid templates.",{"title":1705,"path":1706,"stem":1707,"description":1708,"icon":14,"links":14},"Use npm Packages in Custom Operations","/tutorials/extensions/use-npm-packages-in-custom-operations","tutorials/5.extensions/use-npm-packages-in-custom-operations","Learn how to expose an npm package as an operation in Directus Automate.",{"title":1710,"path":1711,"stem":1712,"description":1713,"icon":14,"links":14},"Validate Phone Numbers with Twilio in a Custom Hook","/tutorials/extensions/validate-phone-numbers-with-twilio-in-a-custom-hook","tutorials/5.extensions/validate-phone-numbers-with-twilio-in-a-custom-hook","Learn how to prevent an item from saving if it has an invalid phone number.",{"title":1715,"path":1716,"stem":1717,"description":1718,"icon":14,"links":14},"Validating Third-Party JWTs in Directus (with Okta)","/tutorials/extensions/validating-third-party-jwts-in-directus","tutorials/5.extensions/validating-third-party-jwts-in-directus","Learn how to translate third part JWT's to Directus accountability",{"title":1114,"path":1720,"stem":1721,"children":1722,"description":24,"icon":14,"links":14},"/tutorials/self-hosting","tutorials/6.self-hosting/index",[1723,1724,1729,1734,1739,1744],{"title":1114,"path":1720,"stem":1721,"description":24,"icon":14,"links":14},{"title":1725,"path":1726,"stem":1727,"description":1728,"icon":14,"links":14},"Deploy Directus to an Ubuntu Server","/tutorials/self-hosting/deploy-directus-to-an-ubuntu-server","tutorials/6.self-hosting/deploy-directus-to-an-ubuntu-server","Learn how to deploy Directus on a Docker container on an Ubuntu server.",{"title":1730,"path":1731,"stem":1732,"description":1733,"icon":14,"links":14},"Deploy Directus to AWS EC2","/tutorials/self-hosting/deploy-directus-to-aws-ec2","tutorials/6.self-hosting/deploy-directus-to-aws-ec2","Learn how to deploy a Directus to AWS EC2, with a RDS database and a S3 storage bucket.",{"title":1735,"path":1736,"stem":1737,"description":1738,"icon":14,"links":14},"Deploy Directus to Azure Web Apps","/tutorials/self-hosting/deploy-directus-to-azure-web-apps","tutorials/6.self-hosting/deploy-directus-to-azure-web-apps","Learn how to deploy Directus on a Docker container on Azure.",{"title":1740,"path":1741,"stem":1742,"description":1743,"icon":14,"links":14},"Deploy Directus to Digital Ocean","/tutorials/self-hosting/deploy-directus-to-digital-ocean","tutorials/6.self-hosting/deploy-directus-to-digital-ocean","Learn how to deploy Directus on the Digital Ocean App Platform.",{"title":1745,"path":1746,"stem":1747,"description":1748,"icon":14,"links":14},"Deploy Directus to Google Cloud Platform","/tutorials/self-hosting/deploy-directus-to-google-cloud-platform","tutorials/6.self-hosting/deploy-directus-to-google-cloud-platform","Learn how to deploy Directus on GCP with a Cloud SQL database and Cloud Storage Bucket.",{"title":1750,"path":1751,"stem":1752,"children":1753,"description":24,"icon":14,"links":14},"Workflows","/tutorials/workflows","tutorials/7.workflows/index",[1754,1755,1760,1765,1770,1775,1780,1785,1790,1795,1800,1805,1810,1815,1820],{"title":1750,"path":1751,"stem":1752,"description":24,"icon":14,"links":14},{"title":1756,"path":1757,"stem":1758,"description":1759,"icon":14,"links":14},"Build Content Approval Workflows with Custom Permissions","/tutorials/workflows/build-content-approval-workflows-with-custom-permissions","tutorials/7.workflows/build-content-approval-workflows-with-custom-permissions","Learn how to configure roles and permissions for complex automations.",{"title":1761,"path":1762,"stem":1763,"description":1764,"icon":14,"links":14},"Combine Live Preview and Content Versioning with Next.js","/tutorials/workflows/combine-live-preview-and-content-versioning-with-next-js","tutorials/7.workflows/combine-live-preview-and-content-versioning-with-next-js","Learn how to set up Live Preview with different content versions in your Next.js application.",{"title":1766,"path":1767,"stem":1768,"description":1769,"icon":14,"links":14},"Create GitHub Issues with Directus Automate","/tutorials/workflows/create-github-issues-with-directus-automate","tutorials/7.workflows/create-github-issues-with-directus-automate","Learn how to integrate GitHub with Directus Automate to create new issues.",{"title":1771,"path":1772,"stem":1773,"description":1774,"icon":14,"links":14},"Detect High-Risk Phone Numbers with Vonage and Directus Automate","/tutorials/workflows/detect-high-risk-phone-numbers-with-vonage-and-directus-automate","tutorials/7.workflows/detect-high-risk-phone-numbers-with-vonage-and-directus-automate","Learn how to integrate Vonage's Number Insights API with Directus Automate to validate numbers.",{"title":1776,"path":1777,"stem":1778,"description":1779,"icon":14,"links":14},"Enrich User Data with Clearbit and Directus Automate","/tutorials/workflows/enrich-user-data-with-clearbit-and-directus-automate","tutorials/7.workflows/enrich-user-data-with-clearbit-and-directus-automate","Learn how to integrate Clearbit data enrichment with Directus Automate.",{"title":1781,"path":1782,"stem":1783,"description":1784,"icon":14,"links":14},"Generate Images with DALL•E and Directus Automate","/tutorials/workflows/generate-images-with-dall-e-and-directus-automate","tutorials/7.workflows/generate-images-with-dall-e-and-directus-automate","Learn how to integrate OpenAI's Dall•E models with Directus Automate.",{"title":1786,"path":1787,"stem":1788,"description":1789,"icon":14,"links":14},"Generate Social Posts with GPT-4 and Directus Automate","/tutorials/workflows/generate-social-posts-with-gpt-4-and-directus-automate","tutorials/7.workflows/generate-social-posts-with-gpt-4-and-directus-automate","Learn how to integrate OpenAI's GPT-4 model with Directus Automate.",{"title":1791,"path":1792,"stem":1793,"description":1794,"icon":14,"links":14},"Generate Transcripts with Deepgram and Directus Automate","/tutorials/workflows/generate-transcripts-with-deepgram-and-directus-automate","tutorials/7.workflows/generate-transcripts-with-deepgram-and-directus-automate","Learn how to integrate Deepgram's Speech-to-Text API with Directus Automate.",{"title":1796,"path":1797,"stem":1798,"description":1799,"icon":14,"links":14},"Integrating Multilingual Content with Directus and Crowdin","/tutorials/workflows/integrating-multilingual-content-with-directus-and-crowdin","tutorials/7.workflows/integrating-multilingual-content-with-directus-and-crowdin","Learn how to localize content in Directus using Crowdin's connector with Directus.",{"title":1801,"path":1802,"stem":1803,"description":1804,"icon":14,"links":14},"Invincible AI content workflows with Inngest and Directus","/tutorials/workflows/invincible-ai-content-workflows-with-inngest-and-directus","tutorials/7.workflows/invincible-ai-content-workflows-with-inngest-and-directus","Learn how to configure integration Directus and Inngest to build durable workflows for any scale.",{"title":1806,"path":1807,"stem":1808,"description":1809,"icon":14,"links":14},"Schedule Future Content with Directus Automate","/tutorials/workflows/schedule-future-content-with-directus-automate","tutorials/7.workflows/schedule-future-content-with-directus-automate","Learn how to set content to be scheduled on a future date with Directs Automate.",{"title":1811,"path":1812,"stem":1813,"description":1814,"icon":14,"links":14},"Tag Images with Clarifai and Directus Automate","/tutorials/workflows/tag-images-with-clarifai-and-directus-automate","tutorials/7.workflows/tag-images-with-clarifai-and-directus-automate","Learn how to integrate Clarifai's image recognition APIs with Directus Automate.",{"title":1816,"path":1817,"stem":1818,"description":1819,"icon":14,"links":14},"Trigger Netlify Site Builds with Directus Automate","/tutorials/workflows/trigger-netlify-site-builds-with-directus-automate","tutorials/7.workflows/trigger-netlify-site-builds-with-directus-automate","Learn how to trigger new Netlify website builds through Directus Automate.",{"title":1821,"path":1822,"stem":1823,"description":1824,"icon":14,"links":14},"Trigger Vercel Site Builds with Directus Automate","/tutorials/workflows/trigger-vercel-site-builds-with-directus-automate","tutorials/7.workflows/trigger-vercel-site-builds-with-directus-automate","Learn how to trigger new Vercel website builds through Directus Automate.",{"id":1826,"icon":1827,"content":1828,"link":1829},"812bf73d-ebfb-4246-9538-937a09a0c795","connected_tv","Learn more about our native MCP","https://directus.io/mcp",{"id":1831,"title":1567,"authors":1832,"body":1836,"description":1570,"extension":1920,"headline":14,"icon":14,"links":14,"meta":4640,"navigation":1937,"path":1568,"rawbody":4642,"seo":4643,"stem":1569,"technologies":14,"__hash__":4644},"content/tutorials/3.tips-and-tricks/search-engine-optimization-best-practices.md",[1833],{"name":1834,"title":1835},"Bryant Gillespie","Growth Engineer",{"type":1837,"value":1838,"toc":4630},"minimark",[1839,1843,1854,1857,1860,1863,1869,1879,1884,1887,1899,1902,1905,2317,2322,2366,2370,2373,2376,2390,2400,2407,2417,2423,2594,2598,2601,2604,2610,2621,2624,2631,2981,2988,3270,3278,3283,3327,3331,3334,3337,3352,3358,3373,3376,3379,3385,3391,3397,3403,3406,3409,3415,3418,3421,3426,3467,3471,3474,3481,3484,3487,3502,3505,3981,3986,4026,4030,4033,4326,4331,4375,4379,4382,4388,4391,4398,4404,4414,4417,4524,4530,4543,4551,4566,4571,4611,4615,4618,4626],[1840,1841,1842],"p",{},"Search engine optimization (SEO) is an ever-changing but super important part of getting your website in front of visitors.",[1840,1844,1845,1846,1853],{},"When using Directus as a",[1847,1848,1852],"a",{"href":1849,"rel":1850},"https://directus.io/solutions/headless-cms",[1851],"nofollow"," Headless CMS",", it is incredibly un-opinionated about what you do with your data and content on the frontend, leaving how you build your website up to you.",[1840,1855,1856],{},"But if you’re just starting out, being so open-ended can leave you wondering about the best way to handle things like SEO.",[1840,1858,1859],{},"In this post, I’ll share a few tips for managing SEO with Directus. I’ll also share some links and resources for some of the most popular frontend frameworks.",[1861,1862],"hr",{},[1840,1864,1865],{},[1866,1867,1868],"strong",{},"Important Assumptions",[1870,1871,1872,1876],"ul",{},[1873,1874,1875],"li",{},"You understand basic SEO strategy and terminology.",[1873,1877,1878],{},"You’re familiar with collections, fields, and fetching data from Directus.",[1880,1881,1883],"h2",{"id":1882},"create-a-separate-collection-for-seo-data","Create a Separate Collection for SEO Data",[1840,1885,1886],{},"At the end of the day, page titles and meta tags are just data. And you have to store that SEO data for your pages and blog posts somewhere.",[1840,1888,1889,1890,1894,1895,1898],{},"For simple sites, you could easily manage all your meta tag data by duplicating fields like ",[1891,1892,1893],"code",{},"title"," and ",[1891,1896,1897],{},"meta_description"," from one collection to another.",[1840,1900,1901],{},"But beyond a couple collections, this approach becomes cumbersome and potentially dangerous. What if you forget to copy one field? What if there’s a typo and the names become inconsistent? These oversights could break your SEO practices and ,at worst, your whole site.",[1840,1903,1904],{},"One better option would be creating a single collection to standardize all the SEO data for your content collections:",[1906,1907,1908,2036,2045,2311],"ol",{},[1873,1909,1910,1911,1914,1915,2013,2016,2021,2023,2024,1894,2026,2028,2029,2031,2032,2035],{},"Create an ",[1891,1912,1913],{},"seo"," collection",[1916,1917,1921],"pre",{"className":1918,"code":1919,"language":1920,"meta":24,"style":24},"language-md shiki shiki-themes github-light github-light github-dark","seo\n\n- id (Type: uuid)\n- title (Type: String, Interface: Input, Note: This item's title, defaults to item.title. Max 70 characters including the site name.)\n- meta_description (Type: Text, Interface: Textarea, Note: This item's meta description. Max 160 characters.)\n- canonical_url (Type: String, Interface: Input, Note: Where should the canonical URL for this entry point to.)\n- no_index (Type: Boolean, Interface: Toggle, Note: Instruct crawlers not to index this item.)\n- no_follow (Type: Boolean, Interface: Toggle, Note: Instruct crawlers not to follow links on this item.)\n- og_image (Type: Image, Note: This item's OG image. Defaults to global site OG image. The recommended size is 1200px x 630px. The image will be focal cropped to this dimension.)\n- sitemap_change_frequency (Type: String, Interface: Input, Note: How often to instruct search engines to crawl.)\n- sitemap_priority (Type: Decimal, Interface: Input, Note: Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites, it only lets the search engines know which pages you deem most important for the crawlers.)\n\n","md",[1891,1922,1923,1932,1939,1949,1957,1965,1973,1981,1989,1997,2005],{"__ignoreMap":24},[1924,1925,1928],"span",{"class":1926,"line":1927},"line",1,[1924,1929,1931],{"class":1930},"sxrX7","seo\n",[1924,1933,1935],{"class":1926,"line":1934},2,[1924,1936,1938],{"emptyLinePlaceholder":1937},true,"\n",[1924,1940,1942,1946],{"class":1926,"line":1941},3,[1924,1943,1945],{"class":1944},"sP4rz","-",[1924,1947,1948],{"class":1930}," id (Type: uuid)\n",[1924,1950,1952,1954],{"class":1926,"line":1951},4,[1924,1953,1945],{"class":1944},[1924,1955,1956],{"class":1930}," title (Type: String, Interface: Input, Note: This item's title, defaults to item.title. Max 70 characters including the site name.)\n",[1924,1958,1960,1962],{"class":1926,"line":1959},5,[1924,1961,1945],{"class":1944},[1924,1963,1964],{"class":1930}," meta_description (Type: Text, Interface: Textarea, Note: This item's meta description. Max 160 characters.)\n",[1924,1966,1968,1970],{"class":1926,"line":1967},6,[1924,1969,1945],{"class":1944},[1924,1971,1972],{"class":1930}," canonical_url (Type: String, Interface: Input, Note: Where should the canonical URL for this entry point to.)\n",[1924,1974,1976,1978],{"class":1926,"line":1975},7,[1924,1977,1945],{"class":1944},[1924,1979,1980],{"class":1930}," no_index (Type: Boolean, Interface: Toggle, Note: Instruct crawlers not to index this item.)\n",[1924,1982,1984,1986],{"class":1926,"line":1983},8,[1924,1985,1945],{"class":1944},[1924,1987,1988],{"class":1930}," no_follow (Type: Boolean, Interface: Toggle, Note: Instruct crawlers not to follow links on this item.)\n",[1924,1990,1992,1994],{"class":1926,"line":1991},9,[1924,1993,1945],{"class":1944},[1924,1995,1996],{"class":1930}," og_image (Type: Image, Note: This item's OG image. Defaults to global site OG image. The recommended size is 1200px x 630px. The image will be focal cropped to this dimension.)\n",[1924,1998,2000,2002],{"class":1926,"line":1999},10,[1924,2001,1945],{"class":1944},[1924,2003,2004],{"class":1930}," sitemap_change_frequency (Type: String, Interface: Input, Note: How often to instruct search engines to crawl.)\n",[1924,2006,2008,2010],{"class":1926,"line":2007},11,[1924,2009,1945],{"class":1944},[1924,2011,2012],{"class":1930}," sitemap_priority (Type: Decimal, Interface: Input, Note: Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites, it only lets the search engines know which pages you deem most important for the crawlers.)\n",[2014,2015],"br",{},[2017,2018],"img",{"alt":2019,"src":2020},"Screenshot of the SEO collection data model inside settings. Several fields are displayed like title, meta_description, canonical_url, and others related to the sitemap.","/img/fa4c5682-1773-4078-9b17-00f6345e6733.webp",[2014,2022],{},"Beyond the basic ",[1891,2025,1893],{},[1891,2027,1897],{}," , the other fields you add to your SEO collection are totally up to you.",[2014,2030],{},"Adding the fields within Directus is only one half of the work - you need to use these fields in your frontend within your ",[1891,2033,2034],{},"\u003Chead>"," tags and sitemap.",[1873,2037,2038,2039,2041],{},"For each of your content collections that have a route on your frontend, inside Directus –  create a many-to-one (M2O) relationship with the SEO collection.",[2014,2040],{},[2017,2042],{"alt":2043,"src":2044},"Screenshot of adding a new many-to-one relationship within the Directus pages collection.","https://marketing.directus.app/assets/8ed6695f-0090-4531-a7c9-4ab4c5cf59cd",[1873,2046,2047,2048,2051,2052],{},"When fetching your content on the frontend, use the ",[1891,2049,2050],{},"fields"," parameter to expand the SEO data within a single API call.",[1916,2053,2057],{"className":2054,"code":2055,"language":2056,"meta":24,"style":24},"language-js shiki shiki-themes github-light github-light github-dark","import { createDirectus, rest, readItem } from '@directus/sdk';\nconst client = createDirectus('directus_project_url').with(rest());\n\nconst postId = '234ee-3fdsafa-dfadfa-dfada';\n\nconst post = await client.request(\n    readItem('posts', postId, {\n        fields: [\n            'title',\n            'summary',\n            'content',\n            'image',\n            {\n                seo: [\n                    'title',\n                    'meta_description',\n                    'canonical_url',\n                    'no_index',\n                    'no_follow',\n                    'og_image',\n                    'sitemap_change_frequency',\n                    'sitemap_priority',\n                ],\n            },\n        ],\n    }),\n);\n\n","js",[1891,2058,2059,2078,2114,2118,2132,2136,2157,2170,2175,2183,2190,2197,2205,2211,2217,2225,2233,2241,2249,2257,2265,2273,2281,2287,2293,2299,2305],{"__ignoreMap":24},[1924,2060,2061,2065,2068,2071,2075],{"class":1926,"line":1927},[1924,2062,2064],{"class":2063},"s8jYJ","import",[1924,2066,2067],{"class":1930}," { createDirectus, rest, readItem } ",[1924,2069,2070],{"class":2063},"from",[1924,2072,2074],{"class":2073},"sIIMD"," '@directus/sdk'",[1924,2076,2077],{"class":1930},";\n",[1924,2079,2080,2083,2087,2090,2094,2097,2100,2103,2106,2108,2111],{"class":1926,"line":1934},[1924,2081,2082],{"class":2063},"const",[1924,2084,2086],{"class":2085},"sBjJW"," client",[1924,2088,2089],{"class":2063}," =",[1924,2091,2093],{"class":2092},"snPdu"," createDirectus",[1924,2095,2096],{"class":1930},"(",[1924,2098,2099],{"class":2073},"'directus_project_url'",[1924,2101,2102],{"class":1930},").",[1924,2104,2105],{"class":2092},"with",[1924,2107,2096],{"class":1930},[1924,2109,2110],{"class":2092},"rest",[1924,2112,2113],{"class":1930},"());\n",[1924,2115,2116],{"class":1926,"line":1941},[1924,2117,1938],{"emptyLinePlaceholder":1937},[1924,2119,2120,2122,2125,2127,2130],{"class":1926,"line":1951},[1924,2121,2082],{"class":2063},[1924,2123,2124],{"class":2085}," postId",[1924,2126,2089],{"class":2063},[1924,2128,2129],{"class":2073}," '234ee-3fdsafa-dfadfa-dfada'",[1924,2131,2077],{"class":1930},[1924,2133,2134],{"class":1926,"line":1959},[1924,2135,1938],{"emptyLinePlaceholder":1937},[1924,2137,2138,2140,2143,2145,2148,2151,2154],{"class":1926,"line":1967},[1924,2139,2082],{"class":2063},[1924,2141,2142],{"class":2085}," post",[1924,2144,2089],{"class":2063},[1924,2146,2147],{"class":2063}," await",[1924,2149,2150],{"class":1930}," client.",[1924,2152,2153],{"class":2092},"request",[1924,2155,2156],{"class":1930},"(\n",[1924,2158,2159,2162,2164,2167],{"class":1926,"line":1975},[1924,2160,2161],{"class":2092},"    readItem",[1924,2163,2096],{"class":1930},[1924,2165,2166],{"class":2073},"'posts'",[1924,2168,2169],{"class":1930},", postId, {\n",[1924,2171,2172],{"class":1926,"line":1983},[1924,2173,2174],{"class":1930},"        fields: [\n",[1924,2176,2177,2180],{"class":1926,"line":1991},[1924,2178,2179],{"class":2073},"            'title'",[1924,2181,2182],{"class":1930},",\n",[1924,2184,2185,2188],{"class":1926,"line":1999},[1924,2186,2187],{"class":2073},"            'summary'",[1924,2189,2182],{"class":1930},[1924,2191,2192,2195],{"class":1926,"line":2007},[1924,2193,2194],{"class":2073},"            'content'",[1924,2196,2182],{"class":1930},[1924,2198,2200,2203],{"class":1926,"line":2199},12,[1924,2201,2202],{"class":2073},"            'image'",[1924,2204,2182],{"class":1930},[1924,2206,2208],{"class":1926,"line":2207},13,[1924,2209,2210],{"class":1930},"            {\n",[1924,2212,2214],{"class":1926,"line":2213},14,[1924,2215,2216],{"class":1930},"                seo: [\n",[1924,2218,2220,2223],{"class":1926,"line":2219},15,[1924,2221,2222],{"class":2073},"                    'title'",[1924,2224,2182],{"class":1930},[1924,2226,2228,2231],{"class":1926,"line":2227},16,[1924,2229,2230],{"class":2073},"                    'meta_description'",[1924,2232,2182],{"class":1930},[1924,2234,2236,2239],{"class":1926,"line":2235},17,[1924,2237,2238],{"class":2073},"                    'canonical_url'",[1924,2240,2182],{"class":1930},[1924,2242,2244,2247],{"class":1926,"line":2243},18,[1924,2245,2246],{"class":2073},"                    'no_index'",[1924,2248,2182],{"class":1930},[1924,2250,2252,2255],{"class":1926,"line":2251},19,[1924,2253,2254],{"class":2073},"                    'no_follow'",[1924,2256,2182],{"class":1930},[1924,2258,2260,2263],{"class":1926,"line":2259},20,[1924,2261,2262],{"class":2073},"                    'og_image'",[1924,2264,2182],{"class":1930},[1924,2266,2268,2271],{"class":1926,"line":2267},21,[1924,2269,2270],{"class":2073},"                    'sitemap_change_frequency'",[1924,2272,2182],{"class":1930},[1924,2274,2276,2279],{"class":1926,"line":2275},22,[1924,2277,2278],{"class":2073},"                    'sitemap_priority'",[1924,2280,2182],{"class":1930},[1924,2282,2284],{"class":1926,"line":2283},23,[1924,2285,2286],{"class":1930},"                ],\n",[1924,2288,2290],{"class":1926,"line":2289},24,[1924,2291,2292],{"class":1930},"            },\n",[1924,2294,2296],{"class":1926,"line":2295},25,[1924,2297,2298],{"class":1930},"        ],\n",[1924,2300,2302],{"class":1926,"line":2301},26,[1924,2303,2304],{"class":1930},"    }),\n",[1924,2306,2308],{"class":1926,"line":2307},27,[1924,2309,2310],{"class":1930},");\n",[1873,2312,2313,2314,2316],{},"Then pass that to your frameworks specific method of add SEO metadata within your ",[1891,2315,2034],{}," tags.",[1840,2318,2319],{},[1866,2320,2321],{},"Frontend Framework Metadata Documentation",[1870,2323,2324,2331,2338,2345,2352,2359],{},[1873,2325,2326],{},[1847,2327,2330],{"href":2328,"rel":2329},"https://nextjs.org/docs/app/building-your-application/optimizing/metadata#dynamic-metadata",[1851],"Next.js - Dynamic Metadata",[1873,2332,2333],{},[1847,2334,2337],{"href":2335,"rel":2336},"https://nuxt.com/docs/getting-started/seo-meta#seo-and-meta",[1851],"Nuxt - SEO and Meta",[1873,2339,2340],{},[1847,2341,2344],{"href":2342,"rel":2343},"https://docs.astro.build/en/core-concepts/layouts/",[1851],"Astro - Layouts",[1873,2346,2347],{},[1847,2348,2351],{"href":2349,"rel":2350},"https://kit.svelte.dev/docs/seo",[1851],"SvelteKit - SEO",[1873,2353,2354],{},[1847,2355,2358],{"href":2356,"rel":2357},"https://remix.run/docs/en/main/route/meta",[1851],"Remix - meta",[1873,2360,2361],{},[1847,2362,2365],{"href":2363,"rel":2364},"https://angular.io/api/platform-browser/Meta",[1851],"Angular - Meta",[1880,2367,2369],{"id":2368},"dont-use-slugs-as-a-primary-key","Don’t Use Slugs as a Primary Key",[1840,2371,2372],{},"The actual url for a page on your website is a key factor for search engine rankings. Because of that, your content editors will want to experiment and adjust urls and slugs for items as needed.",[1840,2374,2375],{},"When adding a new collection Directus lets you choose from several types of primary keys for your collection.",[1870,2377,2378,2381,2384,2387],{},[1873,2379,2380],{},"Auto-incremented integer",[1873,2382,2383],{},"Auto-incremented big integer",[1873,2385,2386],{},"Generated UUID",[1873,2388,2389],{},"Manually entered string",[1840,2391,2392,2393,2396,2397,2399],{},"I’ve seen lots of folks name the primary key field ",[1891,2394,2395],{},"slug"," and use the ",[1891,2398,2389],{}," . It’s easy to understand. It makes fetching that item easier because you can get the item by its id (the slug) directly instead of constructing a query to match the slug.",[1840,2401,2402,2403,2406],{},"But an item’s ",[1866,2404,2405],{},"primary key value can not be changed after they are created",", while this protects your database and all of your relationships, it makes it hard to experiment or change URLs if, for example, a product name changes.",[1840,2408,2409,2410,2413,2414,2416],{},"To avoid this, use the auto-incremented ids or UUIDs for the primary key ",[1891,2411,2412],{},"id"," and create a separate field input for the ",[1891,2415,2395],{}," . You can require uniqueness which means only one item in a collection can have a given slug.",[1840,2418,2419,2420,2422],{},"You can no longer use API endpoints or SDK functions for reading a single item, as this relies on using the primary key. Instead, query the whole collection and use ",[1847,2421,653],{"href":654}," to get the single item that has the slug:",[1916,2424,2426],{"className":2054,"code":2425,"language":2056,"meta":24,"style":24},"import { createDirectus, rest, readItems } from '@directus/sdk';\nconst client = createDirectus('directus_project_url').with(rest());\n\nconst slugFromYourFrontEndFramework = params.slug || router.query.slug // whatever your convention your framework follows;\n\nconst posts = await client.request(\n  readItems('posts', {\n    filter: {\n      slug: {\n        _eq: 'slugFromYourFrontEndFramework',\n      },\n    },\n    limit: 1,\n  })\n);\n\nconst post = posts.data[0];\n",[1891,2427,2428,2441,2465,2469,2491,2495,2512,2524,2529,2534,2544,2549,2554,2564,2569,2573,2577],{"__ignoreMap":24},[1924,2429,2430,2432,2435,2437,2439],{"class":1926,"line":1927},[1924,2431,2064],{"class":2063},[1924,2433,2434],{"class":1930}," { createDirectus, rest, readItems } ",[1924,2436,2070],{"class":2063},[1924,2438,2074],{"class":2073},[1924,2440,2077],{"class":1930},[1924,2442,2443,2445,2447,2449,2451,2453,2455,2457,2459,2461,2463],{"class":1926,"line":1934},[1924,2444,2082],{"class":2063},[1924,2446,2086],{"class":2085},[1924,2448,2089],{"class":2063},[1924,2450,2093],{"class":2092},[1924,2452,2096],{"class":1930},[1924,2454,2099],{"class":2073},[1924,2456,2102],{"class":1930},[1924,2458,2105],{"class":2092},[1924,2460,2096],{"class":1930},[1924,2462,2110],{"class":2092},[1924,2464,2113],{"class":1930},[1924,2466,2467],{"class":1926,"line":1941},[1924,2468,1938],{"emptyLinePlaceholder":1937},[1924,2470,2471,2473,2476,2478,2481,2484,2487],{"class":1926,"line":1951},[1924,2472,2082],{"class":2063},[1924,2474,2475],{"class":2085}," slugFromYourFrontEndFramework",[1924,2477,2089],{"class":2063},[1924,2479,2480],{"class":1930}," params.slug ",[1924,2482,2483],{"class":2063},"||",[1924,2485,2486],{"class":1930}," router.query.slug ",[1924,2488,2490],{"class":2489},"sCsY4","// whatever your convention your framework follows;\n",[1924,2492,2493],{"class":1926,"line":1959},[1924,2494,1938],{"emptyLinePlaceholder":1937},[1924,2496,2497,2499,2502,2504,2506,2508,2510],{"class":1926,"line":1967},[1924,2498,2082],{"class":2063},[1924,2500,2501],{"class":2085}," posts",[1924,2503,2089],{"class":2063},[1924,2505,2147],{"class":2063},[1924,2507,2150],{"class":1930},[1924,2509,2153],{"class":2092},[1924,2511,2156],{"class":1930},[1924,2513,2514,2517,2519,2521],{"class":1926,"line":1975},[1924,2515,2516],{"class":2092},"  readItems",[1924,2518,2096],{"class":1930},[1924,2520,2166],{"class":2073},[1924,2522,2523],{"class":1930},", {\n",[1924,2525,2526],{"class":1926,"line":1983},[1924,2527,2528],{"class":1930},"    filter: {\n",[1924,2530,2531],{"class":1926,"line":1991},[1924,2532,2533],{"class":1930},"      slug: {\n",[1924,2535,2536,2539,2542],{"class":1926,"line":1999},[1924,2537,2538],{"class":1930},"        _eq: ",[1924,2540,2541],{"class":2073},"'slugFromYourFrontEndFramework'",[1924,2543,2182],{"class":1930},[1924,2545,2546],{"class":1926,"line":2007},[1924,2547,2548],{"class":1930},"      },\n",[1924,2550,2551],{"class":1926,"line":2199},[1924,2552,2553],{"class":1930},"    },\n",[1924,2555,2556,2559,2562],{"class":1926,"line":2207},[1924,2557,2558],{"class":1930},"    limit: ",[1924,2560,2561],{"class":2085},"1",[1924,2563,2182],{"class":1930},[1924,2565,2566],{"class":1926,"line":2213},[1924,2567,2568],{"class":1930},"  })\n",[1924,2570,2571],{"class":1926,"line":2219},[1924,2572,2310],{"class":1930},[1924,2574,2575],{"class":1926,"line":2227},[1924,2576,1938],{"emptyLinePlaceholder":1937},[1924,2578,2579,2581,2583,2585,2588,2591],{"class":1926,"line":2235},[1924,2580,2082],{"class":2063},[1924,2582,2142],{"class":2085},[1924,2584,2089],{"class":2063},[1924,2586,2587],{"class":1930}," posts.data[",[1924,2589,2590],{"class":2085},"0",[1924,2592,2593],{"class":1930},"];\n",[1880,2595,2597],{"id":2596},"use-relationships-for-internal-linking","Use Relationships for Internal Linking",[1840,2599,2600],{},"When building a website, you’ll need both links for internal content and links for external content.",[1840,2602,2603],{},"One common pattern I’ve noticed is creating string inputs for internal links to other content.",[1840,2605,2606],{},[2017,2607],{"alt":2608,"src":2609},"Screenshot of a form within Directus. Two fields are shown. Label and Href. The Href field value is a string /contact-us","/img/2f8a38d2-a6dd-4810-b097-a158e9677d7b.webp",[1840,2611,2612,2613,2616,2617,2620],{},"But this can be surprisingly brittle. As soon as the slug for the Contact page changes from ",[1891,2614,2615],{},"/contact-us"," to ",[1891,2618,2619],{},"/contact-directus-team"," , the link will break and this can really crash your search engine rankings.",[1840,2622,2623],{},"Luckily Directus makes a more dynamic approach possible with relationships.",[1840,2625,2626,2627,2630],{},"When creating your data model for links to other items from the same or different collections, try using the conditional fields and ",[1847,2628,2629],{"href":509},"many to one relationships"," to build a powerful, resilient way to link items.",[1906,2632,2633,2978],{},[1873,2634,2635,2636,2964,2965,2975,2977],{},"Within your content collection, add the following fields for linking. (Note: This example is extremely simplified so you can learn the logic involved. - name these depending on what makes the most sense to you and your use case.)",[1916,2637,2639],{"className":1918,"code":2638,"language":1920,"meta":24,"style":24},"your_content_collection\n\n- link_type (Type: String, Interface: Dropdown, Note: Choices: [\n    {\n        \"text\": \"Internal - Page\",\n        \"value\": \"pages\"\n    },\n    {\n        \"text\": \"Internal - Post\",\n        \"value\": \"posts\"\n    },\n    {\n        \"text\": \"External - URL\",\n        \"value\": \"external\"\n    }\n])\n- link_label (Type: String, Interface: Input, Note: What label or title is displayed for this link?)\n- link_page (Type: M20 Relationship, Related Collection: pages, Hidden On Detail, Conditions: [\n    {\n        \"name\": \"IF link_type === page\",\n        \"rule\": {\n            \"_and\": [\n                {\n                    \"link_type\": {\n                        \"_eq\": \"pages\"\n                    }\n                }\n            ]\n        },\n        \"hidden\": false,\n    }\n])\n- link_post (Type: M20 Relationship, Related Collection: post, Hidden On Detail, Conditions: [\n    {\n        \"name\": \"IF link_type === post\",\n        \"rule\": {\n            \"_and\": [\n                {\n                    \"link_type\": {\n                        \"_eq\": \"post\"\n                    }\n                }\n            ]\n        },\n        \"hidden\": false,\n    }\n])\n- link_external_url (Type: String, Interface: Input, Conditions: [\n    {\n        \"name\": \"IF link_type === external\",\n        \"rule\": {\n            \"_and\": [\n                {\n                    \"link_type\": {\n                        \"_eq\": \"external\"\n                    }\n                }\n            ]\n        },\n        \"hidden\": false,\n    }\n])\n\n",[1891,2640,2641,2646,2650,2657,2662,2667,2672,2676,2680,2685,2690,2694,2698,2703,2708,2713,2718,2725,2732,2736,2741,2746,2751,2756,2761,2766,2771,2776,2782,2788,2794,2799,2804,2812,2817,2823,2828,2833,2838,2843,2849,2854,2859,2864,2869,2874,2879,2884,2892,2897,2903,2908,2913,2918,2923,2929,2934,2939,2944,2949,2954,2959],{"__ignoreMap":24},[1924,2642,2643],{"class":1926,"line":1927},[1924,2644,2645],{"class":1930},"your_content_collection\n",[1924,2647,2648],{"class":1926,"line":1934},[1924,2649,1938],{"emptyLinePlaceholder":1937},[1924,2651,2652,2654],{"class":1926,"line":1941},[1924,2653,1945],{"class":1944},[1924,2655,2656],{"class":1930}," link_type (Type: String, Interface: Dropdown, Note: Choices: [\n",[1924,2658,2659],{"class":1926,"line":1951},[1924,2660,2661],{"class":1930},"    {\n",[1924,2663,2664],{"class":1926,"line":1959},[1924,2665,2666],{"class":1930},"        \"text\": \"Internal - Page\",\n",[1924,2668,2669],{"class":1926,"line":1967},[1924,2670,2671],{"class":1930},"        \"value\": \"pages\"\n",[1924,2673,2674],{"class":1926,"line":1975},[1924,2675,2553],{"class":1930},[1924,2677,2678],{"class":1926,"line":1983},[1924,2679,2661],{"class":1930},[1924,2681,2682],{"class":1926,"line":1991},[1924,2683,2684],{"class":1930},"        \"text\": \"Internal - Post\",\n",[1924,2686,2687],{"class":1926,"line":1999},[1924,2688,2689],{"class":1930},"        \"value\": \"posts\"\n",[1924,2691,2692],{"class":1926,"line":2007},[1924,2693,2553],{"class":1930},[1924,2695,2696],{"class":1926,"line":2199},[1924,2697,2661],{"class":1930},[1924,2699,2700],{"class":1926,"line":2207},[1924,2701,2702],{"class":1930},"        \"text\": \"External - URL\",\n",[1924,2704,2705],{"class":1926,"line":2213},[1924,2706,2707],{"class":1930},"        \"value\": \"external\"\n",[1924,2709,2710],{"class":1926,"line":2219},[1924,2711,2712],{"class":1930},"    }\n",[1924,2714,2715],{"class":1926,"line":2227},[1924,2716,2717],{"class":1930},"])\n",[1924,2719,2720,2722],{"class":1926,"line":2235},[1924,2721,1945],{"class":1944},[1924,2723,2724],{"class":1930}," link_label (Type: String, Interface: Input, Note: What label or title is displayed for this link?)\n",[1924,2726,2727,2729],{"class":1926,"line":2243},[1924,2728,1945],{"class":1944},[1924,2730,2731],{"class":1930}," link_page (Type: M20 Relationship, Related Collection: pages, Hidden On Detail, Conditions: [\n",[1924,2733,2734],{"class":1926,"line":2251},[1924,2735,2661],{"class":1930},[1924,2737,2738],{"class":1926,"line":2259},[1924,2739,2740],{"class":1930},"        \"name\": \"IF link_type === page\",\n",[1924,2742,2743],{"class":1926,"line":2267},[1924,2744,2745],{"class":1930},"        \"rule\": {\n",[1924,2747,2748],{"class":1926,"line":2275},[1924,2749,2750],{"class":1930},"            \"_and\": [\n",[1924,2752,2753],{"class":1926,"line":2283},[1924,2754,2755],{"class":1930},"                {\n",[1924,2757,2758],{"class":1926,"line":2289},[1924,2759,2760],{"class":1930},"                    \"link_type\": {\n",[1924,2762,2763],{"class":1926,"line":2295},[1924,2764,2765],{"class":1930},"                        \"_eq\": \"pages\"\n",[1924,2767,2768],{"class":1926,"line":2301},[1924,2769,2770],{"class":1930},"                    }\n",[1924,2772,2773],{"class":1926,"line":2307},[1924,2774,2775],{"class":1930},"                }\n",[1924,2777,2779],{"class":1926,"line":2778},28,[1924,2780,2781],{"class":1930},"            ]\n",[1924,2783,2785],{"class":1926,"line":2784},29,[1924,2786,2787],{"class":1930},"        },\n",[1924,2789,2791],{"class":1926,"line":2790},30,[1924,2792,2793],{"class":1930},"        \"hidden\": false,\n",[1924,2795,2797],{"class":1926,"line":2796},31,[1924,2798,2712],{"class":1930},[1924,2800,2802],{"class":1926,"line":2801},32,[1924,2803,2717],{"class":1930},[1924,2805,2807,2809],{"class":1926,"line":2806},33,[1924,2808,1945],{"class":1944},[1924,2810,2811],{"class":1930}," link_post (Type: M20 Relationship, Related Collection: post, Hidden On Detail, Conditions: [\n",[1924,2813,2815],{"class":1926,"line":2814},34,[1924,2816,2661],{"class":1930},[1924,2818,2820],{"class":1926,"line":2819},35,[1924,2821,2822],{"class":1930},"        \"name\": \"IF link_type === post\",\n",[1924,2824,2826],{"class":1926,"line":2825},36,[1924,2827,2745],{"class":1930},[1924,2829,2831],{"class":1926,"line":2830},37,[1924,2832,2750],{"class":1930},[1924,2834,2836],{"class":1926,"line":2835},38,[1924,2837,2755],{"class":1930},[1924,2839,2841],{"class":1926,"line":2840},39,[1924,2842,2760],{"class":1930},[1924,2844,2846],{"class":1926,"line":2845},40,[1924,2847,2848],{"class":1930},"                        \"_eq\": \"post\"\n",[1924,2850,2852],{"class":1926,"line":2851},41,[1924,2853,2770],{"class":1930},[1924,2855,2857],{"class":1926,"line":2856},42,[1924,2858,2775],{"class":1930},[1924,2860,2862],{"class":1926,"line":2861},43,[1924,2863,2781],{"class":1930},[1924,2865,2867],{"class":1926,"line":2866},44,[1924,2868,2787],{"class":1930},[1924,2870,2872],{"class":1926,"line":2871},45,[1924,2873,2793],{"class":1930},[1924,2875,2877],{"class":1926,"line":2876},46,[1924,2878,2712],{"class":1930},[1924,2880,2882],{"class":1926,"line":2881},47,[1924,2883,2717],{"class":1930},[1924,2885,2887,2889],{"class":1926,"line":2886},48,[1924,2888,1945],{"class":1944},[1924,2890,2891],{"class":1930}," link_external_url (Type: String, Interface: Input, Conditions: [\n",[1924,2893,2895],{"class":1926,"line":2894},49,[1924,2896,2661],{"class":1930},[1924,2898,2900],{"class":1926,"line":2899},50,[1924,2901,2902],{"class":1930},"        \"name\": \"IF link_type === external\",\n",[1924,2904,2906],{"class":1926,"line":2905},51,[1924,2907,2745],{"class":1930},[1924,2909,2911],{"class":1926,"line":2910},52,[1924,2912,2750],{"class":1930},[1924,2914,2916],{"class":1926,"line":2915},53,[1924,2917,2755],{"class":1930},[1924,2919,2921],{"class":1926,"line":2920},54,[1924,2922,2760],{"class":1930},[1924,2924,2926],{"class":1926,"line":2925},55,[1924,2927,2928],{"class":1930},"                        \"_eq\": \"external\"\n",[1924,2930,2932],{"class":1926,"line":2931},56,[1924,2933,2770],{"class":1930},[1924,2935,2937],{"class":1926,"line":2936},57,[1924,2938,2775],{"class":1930},[1924,2940,2942],{"class":1926,"line":2941},58,[1924,2943,2781],{"class":1930},[1924,2945,2947],{"class":1926,"line":2946},59,[1924,2948,2787],{"class":1930},[1924,2950,2952],{"class":1926,"line":2951},60,[1924,2953,2793],{"class":1930},[1924,2955,2957],{"class":1926,"line":2956},61,[1924,2958,2712],{"class":1930},[1924,2960,2962],{"class":1926,"line":2961},62,[1924,2963,2717],{"class":1930},"\n ",[2966,2967,2969,2970,2964],"video",{"controls":2968},"true","\n   ",[2971,2972],"source",{"src":2973,"type":2974},"/docs/img/cd5bd4f3-02f1-46be-b82e-570052483379.mp4","video/mp4",[2014,2976],{},"Fields for page, post, and external url are only visible when the related type is selected so there is no confusion about which fields to enter data for. And it also allows you to use that relationship to fetch the proper slug or permalink for posts and pages.",[1873,2979,2980],{},"On the frontend, when you are fetching data via the API, use the fields parameter to get the related posts and pages in a single API call.",[1840,2982,2983,2984,2987],{},"Then make sure you’re getting the proper url based on the ",[1891,2985,2986],{},"link_type",":",[1916,2989,2991],{"className":2054,"code":2990,"language":2056,"meta":24,"style":24},"const post = await client.request(\n    readItem('your_content_collection', 'your_content_item_id', {\n        fields: [\n            // Fetch all the other root level fields for your collection **In production, you should only fetch the fields you need**\n            '*',\n            'link_type',\n            'link_label',\n            'external_url',\n            // Use object syntax to fetch fields from a relation\n            {\n                page: ['id', 'title', 'permalink'],\n                post: ['id', 'title', 'slug'],\n            },\n        ],\n    }),\n)\n\nfunction getUrl(item) {\n    if (item.link_type === 'pages') {\n        return item.page.permalink ?? ''\n    } else if (item.link_type === 'posts') {\n        return `/blog/${item.post.slug}` ?? ''\n    } else if (item.link_type === 'external') {\n        return item.external_url ?? ''\n    }\n    return undefined\n}\n",[1891,2992,2993,3009,3026,3030,3035,3042,3049,3056,3063,3068,3072,3093,3111,3115,3119,3123,3128,3132,3148,3164,3178,3198,3225,3242,3253,3257,3265],{"__ignoreMap":24},[1924,2994,2995,2997,2999,3001,3003,3005,3007],{"class":1926,"line":1927},[1924,2996,2082],{"class":2063},[1924,2998,2142],{"class":2085},[1924,3000,2089],{"class":2063},[1924,3002,2147],{"class":2063},[1924,3004,2150],{"class":1930},[1924,3006,2153],{"class":2092},[1924,3008,2156],{"class":1930},[1924,3010,3011,3013,3015,3018,3021,3024],{"class":1926,"line":1934},[1924,3012,2161],{"class":2092},[1924,3014,2096],{"class":1930},[1924,3016,3017],{"class":2073},"'your_content_collection'",[1924,3019,3020],{"class":1930},", ",[1924,3022,3023],{"class":2073},"'your_content_item_id'",[1924,3025,2523],{"class":1930},[1924,3027,3028],{"class":1926,"line":1941},[1924,3029,2174],{"class":1930},[1924,3031,3032],{"class":1926,"line":1951},[1924,3033,3034],{"class":2489},"            // Fetch all the other root level fields for your collection **In production, you should only fetch the fields you need**\n",[1924,3036,3037,3040],{"class":1926,"line":1959},[1924,3038,3039],{"class":2073},"            '*'",[1924,3041,2182],{"class":1930},[1924,3043,3044,3047],{"class":1926,"line":1967},[1924,3045,3046],{"class":2073},"            'link_type'",[1924,3048,2182],{"class":1930},[1924,3050,3051,3054],{"class":1926,"line":1975},[1924,3052,3053],{"class":2073},"            'link_label'",[1924,3055,2182],{"class":1930},[1924,3057,3058,3061],{"class":1926,"line":1983},[1924,3059,3060],{"class":2073},"            'external_url'",[1924,3062,2182],{"class":1930},[1924,3064,3065],{"class":1926,"line":1991},[1924,3066,3067],{"class":2489},"            // Use object syntax to fetch fields from a relation\n",[1924,3069,3070],{"class":1926,"line":1999},[1924,3071,2210],{"class":1930},[1924,3073,3074,3077,3080,3082,3085,3087,3090],{"class":1926,"line":2007},[1924,3075,3076],{"class":1930},"                page: [",[1924,3078,3079],{"class":2073},"'id'",[1924,3081,3020],{"class":1930},[1924,3083,3084],{"class":2073},"'title'",[1924,3086,3020],{"class":1930},[1924,3088,3089],{"class":2073},"'permalink'",[1924,3091,3092],{"class":1930},"],\n",[1924,3094,3095,3098,3100,3102,3104,3106,3109],{"class":1926,"line":2199},[1924,3096,3097],{"class":1930},"                post: [",[1924,3099,3079],{"class":2073},[1924,3101,3020],{"class":1930},[1924,3103,3084],{"class":2073},[1924,3105,3020],{"class":1930},[1924,3107,3108],{"class":2073},"'slug'",[1924,3110,3092],{"class":1930},[1924,3112,3113],{"class":1926,"line":2207},[1924,3114,2292],{"class":1930},[1924,3116,3117],{"class":1926,"line":2213},[1924,3118,2298],{"class":1930},[1924,3120,3121],{"class":1926,"line":2219},[1924,3122,2304],{"class":1930},[1924,3124,3125],{"class":1926,"line":2227},[1924,3126,3127],{"class":1930},")\n",[1924,3129,3130],{"class":1926,"line":2235},[1924,3131,1938],{"emptyLinePlaceholder":1937},[1924,3133,3134,3137,3140,3142,3145],{"class":1926,"line":2243},[1924,3135,3136],{"class":2063},"function",[1924,3138,3139],{"class":2092}," getUrl",[1924,3141,2096],{"class":1930},[1924,3143,3144],{"class":1944},"item",[1924,3146,3147],{"class":1930},") {\n",[1924,3149,3150,3153,3156,3159,3162],{"class":1926,"line":2251},[1924,3151,3152],{"class":2063},"    if",[1924,3154,3155],{"class":1930}," (item.link_type ",[1924,3157,3158],{"class":2063},"===",[1924,3160,3161],{"class":2073}," 'pages'",[1924,3163,3147],{"class":1930},[1924,3165,3166,3169,3172,3175],{"class":1926,"line":2259},[1924,3167,3168],{"class":2063},"        return",[1924,3170,3171],{"class":1930}," item.page.permalink ",[1924,3173,3174],{"class":2063},"??",[1924,3176,3177],{"class":2073}," ''\n",[1924,3179,3180,3183,3186,3189,3191,3193,3196],{"class":1926,"line":2267},[1924,3181,3182],{"class":1930},"    } ",[1924,3184,3185],{"class":2063},"else",[1924,3187,3188],{"class":2063}," if",[1924,3190,3155],{"class":1930},[1924,3192,3158],{"class":2063},[1924,3194,3195],{"class":2073}," 'posts'",[1924,3197,3147],{"class":1930},[1924,3199,3200,3202,3205,3207,3210,3213,3215,3217,3220,3223],{"class":1926,"line":2275},[1924,3201,3168],{"class":2063},[1924,3203,3204],{"class":2073}," `/blog/${",[1924,3206,3144],{"class":1930},[1924,3208,3209],{"class":2073},".",[1924,3211,3212],{"class":1930},"post",[1924,3214,3209],{"class":2073},[1924,3216,2395],{"class":1930},[1924,3218,3219],{"class":2073},"}`",[1924,3221,3222],{"class":2063}," ??",[1924,3224,3177],{"class":2073},[1924,3226,3227,3229,3231,3233,3235,3237,3240],{"class":1926,"line":2283},[1924,3228,3182],{"class":1930},[1924,3230,3185],{"class":2063},[1924,3232,3188],{"class":2063},[1924,3234,3155],{"class":1930},[1924,3236,3158],{"class":2063},[1924,3238,3239],{"class":2073}," 'external'",[1924,3241,3147],{"class":1930},[1924,3243,3244,3246,3249,3251],{"class":1926,"line":2289},[1924,3245,3168],{"class":2063},[1924,3247,3248],{"class":1930}," item.external_url ",[1924,3250,3174],{"class":2063},[1924,3252,3177],{"class":2073},[1924,3254,3255],{"class":1926,"line":2295},[1924,3256,2712],{"class":1930},[1924,3258,3259,3262],{"class":1926,"line":2301},[1924,3260,3261],{"class":2063},"    return",[1924,3263,3264],{"class":2085}," undefined\n",[1924,3266,3267],{"class":1926,"line":2307},[1924,3268,3269],{"class":1930},"}\n",[1916,3271,3276],{"className":3272,"code":3274,"language":3275},[3273],"language-text","\u003C!-- Inside your template -->\n\u003Ca href=\"{getUrl(item)}\">{item.link_label}\u003C/a>\n","text",[1891,3277,3274],{"__ignoreMap":24},[1840,3279,3280],{},[1866,3281,3282],{},"Frontend Framework Link Documentation",[1870,3284,3285,3292,3299,3306,3313,3320],{},[1873,3286,3287],{},[1847,3288,3291],{"href":3289,"rel":3290},"https://nextjs.org/docs/app/api-reference/components/link",[1851],"Next.js - Link",[1873,3293,3294],{},[1847,3295,3298],{"href":3296,"rel":3297},"https://nuxt.com/docs/api/components/nuxt-link#nuxtlink",[1851],"Nuxt - NuxtLink",[1873,3300,3301],{},[1847,3302,3305],{"href":3303,"rel":3304},"https://docs.astro.build/en/core-concepts/astro-pages/#link-between-pages",[1851],"Astro - Link between pages",[1873,3307,3308],{},[1847,3309,3312],{"href":3310,"rel":3311},"https://kit.svelte.dev/docs/link-options",[1851],"Svelte - Link options",[1873,3314,3315],{},[1847,3316,3319],{"href":3317,"rel":3318},"https://remix.run/docs/en/main/components/link#link",[1851],"Remix - Link",[1873,3321,3322],{},[1847,3323,3326],{"href":3324,"rel":3325},"https://angular.io/api/router/RouterLink",[1851],"Angular - RouterLink",[1880,3328,3330],{"id":3329},"add-fields-to-control-semantic-elements-when-using-dynamic-page-builder","Add Fields to Control Semantic Elements When Using Dynamic Page Builder",[1840,3332,3333],{},"The structure of your content matters a lot for SEO. Crawlers like well structured pages with a clear hierarchy.",[1840,3335,3336],{},"For educational items like blog posts or documentation, semantic hierarchy and design usually align well. Most of these items also have a well defined “template” or “layout” on the frontend.",[1840,3338,3339,3340,3343,3344,3347,3348,3351],{},"The ",[1891,3341,3342],{},"\u003Ch1>"," tag contains the title of the article and is the visually the largest header on the page. Other header tags like ",[1891,3345,3346],{},"\u003Ch2>"," or ",[1891,3349,3350],{},"\u003Ch3>"," get smaller visually and have less priority for SEO.",[1840,3353,3354],{},[2017,3355],{"alt":3356,"src":3357},"A blog page on the Directus website. The page title is highlighted and labeled as H1. Another headline within the blog post is also highlighted and labeled H2.","/img/4a9c2805-9265-4b14-b447-0ed6ffc3f053.webp",[1840,3359,3360,3361,3364,3365,3368,3369,3372],{},"But for other items like that are more dynamic like landing pages or homepages, the ",[1847,3362,3363],{"href":509},"Builder (Many To Any Relationships)"," really shine inside Directus. You can let your marketing or content teams build pages on their own with predefined collections or ",[1891,3366,3367],{},"blocks"," without involving a developer at all. It also pairs beautifully with the ",[1847,3370,3371],{"href":540},"Live Preview feature"," to allow them to see exactly what the site will look like before publishing.",[1840,3374,3375],{},"However, handling the semantic markup you need for proper SEO versus the fact that blocks  could be placed anywhere on a page can be a real challenge when developing your site.",[1840,3377,3378],{},"Let’s take header tags for example. You need proper semantic hierarchy for SEO. But our hierarchy for SEO doesn’t always equal our visual hierarchy required for good design.",[1840,3380,3381,3382,3384],{},"Having the keyword optimized ",[1891,3383,3342],{}," tag be the largest visually - is not always ideal.",[1840,3386,3387],{},[2017,3388],{"alt":3389,"src":3390},"An events page on the Directus website that highlights the difference in size between the H1 and H2 tags. A small badge with the text Events is the H1. A large headline is the H2.","/img/0269f212-856d-433f-b771-229b40dba31a.webp",[1840,3392,3393,3394,3396],{},"But in other cases, the ",[1891,3395,3342],{}," tag should be the largest visually.",[1840,3398,3399],{},[2017,3400],{"alt":3401,"src":3402},"Screenshot of the Directus website with the page heading highlighted. Callouts are pointing to the H2 and H1 elements within the page heading. The H2 tag is above the H1 tag and much smaller.","/img/614c38a1-f987-4da8-8919-3441d3f0e727.webp",[1840,3404,3405],{},"A great solution to this problem can be to create separate fields within the collection that allow the content editor to choose both the proper header tag and the visual size.",[1840,3407,3408],{},"Here’s an example.",[1840,3410,3411],{},[2017,3412],{"alt":3413,"src":3414},"Content editing form within Directus collection. Several fields are highlighted - Preheading Tag, Heading Size, and Heading Tag. Preheading Tag has a value of H1, Heading Size has a value of X-Large, and Heading Tag has a value of H2.","/img/09148a86-24ef-45d8-a275-a3908e0f6d49.webp",[1840,3416,3417],{},"This provides a ton of flexibility. And with just a little training, editors can create pages that look great on screen and also perform well for SEO.",[1840,3419,3420],{},"To render this on the frontend, you’d use dynamic components. Most frontend tools support the concept of dynamic components. The syntax will vary though so consult your frontend framework’s documentation.",[1840,3422,3423],{},[1866,3424,3425],{},"Frontend Framework Component Documentation",[1870,3427,3428,3435,3442,3450,3457,3460],{},[1873,3429,3430],{},[1847,3431,3434],{"href":3432,"rel":3433},"https://nextjs.org/learn/seo/improve/dynamic-import-components",[1851],"Next.js - Dynamic Imports for Components",[1873,3436,3437],{},[1847,3438,3441],{"href":3439,"rel":3440},"https://nuxt.com/docs/guide/directory-structure/components#dynamic-components",[1851],"Nuxt - Dynamic Components",[1873,3443,3444,3449],{},[1847,3445,3448],{"href":3446,"rel":3447},"https://docs.astro.build/en/core-concepts/framework-components/",[1851],"Astro - Components"," - Astro is a bit unique in that you can use components from other frameworks",[1873,3451,3452],{},[1847,3453,3456],{"href":3454,"rel":3455},"https://svelte.dev/docs/special-elements#svelte-component",[1851],"Svelte - svelte:component",[1873,3458,3459],{},"Remix - I couldn’t find anything on dynamic components within Remix’s documentation.",[1873,3461,3462],{},[1847,3463,3466],{"href":3464,"rel":3465},"https://angular.io/guide/dynamic-component-loader",[1851],"Angular - Dynamic component loader",[1880,3468,3470],{"id":3469},"implement-a-sitemap","Implement a Sitemap",[1840,3472,3473],{},"Sitemaps are important tools for crawlers like Googlebot to index your site properly. It’s easy to skip over this step when launching a new site, but it’s an important step that makes sure all the pages on your site can be found in search engines.",[1840,3475,3476,3477,3480],{},"There’s not much to really manage inside Directus for a sitemap beyond properly ",[1847,3478,3479],{"href":494},"creating your content collections",". The heavy lifting for a sitemap is on the frontend.",[1840,3482,3483],{},"Some frontend frameworks have an official or community-supported sitemap module / plugin. Others have instructions on how to generate a sitemap without the need to another package.",[1840,3485,3486],{},"The exact implementation details will vary based on your selected framework but the general approach looks like this.",[1906,3488,3489,3492,3495],{},[1873,3490,3491],{},"Create a function that fetches the items for each collection that has a route on your frontend.",[1873,3493,3494],{},"Loop through those items formatting each as proper xml (or as the specific syntax your plugin requires).",[1873,3496,3497,3498,3501],{},"Create a route like ",[1891,3499,3500],{},"/sitemap.xml"," that returns the XML file.",[1840,3503,3504],{},"Here’s an example that’s specific to Nuxt but the logic could be extracted to other frameworks.",[1916,3506,3508],{"className":2054,"code":3507,"language":2056,"meta":24,"style":24},"// This example is based on Nuxt and uses a third party package.\n// Consult your own frontend framework's documentation for how to properly generate a sitemap in their ecosystem.\n// /server/routes/sitemap.xml.ts\n\nimport { SitemapStream, streamToPromise } from 'sitemap'\nimport { createDirectus, readItems, rest } from '@directus/sdk'\n\nconst directus = createDirectus(directusUrl).with(rest())\n\nexport default defineEventHandler(async (event) => {\n    // Fetch all the collections you want to include in your sitemap\n    const pages = await directus.request(\n        readItems('pages', {\n            fields: ['permalink'],\n            limit: -1, // Be careful using -1, it will fetch all the items in the collection and could cause performance issues if you have a lot of items\n        }),\n    )\n\n    const posts = await directus.request(\n        readItems('posts', { fields: ['slug', { type: ['slug'] }], limit: -1 }),\n    )\n\n    // Create an array of objects with the url you want to include in your sitemap\n    const urls = []\n\n    urls.push(...pages.data.map((page) => ({ url: page.permalink })))\n\n    urls.push(\n        ...posts.data.map((post) => ({\n            url: `/blog/${post.slug}`,\n        })),\n    )\n\n    const sitemap = new SitemapStream({\n        hostname: 'https://example.com',\n    })\n\n    // Add each url to the sitemap\n    for (const item of urls) {\n        sitemap.write({\n            url: item.url,\n            changefreq: 'monthly',\n        })\n    }\n\n    sitemap.end()\n    return streamToPromise(sitemap)\n})\n",[1891,3509,3510,3515,3520,3525,3529,3541,3553,3557,3580,3584,3615,3620,3639,3651,3660,3674,3679,3684,3688,3704,3732,3736,3740,3745,3757,3761,3793,3797,3805,3826,3844,3849,3853,3857,3875,3885,3890,3894,3899,3917,3927,3932,3942,3947,3951,3955,3966,3976],{"__ignoreMap":24},[1924,3511,3512],{"class":1926,"line":1927},[1924,3513,3514],{"class":2489},"// This example is based on Nuxt and uses a third party package.\n",[1924,3516,3517],{"class":1926,"line":1934},[1924,3518,3519],{"class":2489},"// Consult your own frontend framework's documentation for how to properly generate a sitemap in their ecosystem.\n",[1924,3521,3522],{"class":1926,"line":1941},[1924,3523,3524],{"class":2489},"// /server/routes/sitemap.xml.ts\n",[1924,3526,3527],{"class":1926,"line":1951},[1924,3528,1938],{"emptyLinePlaceholder":1937},[1924,3530,3531,3533,3536,3538],{"class":1926,"line":1959},[1924,3532,2064],{"class":2063},[1924,3534,3535],{"class":1930}," { SitemapStream, streamToPromise } ",[1924,3537,2070],{"class":2063},[1924,3539,3540],{"class":2073}," 'sitemap'\n",[1924,3542,3543,3545,3548,3550],{"class":1926,"line":1967},[1924,3544,2064],{"class":2063},[1924,3546,3547],{"class":1930}," { createDirectus, readItems, rest } ",[1924,3549,2070],{"class":2063},[1924,3551,3552],{"class":2073}," '@directus/sdk'\n",[1924,3554,3555],{"class":1926,"line":1975},[1924,3556,1938],{"emptyLinePlaceholder":1937},[1924,3558,3559,3561,3564,3566,3568,3571,3573,3575,3577],{"class":1926,"line":1983},[1924,3560,2082],{"class":2063},[1924,3562,3563],{"class":2085}," directus",[1924,3565,2089],{"class":2063},[1924,3567,2093],{"class":2092},[1924,3569,3570],{"class":1930},"(directusUrl).",[1924,3572,2105],{"class":2092},[1924,3574,2096],{"class":1930},[1924,3576,2110],{"class":2092},[1924,3578,3579],{"class":1930},"())\n",[1924,3581,3582],{"class":1926,"line":1991},[1924,3583,1938],{"emptyLinePlaceholder":1937},[1924,3585,3586,3589,3592,3595,3597,3600,3603,3606,3609,3612],{"class":1926,"line":1999},[1924,3587,3588],{"class":2063},"export",[1924,3590,3591],{"class":2063}," default",[1924,3593,3594],{"class":2092}," defineEventHandler",[1924,3596,2096],{"class":1930},[1924,3598,3599],{"class":2063},"async",[1924,3601,3602],{"class":1930}," (",[1924,3604,3605],{"class":1944},"event",[1924,3607,3608],{"class":1930},") ",[1924,3610,3611],{"class":2063},"=>",[1924,3613,3614],{"class":1930}," {\n",[1924,3616,3617],{"class":1926,"line":2007},[1924,3618,3619],{"class":2489},"    // Fetch all the collections you want to include in your sitemap\n",[1924,3621,3622,3625,3628,3630,3632,3635,3637],{"class":1926,"line":2199},[1924,3623,3624],{"class":2063},"    const",[1924,3626,3627],{"class":2085}," pages",[1924,3629,2089],{"class":2063},[1924,3631,2147],{"class":2063},[1924,3633,3634],{"class":1930}," directus.",[1924,3636,2153],{"class":2092},[1924,3638,2156],{"class":1930},[1924,3640,3641,3644,3646,3649],{"class":1926,"line":2207},[1924,3642,3643],{"class":2092},"        readItems",[1924,3645,2096],{"class":1930},[1924,3647,3648],{"class":2073},"'pages'",[1924,3650,2523],{"class":1930},[1924,3652,3653,3656,3658],{"class":1926,"line":2213},[1924,3654,3655],{"class":1930},"            fields: [",[1924,3657,3089],{"class":2073},[1924,3659,3092],{"class":1930},[1924,3661,3662,3665,3667,3669,3671],{"class":1926,"line":2219},[1924,3663,3664],{"class":1930},"            limit: ",[1924,3666,1945],{"class":2063},[1924,3668,2561],{"class":2085},[1924,3670,3020],{"class":1930},[1924,3672,3673],{"class":2489},"// Be careful using -1, it will fetch all the items in the collection and could cause performance issues if you have a lot of items\n",[1924,3675,3676],{"class":1926,"line":2227},[1924,3677,3678],{"class":1930},"        }),\n",[1924,3680,3681],{"class":1926,"line":2235},[1924,3682,3683],{"class":1930},"    )\n",[1924,3685,3686],{"class":1926,"line":2243},[1924,3687,1938],{"emptyLinePlaceholder":1937},[1924,3689,3690,3692,3694,3696,3698,3700,3702],{"class":1926,"line":2251},[1924,3691,3624],{"class":2063},[1924,3693,2501],{"class":2085},[1924,3695,2089],{"class":2063},[1924,3697,2147],{"class":2063},[1924,3699,3634],{"class":1930},[1924,3701,2153],{"class":2092},[1924,3703,2156],{"class":1930},[1924,3705,3706,3708,3710,3712,3715,3717,3720,3722,3725,3727,3729],{"class":1926,"line":2259},[1924,3707,3643],{"class":2092},[1924,3709,2096],{"class":1930},[1924,3711,2166],{"class":2073},[1924,3713,3714],{"class":1930},", { fields: [",[1924,3716,3108],{"class":2073},[1924,3718,3719],{"class":1930},", { type: [",[1924,3721,3108],{"class":2073},[1924,3723,3724],{"class":1930},"] }], limit: ",[1924,3726,1945],{"class":2063},[1924,3728,2561],{"class":2085},[1924,3730,3731],{"class":1930}," }),\n",[1924,3733,3734],{"class":1926,"line":2267},[1924,3735,3683],{"class":1930},[1924,3737,3738],{"class":1926,"line":2275},[1924,3739,1938],{"emptyLinePlaceholder":1937},[1924,3741,3742],{"class":1926,"line":2283},[1924,3743,3744],{"class":2489},"    // Create an array of objects with the url you want to include in your sitemap\n",[1924,3746,3747,3749,3752,3754],{"class":1926,"line":2289},[1924,3748,3624],{"class":2063},[1924,3750,3751],{"class":2085}," urls",[1924,3753,2089],{"class":2063},[1924,3755,3756],{"class":1930}," []\n",[1924,3758,3759],{"class":1926,"line":2295},[1924,3760,1938],{"emptyLinePlaceholder":1937},[1924,3762,3763,3766,3769,3771,3774,3777,3780,3783,3786,3788,3790],{"class":1926,"line":2301},[1924,3764,3765],{"class":1930},"    urls.",[1924,3767,3768],{"class":2092},"push",[1924,3770,2096],{"class":1930},[1924,3772,3773],{"class":2063},"...",[1924,3775,3776],{"class":1930},"pages.data.",[1924,3778,3779],{"class":2092},"map",[1924,3781,3782],{"class":1930},"((",[1924,3784,3785],{"class":1944},"page",[1924,3787,3608],{"class":1930},[1924,3789,3611],{"class":2063},[1924,3791,3792],{"class":1930}," ({ url: page.permalink })))\n",[1924,3794,3795],{"class":1926,"line":2307},[1924,3796,1938],{"emptyLinePlaceholder":1937},[1924,3798,3799,3801,3803],{"class":1926,"line":2778},[1924,3800,3765],{"class":1930},[1924,3802,3768],{"class":2092},[1924,3804,2156],{"class":1930},[1924,3806,3807,3810,3813,3815,3817,3819,3821,3823],{"class":1926,"line":2784},[1924,3808,3809],{"class":2063},"        ...",[1924,3811,3812],{"class":1930},"posts.data.",[1924,3814,3779],{"class":2092},[1924,3816,3782],{"class":1930},[1924,3818,3212],{"class":1944},[1924,3820,3608],{"class":1930},[1924,3822,3611],{"class":2063},[1924,3824,3825],{"class":1930}," ({\n",[1924,3827,3828,3831,3834,3836,3838,3840,3842],{"class":1926,"line":2790},[1924,3829,3830],{"class":1930},"            url: ",[1924,3832,3833],{"class":2073},"`/blog/${",[1924,3835,3212],{"class":1930},[1924,3837,3209],{"class":2073},[1924,3839,2395],{"class":1930},[1924,3841,3219],{"class":2073},[1924,3843,2182],{"class":1930},[1924,3845,3846],{"class":1926,"line":2796},[1924,3847,3848],{"class":1930},"        })),\n",[1924,3850,3851],{"class":1926,"line":2801},[1924,3852,3683],{"class":1930},[1924,3854,3855],{"class":1926,"line":2806},[1924,3856,1938],{"emptyLinePlaceholder":1937},[1924,3858,3859,3861,3864,3866,3869,3872],{"class":1926,"line":2814},[1924,3860,3624],{"class":2063},[1924,3862,3863],{"class":2085}," sitemap",[1924,3865,2089],{"class":2063},[1924,3867,3868],{"class":2063}," new",[1924,3870,3871],{"class":2092}," SitemapStream",[1924,3873,3874],{"class":1930},"({\n",[1924,3876,3877,3880,3883],{"class":1926,"line":2819},[1924,3878,3879],{"class":1930},"        hostname: ",[1924,3881,3882],{"class":2073},"'https://example.com'",[1924,3884,2182],{"class":1930},[1924,3886,3887],{"class":1926,"line":2825},[1924,3888,3889],{"class":1930},"    })\n",[1924,3891,3892],{"class":1926,"line":2830},[1924,3893,1938],{"emptyLinePlaceholder":1937},[1924,3895,3896],{"class":1926,"line":2835},[1924,3897,3898],{"class":2489},"    // Add each url to the sitemap\n",[1924,3900,3901,3904,3906,3908,3911,3914],{"class":1926,"line":2840},[1924,3902,3903],{"class":2063},"    for",[1924,3905,3602],{"class":1930},[1924,3907,2082],{"class":2063},[1924,3909,3910],{"class":2085}," item",[1924,3912,3913],{"class":2063}," of",[1924,3915,3916],{"class":1930}," urls) {\n",[1924,3918,3919,3922,3925],{"class":1926,"line":2845},[1924,3920,3921],{"class":1930},"        sitemap.",[1924,3923,3924],{"class":2092},"write",[1924,3926,3874],{"class":1930},[1924,3928,3929],{"class":1926,"line":2851},[1924,3930,3931],{"class":1930},"            url: item.url,\n",[1924,3933,3934,3937,3940],{"class":1926,"line":2856},[1924,3935,3936],{"class":1930},"            changefreq: ",[1924,3938,3939],{"class":2073},"'monthly'",[1924,3941,2182],{"class":1930},[1924,3943,3944],{"class":1926,"line":2861},[1924,3945,3946],{"class":1930},"        })\n",[1924,3948,3949],{"class":1926,"line":2866},[1924,3950,2712],{"class":1930},[1924,3952,3953],{"class":1926,"line":2871},[1924,3954,1938],{"emptyLinePlaceholder":1937},[1924,3956,3957,3960,3963],{"class":1926,"line":2876},[1924,3958,3959],{"class":1930},"    sitemap.",[1924,3961,3962],{"class":2092},"end",[1924,3964,3965],{"class":1930},"()\n",[1924,3967,3968,3970,3973],{"class":1926,"line":2881},[1924,3969,3261],{"class":2063},[1924,3971,3972],{"class":2092}," streamToPromise",[1924,3974,3975],{"class":1930},"(sitemap)\n",[1924,3977,3978],{"class":1926,"line":2886},[1924,3979,3980],{"class":1930},"})\n",[1840,3982,3983],{},[1866,3984,3985],{},"Frontend Framework Sitemap Resources",[1870,3987,3988,3995,4002,4009,4016,4023],{},[1873,3989,3990],{},[1847,3991,3994],{"href":3992,"rel":3993},"https://nextjs.org/learn/seo/crawling-and-indexing/xml-sitemaps",[1851],"Next.js - XML Sitemap Documentation",[1873,3996,3997],{},[1847,3998,4001],{"href":3999,"rel":4000},"https://nuxt.com/modules/simple-sitemap",[1851],"Nuxt - Nuxt Simple Sitemap Module",[1873,4003,4004],{},[1847,4005,4008],{"href":4006,"rel":4007},"https://docs.astro.build/en/guides/integrations-guide/sitemap/",[1851],"Astro - @astro/sitemap Integration",[1873,4010,4011],{},[1847,4012,4015],{"href":4013,"rel":4014},"https://github.com/bartholomej/svelte-sitemap",[1851],"Svelte - Sitemap Package",[1873,4017,4018],{},[1847,4019,4022],{"href":4020,"rel":4021},"https://github.com/balavishnuvj/remix-seo",[1851],"Remix - Remix SEO Package",[1873,4024,4025],{},"Angular - I struggled to find a helpful tutorial or sitemap package for Angular.",[1880,4027,4029],{"id":4028},"give-your-team-control-of-redirects","Give Your Team Control of Redirects",[1840,4031,4032],{},"It sucks having to pull yourself away from a fun (or important) project to manually add some redirects for a page. Do yourself a favor and let your content team add and manage redirects within the CMS.",[1906,4034,4035,4128],{},[1873,4036,4037,4038,1914,4041,4122,4124],{},"Create a ",[1891,4039,4040],{},"redirects",[1916,4042,4044],{"className":1918,"code":4043,"language":1920,"meta":24,"style":24},"redirects\n\n- id (Type: uuid)\n- url_old (Type: String, Interface: Input)\n- url_new (Type: Integer, Interface: Slider)\n- response_code (Type: String, Interface: Dropdown, Choices: [\n    {\n        \"text\": \"Permanent (301)\",\n        \"value\": \"301\"\n    },\n    {\n        \"text\": \"Temporary (302)\",\n        \"value\": \"302\"\n    }\n])\n",[1891,4045,4046,4051,4055,4061,4068,4075,4082,4086,4091,4096,4100,4104,4109,4114,4118],{"__ignoreMap":24},[1924,4047,4048],{"class":1926,"line":1927},[1924,4049,4050],{"class":1930},"redirects\n",[1924,4052,4053],{"class":1926,"line":1934},[1924,4054,1938],{"emptyLinePlaceholder":1937},[1924,4056,4057,4059],{"class":1926,"line":1941},[1924,4058,1945],{"class":1944},[1924,4060,1948],{"class":1930},[1924,4062,4063,4065],{"class":1926,"line":1951},[1924,4064,1945],{"class":1944},[1924,4066,4067],{"class":1930}," url_old (Type: String, Interface: Input)\n",[1924,4069,4070,4072],{"class":1926,"line":1959},[1924,4071,1945],{"class":1944},[1924,4073,4074],{"class":1930}," url_new (Type: Integer, Interface: Slider)\n",[1924,4076,4077,4079],{"class":1926,"line":1967},[1924,4078,1945],{"class":1944},[1924,4080,4081],{"class":1930}," response_code (Type: String, Interface: Dropdown, Choices: [\n",[1924,4083,4084],{"class":1926,"line":1975},[1924,4085,2661],{"class":1930},[1924,4087,4088],{"class":1926,"line":1983},[1924,4089,4090],{"class":1930},"        \"text\": \"Permanent (301)\",\n",[1924,4092,4093],{"class":1926,"line":1991},[1924,4094,4095],{"class":1930},"        \"value\": \"301\"\n",[1924,4097,4098],{"class":1926,"line":1999},[1924,4099,2553],{"class":1930},[1924,4101,4102],{"class":1926,"line":2007},[1924,4103,2661],{"class":1930},[1924,4105,4106],{"class":1926,"line":2199},[1924,4107,4108],{"class":1930},"        \"text\": \"Temporary (302)\",\n",[1924,4110,4111],{"class":1926,"line":2207},[1924,4112,4113],{"class":1930},"        \"value\": \"302\"\n",[1924,4115,4116],{"class":1926,"line":2213},[1924,4117,2712],{"class":1930},[1924,4119,4120],{"class":1926,"line":2219},[1924,4121,2717],{"class":1930},[2014,4123],{},[2017,4125],{"alt":4126,"src":4127},"Screenshot of the Redirects collection data model within Directus settings. Fields included in the data model are url_old, url_new, and response_code.","/img/9cad8803-53cb-4c2c-9e51-e05041ba9b87.webp",[1873,4129,4130,4131],{},"Add redirects dynamically when building your frontend. This is often done by creating a function to fetch the redirects from your Directus API and then passing those redirects to your frontend framework using a specific syntax inside a config file, plugin, or module.",[1916,4132,4134],{"className":2054,"code":4133,"language":2056,"meta":24,"style":24},"// Though it depends on your specific framework, this logic would probably be called during build time\nimport { createDirectus, readItems, rest } from '@directus/sdk'\n\nconst directus = createDirectus(directusUrl).with(rest())\n\nconst redirects = await directus.request(readItems('redirects'))\n\nfor (const redirect of redirects) {\n    let responseCode = redirect.response_code\n        ? parseInt(redirect.response_code)\n        : 301\n\n    // If response code doesn't match what we expect, use 301\n    if (responseCode !== 301 && responseCode !== 302) {\n        responseCode = 301\n    }\n\n    // Add Logic here to add the redirects to a config file or tell your frontend framework how to handle them\n    // ** Your Logic **\n}\n",[1891,4135,4136,4141,4151,4155,4175,4179,4207,4211,4228,4242,4253,4261,4265,4270,4295,4304,4308,4312,4317,4322],{"__ignoreMap":24},[1924,4137,4138],{"class":1926,"line":1927},[1924,4139,4140],{"class":2489},"// Though it depends on your specific framework, this logic would probably be called during build time\n",[1924,4142,4143,4145,4147,4149],{"class":1926,"line":1934},[1924,4144,2064],{"class":2063},[1924,4146,3547],{"class":1930},[1924,4148,2070],{"class":2063},[1924,4150,3552],{"class":2073},[1924,4152,4153],{"class":1926,"line":1941},[1924,4154,1938],{"emptyLinePlaceholder":1937},[1924,4156,4157,4159,4161,4163,4165,4167,4169,4171,4173],{"class":1926,"line":1951},[1924,4158,2082],{"class":2063},[1924,4160,3563],{"class":2085},[1924,4162,2089],{"class":2063},[1924,4164,2093],{"class":2092},[1924,4166,3570],{"class":1930},[1924,4168,2105],{"class":2092},[1924,4170,2096],{"class":1930},[1924,4172,2110],{"class":2092},[1924,4174,3579],{"class":1930},[1924,4176,4177],{"class":1926,"line":1959},[1924,4178,1938],{"emptyLinePlaceholder":1937},[1924,4180,4181,4183,4186,4188,4190,4192,4194,4196,4199,4201,4204],{"class":1926,"line":1967},[1924,4182,2082],{"class":2063},[1924,4184,4185],{"class":2085}," redirects",[1924,4187,2089],{"class":2063},[1924,4189,2147],{"class":2063},[1924,4191,3634],{"class":1930},[1924,4193,2153],{"class":2092},[1924,4195,2096],{"class":1930},[1924,4197,4198],{"class":2092},"readItems",[1924,4200,2096],{"class":1930},[1924,4202,4203],{"class":2073},"'redirects'",[1924,4205,4206],{"class":1930},"))\n",[1924,4208,4209],{"class":1926,"line":1975},[1924,4210,1938],{"emptyLinePlaceholder":1937},[1924,4212,4213,4216,4218,4220,4223,4225],{"class":1926,"line":1983},[1924,4214,4215],{"class":2063},"for",[1924,4217,3602],{"class":1930},[1924,4219,2082],{"class":2063},[1924,4221,4222],{"class":2085}," redirect",[1924,4224,3913],{"class":2063},[1924,4226,4227],{"class":1930}," redirects) {\n",[1924,4229,4230,4233,4236,4239],{"class":1926,"line":1991},[1924,4231,4232],{"class":2063},"    let",[1924,4234,4235],{"class":1930}," responseCode ",[1924,4237,4238],{"class":2063},"=",[1924,4240,4241],{"class":1930}," redirect.response_code\n",[1924,4243,4244,4247,4250],{"class":1926,"line":1999},[1924,4245,4246],{"class":2063},"        ?",[1924,4248,4249],{"class":2092}," parseInt",[1924,4251,4252],{"class":1930},"(redirect.response_code)\n",[1924,4254,4255,4258],{"class":1926,"line":2007},[1924,4256,4257],{"class":2063},"        :",[1924,4259,4260],{"class":2085}," 301\n",[1924,4262,4263],{"class":1926,"line":2199},[1924,4264,1938],{"emptyLinePlaceholder":1937},[1924,4266,4267],{"class":1926,"line":2207},[1924,4268,4269],{"class":2489},"    // If response code doesn't match what we expect, use 301\n",[1924,4271,4272,4274,4277,4280,4283,4286,4288,4290,4293],{"class":1926,"line":2213},[1924,4273,3152],{"class":2063},[1924,4275,4276],{"class":1930}," (responseCode ",[1924,4278,4279],{"class":2063},"!==",[1924,4281,4282],{"class":2085}," 301",[1924,4284,4285],{"class":2063}," &&",[1924,4287,4235],{"class":1930},[1924,4289,4279],{"class":2063},[1924,4291,4292],{"class":2085}," 302",[1924,4294,3147],{"class":1930},[1924,4296,4297,4300,4302],{"class":1926,"line":2219},[1924,4298,4299],{"class":1930},"        responseCode ",[1924,4301,4238],{"class":2063},[1924,4303,4260],{"class":2085},[1924,4305,4306],{"class":1926,"line":2227},[1924,4307,2712],{"class":1930},[1924,4309,4310],{"class":1926,"line":2235},[1924,4311,1938],{"emptyLinePlaceholder":1937},[1924,4313,4314],{"class":1926,"line":2243},[1924,4315,4316],{"class":2489},"    // Add Logic here to add the redirects to a config file or tell your frontend framework how to handle them\n",[1924,4318,4319],{"class":1926,"line":2251},[1924,4320,4321],{"class":2489},"    // ** Your Logic **\n",[1924,4323,4324],{"class":1926,"line":2259},[1924,4325,3269],{"class":1930},[1840,4327,4328],{},[1866,4329,4330],{},"Frontend Framework Redirect Documentation",[1870,4332,4333,4340,4347,4354,4361,4368],{},[1873,4334,4335],{},[1847,4336,4339],{"href":4337,"rel":4338},"https://nextjs.org/docs/pages/api-reference/next-config-js/redirects",[1851],"Next.js Redirects",[1873,4341,4342],{},[1847,4343,4346],{"href":4344,"rel":4345},"https://nuxt.com/docs/guide/concepts/rendering#hybrid-rendering",[1851],"Nuxt Redirects",[1873,4348,4349],{},[1847,4350,4353],{"href":4351,"rel":4352},"https://docs.astro.build/en/core-concepts/routing/#configured-redirects",[1851],"Astro Redirects",[1873,4355,4356],{},[1847,4357,4360],{"href":4358,"rel":4359},"https://kit.svelte.dev/docs/load#redirects",[1851],"Svelte Redirects",[1873,4362,4363],{},[1847,4364,4367],{"href":4365,"rel":4366},"https://remix.run/docs/en/main/utils/redirect#redirect",[1851],"Remix Redirects",[1873,4369,4370],{},[1847,4371,4374],{"href":4372,"rel":4373},"https://angular.io/guide/router#setting-up-redirects",[1851],"Angular Redirects",[1880,4376,4378],{"id":4377},"dont-forget-image-alt-text","Don’t Forget Image Alt Text",[1840,4380,4381],{},"Often overlooked, image alt text is important for SEO and critical for proper accessibility.",[1916,4383,4386],{"className":4384,"code":4385,"language":3275},[3273],"\u003Cimg src=\"https://example.com/image.png\" alt=\"An example image of how alt text works\" width=\"500\" height=\"500\" />\n",[1891,4387,4385],{"__ignoreMap":24},[1840,4389,4390],{},"A good way to manage image alt tags is on the files themselves as you upload them within Directus.",[1840,4392,4393,4394,4397],{},"I prefer using the ",[1891,4395,4396],{},"description"," field on files to store alt text. This way you don’t have to input alt text every single time you use this same image in different contexts.",[1840,4399,4400],{},[2017,4401],{"alt":4402,"src":4403},"Screenshot of a File library item form that shows a large image of Directus Flows. Within the form there are two fields - Title and Description.","/img/cb73c2c8-e3b1-42f7-9632-abdb8aed0c21.webp",[1840,4405,4406,4407,3347,4410,4413],{},"For items like blog posts or articles you might have an ",[1891,4408,4409],{},"image",[1891,4411,4412],{},"featured_image","  field so you can have a nice hero image or a thumbnail if shown inside a card.",[1840,4415,4416],{},"If you store alt text inside of the image item, you will want to fetch these nested title and description fields within the same API call:",[1916,4418,4420],{"className":2054,"code":4419,"language":2056,"meta":24,"style":24},"const posts = await client.request(\n  readItems('posts', {\n    filter: {\n      slug: {\n        _eq: slugFromYourFrontEndFramework,\n      },\n    },\n        fields: ['title', 'date_published', 'summary', 'content', { image: ['id', 'title', 'description']}]\n    limit: 1,\n  })\n);\n",[1891,4421,4422,4438,4448,4452,4456,4461,4465,4469,4508,4516,4520],{"__ignoreMap":24},[1924,4423,4424,4426,4428,4430,4432,4434,4436],{"class":1926,"line":1927},[1924,4425,2082],{"class":2063},[1924,4427,2501],{"class":2085},[1924,4429,2089],{"class":2063},[1924,4431,2147],{"class":2063},[1924,4433,2150],{"class":1930},[1924,4435,2153],{"class":2092},[1924,4437,2156],{"class":1930},[1924,4439,4440,4442,4444,4446],{"class":1926,"line":1934},[1924,4441,2516],{"class":2092},[1924,4443,2096],{"class":1930},[1924,4445,2166],{"class":2073},[1924,4447,2523],{"class":1930},[1924,4449,4450],{"class":1926,"line":1941},[1924,4451,2528],{"class":1930},[1924,4453,4454],{"class":1926,"line":1951},[1924,4455,2533],{"class":1930},[1924,4457,4458],{"class":1926,"line":1959},[1924,4459,4460],{"class":1930},"        _eq: slugFromYourFrontEndFramework,\n",[1924,4462,4463],{"class":1926,"line":1967},[1924,4464,2548],{"class":1930},[1924,4466,4467],{"class":1926,"line":1975},[1924,4468,2553],{"class":1930},[1924,4470,4471,4474,4476,4478,4481,4483,4486,4488,4491,4494,4496,4498,4500,4502,4505],{"class":1926,"line":1983},[1924,4472,4473],{"class":1930},"        fields: [",[1924,4475,3084],{"class":2073},[1924,4477,3020],{"class":1930},[1924,4479,4480],{"class":2073},"'date_published'",[1924,4482,3020],{"class":1930},[1924,4484,4485],{"class":2073},"'summary'",[1924,4487,3020],{"class":1930},[1924,4489,4490],{"class":2073},"'content'",[1924,4492,4493],{"class":1930},", { image: [",[1924,4495,3079],{"class":2073},[1924,4497,3020],{"class":1930},[1924,4499,3084],{"class":2073},[1924,4501,3020],{"class":1930},[1924,4503,4504],{"class":2073},"'description'",[1924,4506,4507],{"class":1930},"]}]\n",[1924,4509,4510,4512,4514],{"class":1926,"line":1991},[1924,4511,2558],{"class":1930},[1924,4513,2561],{"class":2085},[1924,4515,2182],{"class":1930},[1924,4517,4518],{"class":1926,"line":1999},[1924,4519,2568],{"class":1930},[1924,4521,4522],{"class":1926,"line":2007},[1924,4523,2310],{"class":1930},[1916,4525,4528],{"className":4526,"code":4527,"language":3275},[3273],"\u003C!-- Inside your template -->\n\u003Cimg src={post.image.id} alt={post.image.description ?? \"\"} />\n",[1891,4529,4527],{"__ignoreMap":24},[1840,4531,4532,4533,4535,4536,2616,4539,4542],{},"Remember that the position of the image ",[1891,4534,2412],{}," will change from ",[1891,4537,4538],{},"item.image",[1891,4540,4541],{},"[item.image.id](http://item.image.id)"," when you fetch nested fields.",[1840,4544,4545,4546,3209],{},"And remember – the actual alt text itself is just as important as rendering it on the page. I won’t dive into details because Moz has a great ",[1847,4547,4550],{"href":4548,"rel":4549},"https://moz.com/learn/seo/alt-text",[1851],"tutorial on how to write proper alt text here",[1840,4552,4553,4554,4559,4560,4565],{},"And if you’ve got 100s of images without alt text and you’re dreading doing all that work manually, try a boost from this extension - ",[1847,4555,4558],{"href":4556,"rel":4557},"https://github.com/Arood/directus-extension-media-ai-bundle",[1851],"Directus Media AI Bundle"," - a winner in a recent AI Hackathon submitted by community member ",[1847,4561,4564],{"href":4562,"rel":4563},"https://github.com/Arood",[1851],"Arood",". It uses several different AI tools to write image alt text or descriptions for you.",[1840,4567,4568],{},[1866,4569,4570],{},"Frontend Framework Image Documentation",[1870,4572,4573,4580,4587,4594,4601,4604],{},[1873,4574,4575],{},[1847,4576,4579],{"href":4577,"rel":4578},"https://nextjs.org/docs/pages/api-reference/components/image",[1851],"Next.js Images",[1873,4581,4582],{},[1847,4583,4586],{"href":4584,"rel":4585},"https://image.nuxt.com/",[1851],"Nuxt Images",[1873,4588,4589],{},[1847,4590,4593],{"href":4591,"rel":4592},"https://docs.astro.build/en/guides/images/",[1851],"Astro Images",[1873,4595,4596],{},[1847,4597,4600],{"href":4598,"rel":4599},"https://kit.svelte.dev/docs/assets",[1851],"Svelte Images",[1873,4602,4603],{},"Remix - I couldn’t locate any documentation about images on the Remix site.",[1873,4605,4606],{},[1847,4607,4610],{"href":4608,"rel":4609},"https://angular.io/guide/image-directive",[1851],"Angular Images",[1880,4612,4614],{"id":4613},"summary","Summary",[1840,4616,4617],{},"In this post, we’ve covered some SEO best practices when using Directus as a Headless CMS. Hopefully you’ve learnt something new, and can build more robust data models that serve both your users and search engine crawlers.",[1840,4619,4620,4621,3209],{},"If these tips were helpful or if you have some of your own you’d like to share, let us know inside ",[1847,4622,4625],{"href":4623,"rel":4624},"https://community.directus.io/",[1851],"our community platform",[4627,4628,4629],"style",{},"html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}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);}html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":24,"searchDepth":1927,"depth":1934,"links":4631},[4632,4633,4634,4635,4636,4637,4638,4639],{"id":1882,"depth":1934,"text":1883},{"id":2368,"depth":1934,"text":2369},{"id":2596,"depth":1934,"text":2597},{"id":3329,"depth":1934,"text":3330},{"id":3469,"depth":1934,"text":3470},{"id":4028,"depth":1934,"text":4029},{"id":4377,"depth":1934,"text":4378},{"id":4613,"depth":1934,"text":4614},{"slug":4641},"search-engine-optimization-best-practices","---\nid: efb3fc4e-36cb-44e0-af93-adce554fdad0\nslug: search-engine-optimization-best-practices\ntitle: Search Engine Optimization Best Practices\nauthors:\n  - name: Bryant Gillespie\n    title: Growth Engineer\ndescription: Learn some best practices for enabling SEO in your projects using Directus.\n---\nSearch engine optimization (SEO) is an ever-changing but super important part of getting your website in front of visitors.\n\nWhen using Directus as a[ Headless CMS](https://directus.io/solutions/headless-cms), it is incredibly un-opinionated about what you do with your data and content on the frontend, leaving how you build your website up to you.\n\nBut if you’re just starting out, being so open-ended can leave you wondering about the best way to handle things like SEO.\n\nIn this post, I’ll share a few tips for managing SEO with Directus. I’ll also share some links and resources for some of the most popular frontend frameworks.\n\n---\n\n**Important Assumptions**\n\n- You understand basic SEO strategy and terminology.\n- You’re familiar with collections, fields, and fetching data from Directus.\n\n## Create a Separate Collection for SEO Data\n\nAt the end of the day, page titles and meta tags are just data. And you have to store that SEO data for your pages and blog posts somewhere.\n\nFor simple sites, you could easily manage all your meta tag data by duplicating fields like `title` and `meta_description` from one collection to another.\n\nBut beyond a couple collections, this approach becomes cumbersome and potentially dangerous. What if you forget to copy one field? What if there’s a typo and the names become inconsistent? These oversights could break your SEO practices and ,at worst, your whole site.\n\nOne better option would be creating a single collection to standardize all the SEO data for your content collections:\n\n1. Create an `seo` collection\n\n    ```md\n    seo\n\n    - id (Type: uuid)\n    - title (Type: String, Interface: Input, Note: This item's title, defaults to item.title. Max 70 characters including the site name.)\n    - meta_description (Type: Text, Interface: Textarea, Note: This item's meta description. Max 160 characters.)\n    - canonical_url (Type: String, Interface: Input, Note: Where should the canonical URL for this entry point to.)\n    - no_index (Type: Boolean, Interface: Toggle, Note: Instruct crawlers not to index this item.)\n    - no_follow (Type: Boolean, Interface: Toggle, Note: Instruct crawlers not to follow links on this item.)\n    - og_image (Type: Image, Note: This item's OG image. Defaults to global site OG image. The recommended size is 1200px x 630px. The image will be focal cropped to this dimension.)\n    - sitemap_change_frequency (Type: String, Interface: Input, Note: How often to instruct search engines to crawl.)\n    - sitemap_priority (Type: Decimal, Interface: Input, Note: Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites, it only lets the search engines know which pages you deem most important for the crawlers.)\n\n    ```\n    ![Screenshot of the SEO collection data model inside settings. Several fields are displayed like title, meta_description, canonical_url, and others related to the sitemap.](/img/fa4c5682-1773-4078-9b17-00f6345e6733.webp)\n\n    Beyond the basic `title` and `meta_description` , the other fields you add to your SEO collection are totally up to you.\n\n    Adding the fields within Directus is only one half of the work - you need to use these fields in your frontend within your `\u003Chead>` tags and sitemap.\n\n2. For each of your content collections that have a route on your frontend, inside Directus –  create a many-to-one (M2O) relationship with the SEO collection.\n\n    ![Screenshot of adding a new many-to-one relationship within the Directus pages collection.](https://marketing.directus.app/assets/8ed6695f-0090-4531-a7c9-4ab4c5cf59cd)\n\n3. When fetching your content on the frontend, use the `fields` parameter to expand the SEO data within a single API call.\n\n    ```js\n    import { createDirectus, rest, readItem } from '@directus/sdk';\n    const client = createDirectus('directus_project_url').with(rest());\n\n    const postId = '234ee-3fdsafa-dfadfa-dfada';\n\n    const post = await client.request(\n    \treadItem('posts', postId, {\n    \t\tfields: [\n    \t\t\t'title',\n    \t\t\t'summary',\n    \t\t\t'content',\n    \t\t\t'image',\n    \t\t\t{\n    \t\t\t\tseo: [\n    \t\t\t\t\t'title',\n    \t\t\t\t\t'meta_description',\n    \t\t\t\t\t'canonical_url',\n    \t\t\t\t\t'no_index',\n    \t\t\t\t\t'no_follow',\n    \t\t\t\t\t'og_image',\n    \t\t\t\t\t'sitemap_change_frequency',\n    \t\t\t\t\t'sitemap_priority',\n    \t\t\t\t],\n    \t\t\t},\n    \t\t],\n    \t}),\n    );\n\n    ```\n\n4.  Then pass that to your frameworks specific method of add SEO metadata within your `\u003Chead>` tags.\n\n**Frontend Framework Metadata Documentation**\n\n- [Next.js - Dynamic Metadata](https://nextjs.org/docs/app/building-your-application/optimizing/metadata#dynamic-metadata)\n- [Nuxt - SEO and Meta](https://nuxt.com/docs/getting-started/seo-meta#seo-and-meta)\n- [Astro - Layouts](https://docs.astro.build/en/core-concepts/layouts/)\n- [SvelteKit - SEO](https://kit.svelte.dev/docs/seo)\n- [Remix - meta](https://remix.run/docs/en/main/route/meta)\n- [Angular - Meta](https://angular.io/api/platform-browser/Meta)\n\n## Don’t Use Slugs as a Primary Key\n\nThe actual url for a page on your website is a key factor for search engine rankings. Because of that, your content editors will want to experiment and adjust urls and slugs for items as needed.\n\nWhen adding a new collection Directus lets you choose from several types of primary keys for your collection.\n\n- Auto-incremented integer\n- Auto-incremented big integer\n- Generated UUID\n- Manually entered string\n\nI’ve seen lots of folks name the primary key field `slug` and use the `Manually entered string` . It’s easy to understand. It makes fetching that item easier because you can get the item by its id (the slug) directly instead of constructing a query to match the slug.\n\nBut an item’s **primary key value can not be changed after they are created**, while this protects your database and all of your relationships, it makes it hard to experiment or change URLs if, for example, a product name changes.\n\nTo avoid this, use the auto-incremented ids or UUIDs for the primary key `id` and create a separate field input for the `slug` . You can require uniqueness which means only one item in a collection can have a given slug.\n\nYou can no longer use API endpoints or SDK functions for reading a single item, as this relies on using the primary key. Instead, query the whole collection and use [Filter Rules](/guides/connect/filter-rules) to get the single item that has the slug:\n\n```js\nimport { createDirectus, rest, readItems } from '@directus/sdk';\nconst client = createDirectus('directus_project_url').with(rest());\n\nconst slugFromYourFrontEndFramework = params.slug || router.query.slug // whatever your convention your framework follows;\n\nconst posts = await client.request(\n  readItems('posts', {\n    filter: {\n      slug: {\n        _eq: 'slugFromYourFrontEndFramework',\n      },\n    },\n    limit: 1,\n  })\n);\n\nconst post = posts.data[0];\n```\n\n## Use Relationships for Internal Linking\n\nWhen building a website, you’ll need both links for internal content and links for external content.\n\nOne common pattern I’ve noticed is creating string inputs for internal links to other content.\n\n![Screenshot of a form within Directus. Two fields are shown. Label and Href. The Href field value is a string /contact-us](/img/2f8a38d2-a6dd-4810-b097-a158e9677d7b.webp)\n\nBut this can be surprisingly brittle. As soon as the slug for the Contact page changes from `/contact-us` to `/contact-directus-team` , the link will break and this can really crash your search engine rankings.\n\nLuckily Directus makes a more dynamic approach possible with relationships.\n\nWhen creating your data model for links to other items from the same or different collections, try using the conditional fields and [many to one relationships](/guides/data-model/relationships) to build a powerful, resilient way to link items.\n\n1. Within your content collection, add the following fields for linking. (Note: This example is extremely simplified so you can learn the logic involved. - name these depending on what makes the most sense to you and your use case.)\n\n    ```md\n    your_content_collection\n\n    - link_type (Type: String, Interface: Dropdown, Note: Choices: [\n        {\n            \"text\": \"Internal - Page\",\n            \"value\": \"pages\"\n        },\n        {\n            \"text\": \"Internal - Post\",\n            \"value\": \"posts\"\n        },\n        {\n            \"text\": \"External - URL\",\n            \"value\": \"external\"\n        }\n    ])\n    - link_label (Type: String, Interface: Input, Note: What label or title is displayed for this link?)\n    - link_page (Type: M20 Relationship, Related Collection: pages, Hidden On Detail, Conditions: [\n        {\n            \"name\": \"IF link_type === page\",\n            \"rule\": {\n                \"_and\": [\n                    {\n                        \"link_type\": {\n                            \"_eq\": \"pages\"\n                        }\n                    }\n                ]\n            },\n            \"hidden\": false,\n        }\n    ])\n    - link_post (Type: M20 Relationship, Related Collection: post, Hidden On Detail, Conditions: [\n        {\n            \"name\": \"IF link_type === post\",\n            \"rule\": {\n                \"_and\": [\n                    {\n                        \"link_type\": {\n                            \"_eq\": \"post\"\n                        }\n                    }\n                ]\n            },\n            \"hidden\": false,\n        }\n    ])\n    - link_external_url (Type: String, Interface: Input, Conditions: [\n        {\n            \"name\": \"IF link_type === external\",\n            \"rule\": {\n                \"_and\": [\n                    {\n                        \"link_type\": {\n                            \"_eq\": \"external\"\n                        }\n                    }\n                ]\n            },\n            \"hidden\": false,\n        }\n    ])\n\n    ```\n\n    \u003Cvideo controls=\"true\">\n      \u003Csource src=\"/docs/img/cd5bd4f3-02f1-46be-b82e-570052483379.mp4\" type=\"video/mp4\">\n    \u003C/video>\n\n    Fields for page, post, and external url are only visible when the related type is selected so there is no confusion about which fields to enter data for. And it also allows you to use that relationship to fetch the proper slug or permalink for posts and pages.\n\n2. On the frontend, when you are fetching data via the API, use the fields parameter to get the related posts and pages in a single API call.\n\nThen make sure you’re getting the proper url based on the `link_type`:\n\n```js\nconst post = await client.request(\n    readItem('your_content_collection', 'your_content_item_id', {\n        fields: [\n            // Fetch all the other root level fields for your collection **In production, you should only fetch the fields you need**\n            '*',\n            'link_type',\n            'link_label',\n            'external_url',\n            // Use object syntax to fetch fields from a relation\n            {\n                page: ['id', 'title', 'permalink'],\n                post: ['id', 'title', 'slug'],\n            },\n        ],\n    }),\n)\n\nfunction getUrl(item) {\n    if (item.link_type === 'pages') {\n        return item.page.permalink ?? ''\n    } else if (item.link_type === 'posts') {\n        return `/blog/${item.post.slug}` ?? ''\n    } else if (item.link_type === 'external') {\n        return item.external_url ?? ''\n    }\n    return undefined\n}\n```\n\n\n```\n\u003C!-- Inside your template -->\n\u003Ca href=\"{getUrl(item)}\">{item.link_label}\u003C/a>\n```\n\n\n**Frontend Framework Link Documentation**\n\n- [Next.js - Link](https://nextjs.org/docs/app/api-reference/components/link)\n- [Nuxt - NuxtLink](https://nuxt.com/docs/api/components/nuxt-link#nuxtlink)\n- [Astro - Link between pages](https://docs.astro.build/en/core-concepts/astro-pages/#link-between-pages)\n- [Svelte - Link options](https://kit.svelte.dev/docs/link-options)\n- [Remix - Link](https://remix.run/docs/en/main/components/link#link)\n- [Angular - RouterLink](https://angular.io/api/router/RouterLink)\n\n## Add Fields to Control Semantic Elements When Using Dynamic Page Builder\n\nThe structure of your content matters a lot for SEO. Crawlers like well structured pages with a clear hierarchy.\n\nFor educational items like blog posts or documentation, semantic hierarchy and design usually align well. Most of these items also have a well defined “template” or “layout” on the frontend.\n\nThe `\u003Ch1>` tag contains the title of the article and is the visually the largest header on the page. Other header tags like `\u003Ch2>` or `\u003Ch3>` get smaller visually and have less priority for SEO.\n\n![A blog page on the Directus website. The page title is highlighted and labeled as H1. Another headline within the blog post is also highlighted and labeled H2.](/img/4a9c2805-9265-4b14-b447-0ed6ffc3f053.webp)\n\nBut for other items like that are more dynamic like landing pages or homepages, the [Builder (Many To Any Relationships)](/guides/data-model/relationships) really shine inside Directus. You can let your marketing or content teams build pages on their own with predefined collections or `blocks` without involving a developer at all. It also pairs beautifully with the [Live Preview feature](/guides/content/live-preview) to allow them to see exactly what the site will look like before publishing.\n\nHowever, handling the semantic markup you need for proper SEO versus the fact that blocks  could be placed anywhere on a page can be a real challenge when developing your site.\n\nLet’s take header tags for example. You need proper semantic hierarchy for SEO. But our hierarchy for SEO doesn’t always equal our visual hierarchy required for good design.\n\nHaving the keyword optimized `\u003Ch1>` tag be the largest visually - is not always ideal.\n\n![An events page on the Directus website that highlights the difference in size between the H1 and H2 tags. A small badge with the text Events is the H1. A large headline is the H2.](/img/0269f212-856d-433f-b771-229b40dba31a.webp)\n\nBut in other cases, the `\u003Ch1>` tag should be the largest visually.\n\n![Screenshot of the Directus website with the page heading highlighted. Callouts are pointing to the H2 and H1 elements within the page heading. The H2 tag is above the H1 tag and much smaller.](/img/614c38a1-f987-4da8-8919-3441d3f0e727.webp)\n\nA great solution to this problem can be to create separate fields within the collection that allow the content editor to choose both the proper header tag and the visual size.\n\nHere’s an example.\n\n![Content editing form within Directus collection. Several fields are highlighted - Preheading Tag, Heading Size, and Heading Tag. Preheading Tag has a value of H1, Heading Size has a value of X-Large, and Heading Tag has a value of H2.](/img/09148a86-24ef-45d8-a275-a3908e0f6d49.webp)\n\nThis provides a ton of flexibility. And with just a little training, editors can create pages that look great on screen and also perform well for SEO.\n\nTo render this on the frontend, you’d use dynamic components. Most frontend tools support the concept of dynamic components. The syntax will vary though so consult your frontend framework’s documentation.\n\n**Frontend Framework Component Documentation**\n\n- [Next.js - Dynamic Imports for Components](https://nextjs.org/learn/seo/improve/dynamic-import-components)\n- [Nuxt - Dynamic Components](https://nuxt.com/docs/guide/directory-structure/components#dynamic-components)\n- [Astro - Components](https://docs.astro.build/en/core-concepts/framework-components/) - Astro is a bit unique in that you can use components from other frameworks\n- [Svelte - svelte:component](https://svelte.dev/docs/special-elements#svelte-component)\n- Remix - I couldn’t find anything on dynamic components within Remix’s documentation.\n- [Angular - Dynamic component loader](https://angular.io/guide/dynamic-component-loader)\n\n## Implement a Sitemap\n\nSitemaps are important tools for crawlers like Googlebot to index your site properly. It’s easy to skip over this step when launching a new site, but it’s an important step that makes sure all the pages on your site can be found in search engines.\n\nThere’s not much to really manage inside Directus for a sitemap beyond properly [creating your content collections](/guides/data-model/collections). The heavy lifting for a sitemap is on the frontend.\n\nSome frontend frameworks have an official or community-supported sitemap module / plugin. Others have instructions on how to generate a sitemap without the need to another package.\n\nThe exact implementation details will vary based on your selected framework but the general approach looks like this.\n\n1. Create a function that fetches the items for each collection that has a route on your frontend.\n2. Loop through those items formatting each as proper xml (or as the specific syntax your plugin requires).\n3. Create a route like `/sitemap.xml` that returns the XML file.\n\nHere’s an example that’s specific to Nuxt but the logic could be extracted to other frameworks.\n\n```js\n// This example is based on Nuxt and uses a third party package.\n// Consult your own frontend framework's documentation for how to properly generate a sitemap in their ecosystem.\n// /server/routes/sitemap.xml.ts\n\nimport { SitemapStream, streamToPromise } from 'sitemap'\nimport { createDirectus, readItems, rest } from '@directus/sdk'\n\nconst directus = createDirectus(directusUrl).with(rest())\n\nexport default defineEventHandler(async (event) => {\n    // Fetch all the collections you want to include in your sitemap\n    const pages = await directus.request(\n        readItems('pages', {\n            fields: ['permalink'],\n            limit: -1, // Be careful using -1, it will fetch all the items in the collection and could cause performance issues if you have a lot of items\n        }),\n    )\n\n    const posts = await directus.request(\n        readItems('posts', { fields: ['slug', { type: ['slug'] }], limit: -1 }),\n    )\n\n    // Create an array of objects with the url you want to include in your sitemap\n    const urls = []\n\n    urls.push(...pages.data.map((page) => ({ url: page.permalink })))\n\n    urls.push(\n        ...posts.data.map((post) => ({\n            url: `/blog/${post.slug}`,\n        })),\n    )\n\n    const sitemap = new SitemapStream({\n        hostname: 'https://example.com',\n    })\n\n    // Add each url to the sitemap\n    for (const item of urls) {\n        sitemap.write({\n            url: item.url,\n            changefreq: 'monthly',\n        })\n    }\n\n    sitemap.end()\n    return streamToPromise(sitemap)\n})\n```\n\n\n**Frontend Framework Sitemap Resources**\n\n- [Next.js - XML Sitemap Documentation](https://nextjs.org/learn/seo/crawling-and-indexing/xml-sitemaps)\n- [Nuxt - Nuxt Simple Sitemap Module](https://nuxt.com/modules/simple-sitemap)\n- [Astro - @astro/sitemap Integration](https://docs.astro.build/en/guides/integrations-guide/sitemap/)\n- [Svelte - Sitemap Package](https://github.com/bartholomej/svelte-sitemap)\n- [Remix - Remix SEO Package](https://github.com/balavishnuvj/remix-seo)\n- Angular - I struggled to find a helpful tutorial or sitemap package for Angular.\n\n## Give Your Team Control of Redirects\n\nIt sucks having to pull yourself away from a fun (or important) project to manually add some redirects for a page. Do yourself a favor and let your content team add and manage redirects within the CMS.\n\n1. Create a `redirects` collection\n\n    ```md\n    redirects\n\n    - id (Type: uuid)\n    - url_old (Type: String, Interface: Input)\n    - url_new (Type: Integer, Interface: Slider)\n    - response_code (Type: String, Interface: Dropdown, Choices: [\n        {\n            \"text\": \"Permanent (301)\",\n            \"value\": \"301\"\n        },\n        {\n            \"text\": \"Temporary (302)\",\n            \"value\": \"302\"\n        }\n    ])\n    ```\n\n    ![Screenshot of the Redirects collection data model within Directus settings. Fields included in the data model are url_old, url_new, and response_code.](/img/9cad8803-53cb-4c2c-9e51-e05041ba9b87.webp)\n\n2. Add redirects dynamically when building your frontend. This is often done by creating a function to fetch the redirects from your Directus API and then passing those redirects to your frontend framework using a specific syntax inside a config file, plugin, or module.\n\n    ```js\n    // Though it depends on your specific framework, this logic would probably be called during build time\n    import { createDirectus, readItems, rest } from '@directus/sdk'\n\n    const directus = createDirectus(directusUrl).with(rest())\n\n    const redirects = await directus.request(readItems('redirects'))\n\n    for (const redirect of redirects) {\n    \tlet responseCode = redirect.response_code\n    \t\t? parseInt(redirect.response_code)\n    \t\t: 301\n\n    \t// If response code doesn't match what we expect, use 301\n    \tif (responseCode !== 301 && responseCode !== 302) {\n    \t\tresponseCode = 301\n    \t}\n\n    \t// Add Logic here to add the redirects to a config file or tell your frontend framework how to handle them\n    \t// ** Your Logic **\n    }\n    ```\n\n\n**Frontend Framework Redirect Documentation**\n\n- [Next.js Redirects](https://nextjs.org/docs/pages/api-reference/next-config-js/redirects)\n- [Nuxt Redirects](https://nuxt.com/docs/guide/concepts/rendering#hybrid-rendering)\n- [Astro Redirects](https://docs.astro.build/en/core-concepts/routing/#configured-redirects)\n- [Svelte Redirects](https://kit.svelte.dev/docs/load#redirects)\n- [Remix Redirects](https://remix.run/docs/en/main/utils/redirect#redirect)\n- [Angular Redirects](https://angular.io/guide/router#setting-up-redirects)\n\n## Don’t Forget Image Alt Text\n\nOften overlooked, image alt text is important for SEO and critical for proper accessibility.\n\n```\n\u003Cimg src=\"https://example.com/image.png\" alt=\"An example image of how alt text works\" width=\"500\" height=\"500\" />\n```\n\nA good way to manage image alt tags is on the files themselves as you upload them within Directus.\n\nI prefer using the `description` field on files to store alt text. This way you don’t have to input alt text every single time you use this same image in different contexts.\n\n![Screenshot of a File library item form that shows a large image of Directus Flows. Within the form there are two fields - Title and Description.](/img/cb73c2c8-e3b1-42f7-9632-abdb8aed0c21.webp)\n\nFor items like blog posts or articles you might have an `image` or `featured_image`  field so you can have a nice hero image or a thumbnail if shown inside a card.\n\nIf you store alt text inside of the image item, you will want to fetch these nested title and description fields within the same API call:\n\n```js\nconst posts = await client.request(\n  readItems('posts', {\n    filter: {\n      slug: {\n        _eq: slugFromYourFrontEndFramework,\n      },\n    },\n\t\tfields: ['title', 'date_published', 'summary', 'content', { image: ['id', 'title', 'description']}]\n    limit: 1,\n  })\n);\n```\n\n```\n\u003C!-- Inside your template -->\n\u003Cimg src={post.image.id} alt={post.image.description ?? \"\"} />\n```\n\nRemember that the position of the image `id` will change from `item.image` to `[item.image.id](http://item.image.id)` when you fetch nested fields.\n\nAnd remember – the actual alt text itself is just as important as rendering it on the page. I won’t dive into details because Moz has a great [tutorial on how to write proper alt text here](https://moz.com/learn/seo/alt-text).\n\nAnd if you’ve got 100s of images without alt text and you’re dreading doing all that work manually, try a boost from this extension - [Directus Media AI Bundle](https://github.com/Arood/directus-extension-media-ai-bundle) - a winner in a recent AI Hackathon submitted by community member [Arood](https://github.com/Arood). It uses several different AI tools to write image alt text or descriptions for you.\n\n**Frontend Framework Image Documentation**\n\n- [Next.js Images](https://nextjs.org/docs/pages/api-reference/components/image)\n- [Nuxt Images](https://image.nuxt.com/)\n- [Astro Images](https://docs.astro.build/en/guides/images/)\n- [Svelte Images](https://kit.svelte.dev/docs/assets)\n- Remix - I couldn’t locate any documentation about images on the Remix site.\n- [Angular Images](https://angular.io/guide/image-directive)\n\n## Summary\n\nIn this post, we’ve covered some SEO best practices when using Directus as a Headless CMS. Hopefully you’ve learnt something new, and can build more robust data models that serve both your users and search engine crawlers.\n\nIf these tips were helpful or if you have some of your own you’d like to share, let us know inside [our community platform](https://community.directus.io/).\n",{"title":1567,"description":1570},"QxwuTw8-NuIo0lMW4mEuSY1zAjE-d3yxi0XTUJ_PcN8",1775038783463]