Files
directus/docs/index.md
Kevin Lewis 96df9391c4 Adding area toggle to top of docs nav (#21176)
* Added tabs

* Remove area links from nav

* Added social nav links

* Ensured toggle is respected when path changes

* Updated dev toggle link

* Removed white backgroudn to respect dark mode

* CI gods must be pleased

* Simplify path determination

* Toggle design as per Ben's feedback

* Tabs component styling

* Updated tabs content on docs home

* HEader nav links

* Dev sidebar link to home

* Adjust inactive & hover color of tab buttons

* Nest CSS

* Update docs/.vitepress/theme/Layout.vue

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-01-25 11:37:00 +01:00

9.2 KiB

layout
layout
page
<script setup lang="ts"> import { data } from '@/data/blog.data.js'; import Footer from '@/components/home/Footer.vue'; import Github from '@/components/home/icons/Github.vue'; import Badge from '@/components/Badge.vue'; </script>
Resource Hub

Directus Documentation

Explore our resources and powerful data engine to build your projects confidently.

Get Started GitHub

<template #fetch-items>

import { createDirectus, rest, readItems } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest());

const item = await client.request(
	readItems('articles', {
		fields: ['id', 'title', 'date_published', 'summary']
	})
);
import { createDirectus, rest, createItem } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest());

const item = await client.request(
	createItem('articles', {
		title: 'Hello, world!',
		summary: 'This is my next big thing.'
	})
);
import { createDirectus, rest, createUser } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest());

const newUser = await client.request(
	createUser({
		email: 'user@example.com',
		password: 'd1r3ctu5'
	})
);

const user = await client.login('user@example.com', 'd1r3ctu5');
import { createDirectus, realtime } from '@directus/sdk'
const client = createDirectus('https://xyz.directus.app').with(realtime({ authMode: 'public' }));

const { subscription } = await client.subscribe('messages');

for await (const item of subscription) {
	console.log(item);
}

Latest From The Blog

Project tutorials, tips & tricks, and best practices from the Directus team and community.

View All Posts

We 💜 Your Framework

Combine Directus with your favorite framework to create flexible and fast web applications.

View All Guides

Self Hosted Directus

Learn how to run Directus on your own machine, customize settings, and deploy with confidence.

Contributing to Directus

There are many ways in which you can contribute to the health and growth of the Directus project.

Join the Community GitHub
<style module> @import './home.css'; </style>