diff --git a/docs/src/pages/faqs/index.mdx b/docs/src/pages/faqs/index.mdx
index 783c1414..f908cd19 100644
--- a/docs/src/pages/faqs/index.mdx
+++ b/docs/src/pages/faqs/index.mdx
@@ -3,18 +3,20 @@
[MDX]: https://github.com/mdx-js/mdx
[Astro]: https://docs.astro.build/core-concepts/component-hydration
[VitePress]: https://vitepress.vuejs.org/
-[vite-ssg]: https://github.com/antfu/vite-ssg
+[Vite-SSG]: https://github.com/antfu-collective/vite-ssg
[vite-plugin-pages]: https://github.com/hannoeru/vite-plugin-pages
[unplugin-vue-components]: https://github.com/antfu/unplugin-vue-components
+[unplugin-auto-import]: https://github.com/unplugin/unplugin-auto-import
[frameworks]: /guide/frameworks
-[hydration]: /guide/hydration
-[islands]: https://jasonformat.com/islands-architecture/
+[islands]: /guide/islands
[manually]: https://github.com/ElMassimo/iles/blob/main/playground/the-vue-point/src/pages/posts/%5Bpage%5D.vue
[podcast]: https://dev.to/viewsonvue/islands-architecture-in-vue-with-maximo-mussini-vue-170
[prettyUrls]: /config#prettyurls
+[vue-router]: https://next.router.vuejs.org/
+[@unhead/vue]: https://unhead.unjs.io/setup/vue/installation
# FAQs
@@ -52,16 +54,16 @@ Would like to hear more? [Listen to this recent podcast][podcast].
Love VitePress! Highly recommend it for most documentation websites. This site
uses mostly for dogfooding purposes.
-The main difference is that supports [partial hydration][hydration], so
+The main difference is that supports [partial hydration][islands], so
you can ship JS only for the interactive parts of the page. Currently, partial
hydration in VitePress is a manual process, and its default mode is targeted at
building single-page applications.
VitePress has an MPA mode to strip away all JS. In that happens
-automatically if you don't use [hydration directives][hydration].
+automatically if you don't use [hydration directives][islands].
-Use VitePress if you are building a documentation website, don't need [partial hydration][hydration], or if it has to be a single-page application.
+Use VitePress if you are building a documentation website, don't need [partial hydration][islands], or if it has to be a single-page application.
@@ -70,19 +72,19 @@ When migrating an existing site from VitePress to , you might want to dis
### [Astro]
-Astro is the main inspiration for [partial hydration][hydration] in .
+Astro is the main inspiration for [partial hydration][islands] in .
Now that Astro is moving to Vite.js, the differences will become smaller.
The following is a list of features and differences to help you compare:
-- Astro uses an `.astro` file format. In you use [Vue or MDX pages](/guide/development#pages)
-- provides an [inspector panel](https://user-images.githubusercontent.com/1158253/133314267-f0ba784c-ff64-4ee8-b2bf-97ecffc2facd.jpg) in Vue devtools to inspect page data and [hydration](https://user-images.githubusercontent.com/1158253/133314279-1edc22d1-3ffb-414e-b994-212cb316593b.jpg)
-- Pages in have access to [frontmatter and file metadata](/guide/development#using-page-data)
+- Astro uses an `.astro` file format. In you use [Vue or MDX pages](/guide/project-structure#pages)
+- provides an [inspector panel](https://user-images.githubusercontent.com/1158253/133314267-f0ba784c-ff64-4ee8-b2bf-97ecffc2facd.jpg) in Vue devtools to inspect page data and [islands](https://user-images.githubusercontent.com/1158253/133314279-1edc22d1-3ffb-414e-b994-212cb316593b.jpg)
+- Pages in have access to [frontmatter and file metadata](/guide/project-structure#using-page-data)
- You can [glob import](/guide/documents) pages in , access their frontmatter, and render them
-- provides [auto-import for components](/guide/development#components) in Vue and MDX files
+- provides [auto-import for components](/guide/project-structure#components) in Vue and MDX files
- Astro provides a `paginate` helper. In you have to do that [manually].
-- supports a [convenient syntax for layouts](/guide/development#layouts). In Astro you manually import and use components as layouts
+- supports a [convenient syntax for layouts](/guide/project-structure#layouts). In Astro you manually import and use components as layouts
- has a very refined HMR, even site-wide data is automatically reloaded
@@ -96,9 +98,7 @@ Use Astro if you are not familiar with Vue, or don't like its template syntax.
- [MDX]: provides amazing flexibility when processing Markdown
- [vue-router], [@unhead/vue], and [vite-plugin-pages]: the backbone of this library
- [unplugin-vue-components]: allows you to avoid the boilerplate
-- [VitePress] and [vite-ssg]: for their different ideas on SSR
-
-[vue-router]: https://next.router.vuejs.org/
-[@unhead/vue]: https://github.com/@unhead/vue
+- [unplugin-auto-import]: lets you focus on building your site
+- [VitePress] and [Vite-SSG]: for their different ideas on SSR
diff --git a/docs/src/pages/faqs/troubleshooting.mdx b/docs/src/pages/faqs/troubleshooting.mdx
index 848fa787..97e158df 100644
--- a/docs/src/pages/faqs/troubleshooting.mdx
+++ b/docs/src/pages/faqs/troubleshooting.mdx
@@ -1,6 +1,6 @@
[GitHub Issues]: https://github.com/ElMassimo/iles/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
[GitHub Discussions]: https://github.com/ElMassimo/iles/discussions
-[layout]: /guide/development#layouts
+[layout]: /guide/project-structure#layouts
[deployment]: /guide/deployment
# Troubleshooting
diff --git a/docs/src/pages/guide/client-scripts.mdx b/docs/src/pages/guide/client-scripts.mdx
index 31c127ed..30dea206 100644
--- a/docs/src/pages/guide/client-scripts.mdx
+++ b/docs/src/pages/guide/client-scripts.mdx
@@ -64,7 +64,7 @@ choose where to place them by rendering them as islands.
```vue
diff --git a/docs/src/pages/guide/development.mdx b/docs/src/pages/guide/development.mdx
deleted file mode 100644
index 6598855d..00000000
--- a/docs/src/pages/guide/development.mdx
+++ /dev/null
@@ -1,213 +0,0 @@
-[srcDir]: /config#srcDir
-[devtools1]: https://user-images.githubusercontent.com/1158253/133314267-f0ba784c-ff64-4ee8-b2bf-97ecffc2facd.jpg
-[devtools2]: https://user-images.githubusercontent.com/1158253/133314279-1edc22d1-3ffb-414e-b994-212cb316593b.jpg
-[MDX]: /guide/markdown
-[glob]: https://vitejs.dev/guide/features.html#glob-import
-[config]: /config#configuring-%C3%AEles
-[frontmatter]: /guide/markdown#frontmatter-and-meta
-[routing]: /guide/routing
-[hydration]: /guide/hydration
-[siteUrl]: /config#siteurl
-[useDocuments]: /guide/documents
-[frameworks]: /guide/frameworks
-
-# Development 💻
-
-In this section, we'll cover the basics to start building an application.
-
-## Default App Structure 📂
-
-
-
-By default, [srcDir] is aliased as `~/` or `@/`. For example:
-
-```ts
-import { useDark } from '~/logic/dark'
-```
-
-```vue
-
-```
-
-## Components 🧱
-
-Components in the src/components dir will be auto-imported on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components).
-
- extends this so that you don't need to import components in [MDX files][mdx].
-
-## Pages 🛣
-
-[Routes will be auto-generated][routing] for files in the src/pages dir with the same file structure.
-
-Pages can be Vue components or [MDX files][mdx], and may specify frontmatter and route metadata.
-
-You may use [components][frameworks] inside [MDX], and access any properties defined in the [frontmatter]:
-
-```mdx
----
-title: Song for You
-audio: /song-for-you.mp3
----
-
-I've recently recorded a song, listen:
-
-
-```
-
-In Vue single-file components you can use a `` block to define frontmatter:
-
-```vue
-
-title: Song for You
-audio: /song-for-you.mp3
-
-
-
-
I've recently recorded a song, listen:
-
-
-
-```
-
-
-
-### Using Page Data
-
-You may access information about the current page using the `usePage` composition API helper, or by using the `$frontmatter` or `$meta` global properties.
-
-- `frontmatter`: The [frontmatter] of an [MDX][frontmatter] document or Vue component (in ``)
-- `meta`: Information about the page, including `href`, `filename`, and `lastUpdated`
-
-```vue
-
-```
-
-
-
-
-### Glob Imports
-
-When rendering collections or index pages, you can leverage [useDocuments] to conveniently access multiple page components and their data.
-
-```ts {2}
-export function usePosts () {
- const posts = useDocuments('~/pages/posts')
- return computed(() => posts.value.sort(byDate))
-}
-```
-
-Page data is available directly in the component modules:
-
-```vue
-
-
-
-
-
-
-
-```
-
-## Layouts 📐
-
-Components in the src/layouts dir will be available as layouts, and they should provide a default ``.
-
-Pages may specify a layout using the `layout` property in frontmatter:
-
-```md
----
-layout: post
----
-```
-
-Layouts and Vue pages can also specify a parent layout using a `layout` attribute in the `template`:
-
-```vue
-
-```
-
-> The `default` layout will be used for all pages unless specified.
->
-> Pages may opt-out by specifying `layout: false`
-
-
-Layout files must be lowercase, as in `post.vue` or `default.vue`.
-
-
-## Site 🌐
-
-`src/site.ts` can be used to provide site-wide information such as `title`, `description`, etc.
-
-It can be accessed as `$site` in component instances, or by using `usePage`.
-
-It's also displayed in the page information in _Islands_ devtools.
-
-```ts
-export default {
- title: 'About',
- description: 'Learn more about what we do',
-}
-```
-
-### Sitemap 🗺
-
-A sitemap can be automatically generated for your site, all you need to do is
-configure [siteUrl]. That will also make it available as `site.url` and `site.canonical`.
-
-```ts
-import { defineConfig } from 'iles'
-
-export default defineConfig({
- siteUrl: 'https://iles-docs.netlify.app',
-})
-```
-
-If you would like to opt-out, you can [disable it explicitly][config]:
-
-```ts
-export default defineConfig({
- ssg: {
- sitemap: false
- },
-})
-```
-
-## Devtools 🛠
-
-Page information is available in a debug panel, similar to VitePress, but you may also access an _Islands_ inspector in Vue devtools.
-
-This can be useful when debugging [islands hydration][hydration].
diff --git a/docs/src/pages/guide/documents.mdx b/docs/src/pages/guide/documents.mdx
index 2be89bb0..6cb12c0a 100644
--- a/docs/src/pages/guide/documents.mdx
+++ b/docs/src/pages/guide/documents.mdx
@@ -1,6 +1,6 @@
[glob]: https://vitejs.dev/guide/features.html#glob-import
[mdx documents]: /guide/markdown
-[pageData]: /guide/development#using-page-data
+[pageData]: /guide/project-structure#using-page-data
[ref sugar]: https://github.com/vuejs/rfcs/discussions/369
# Documents 🗃
@@ -76,7 +76,7 @@ post.meta // PageMeta
post.frontmatter // PageFrontmatter
```
-## Ref Sugar (experimental in Vue)
+## Ref value
Since useDocuments returns a `Ref`, when accessing documents in a script you would do:
diff --git a/docs/src/pages/guide/frameworks.mdx b/docs/src/pages/guide/frameworks.mdx
index 1d3a378f..0ec938d8 100644
--- a/docs/src/pages/guide/frameworks.mdx
+++ b/docs/src/pages/guide/frameworks.mdx
@@ -1,12 +1,12 @@
-[hydration]: /guide/hydration
-[client:none]: /guide/hydration#clientnone
+[islands]: /guide/islands
+[client:none]: /guide/islands#clientnone
[mdx files]: /guide/markdown
-[Vue]: /guide/plugins#vitejsplugin-vue
-[Preact]: /guide/plugins#preactpreset-vite
-[SolidJS]: /guide/plugins#vite-plugin-solid
-[Svelte]: /guide/plugins#sveltejsvite-plugin-svelte
-[vanilla JS]: /guide/client-scripts#vanilla-components
+[Vue]: /guide/modules#vitejsplugin-vue
+[Preact]: /guide/modules#preactpreset-vite
+[SolidJS]: /guide/modules#vite-plugin-solid
+[Svelte]: /guide/modules#sveltejsvite-plugin-svelte
+[vanilla JS]: /guide/islands#vanilla-components
[useDark]: https://vueuse.org/core/usedark/
@@ -23,7 +23,7 @@ Components from the following frameworks can be embedded in [Vue] and [MDX files
- [Vanilla JS]
-You must add a [hydration directive][hydration] when using non-Vue components in Vue and [MDX files].
+You must add a [hydration directive][islands] when using non-Vue components in Vue and [MDX files].
> No JS is shipped if you use [client:none] 🏝
@@ -31,7 +31,7 @@ You must add a [hydration directive][hydration] when using non-Vue components in
## Choosing a Framework 🤔
While Vue is the natural choice given that pages and layouts in are Vue components,
-you might want to use a framework with a smaller runtime for the [interactive bits][hydration].
+you might want to use a framework with a smaller runtime for the [interactive bits][islands].
For efficiency, you would want all islands to use the same framework, to offset
the size of the runtime.
diff --git a/docs/src/pages/guide/head-and-meta.mdx b/docs/src/pages/guide/head-and-meta.mdx
new file mode 100644
index 00000000..fd7c82e6
--- /dev/null
+++ b/docs/src/pages/guide/head-and-meta.mdx
@@ -0,0 +1,132 @@
+[@unhead/vue]: https://unhead.unjs.io/setup/vue/installation
+[app]: /guide/project-structure#app-2
+[useHead]: https://unhead.unjs.io/usage/composables/use-head
+[useSeoMeta]: https://unhead.unjs.io/usage/composables/use-seo-meta
+[Head]: https://unhead.unjs.io/setup/vue/components
+[site]: /guide/project-structure#site
+[frontmatter]: /guide/project-structure#pages
+
+# Head and Meta Tags 🏷
+
+ will use [site] data such as `title` and `description` and combine them
+with page titles—specified in [frontmatter]—to set reasonable default values
+for commonly used meta tags.
+
+There are several ways to customize `title` and `meta` tags in , powered by [@unhead/vue].
+
+## `useHead` Composable
+
+[useHead] can be used within the `setup` function or `
+```
+
+> `useHead` options support both static values and reactive variables, such as `ref`, `computed`, and `reactive`.
+
+## `useSeoMeta` Composable
+
+[useSeoMeta] can be used within the `setup` function or `
+```
+
+> `useSeoMeta` options support both static values and reactive variables, such as `ref`, `computed`, and `reactive`.
+
+
+
+## `` Component
+
+Besides [useHead](#usehead-composable) and [useSeoMeta](#useseometa-composable), you can also manipulate head tags using the [``][Head] component:
+
+```vue
+
+
+ Hello World
+
+
+
+
+
+```
+
+This is often more intuitive, specially for dynamic values.
+
+## App Meta Tags
+
+Finally, you can use `head` in [src/app.ts][app], which supports the
+same format as [useHead](#usehead-composable).
+
+```ts
+import { defineApp } from 'iles'
+
+export default defineApp({
+ head: {
+ htmlAttrs: { lang: 'en-US' },
+ bodyAttrs: { class: 'dark-mode', 'data-theme': 'light' },
+ },
+})
+```
+
+If you need access to the site or page, you can provide a function instead:
+
+```ts
+import { defineApp } from 'iles'
+
+export default defineApp({
+ head ({ frontmatter, site }) {
+ return {
+ meta: [
+ { property: 'author', content: site.author },
+ { property: 'keywords', content: () => frontmatter.tags },
+ ]
+ }
+ },
+})
+```
diff --git a/docs/src/pages/guide/hydration.mdx b/docs/src/pages/guide/hydration.mdx
deleted file mode 100644
index 7d2b3cdd..00000000
--- a/docs/src/pages/guide/hydration.mdx
+++ /dev/null
@@ -1,100 +0,0 @@
-[Partial Hydration]: https://jasonformat.com/islands-architecture/
-[Astro]: https://docs.astro.build/core-concepts/component-hydration
-[requestIdleCallback]: https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
-[intersectionobserver]: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
-[matchMedia]: https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
-
-[Preact]: /guide/plugins#preactpreset-vite
-[SolidJS]: /guide/plugins#vite-plugin-solid
-[Svelte]: /guide/plugins#sveltejsvite-plugin-svelte
-
-# Hydration Directives
-
-You can define which components should remain interactive in the production
-build by using `client:` directives in your components (borrowed from [Astro]).
-
-Any JS required for these components will be automatically inferred and optimized to perform partial hydration in the final build.
-
-> No JS is shipped unless you use a hydration strategy! 🏝
-
-Here's an example with MDX, an interactive audio player in a mostly static page:
-
-```mdx
----
-title: Song for You
-audio: /song-for-you.mp3
----
-
-I've recently recorded a song, listen:
-
-
-```
-
-You can also use these directives inside your Vue components. In the following
-example, the _Download_ link is rendered statically, while the `