diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs
index aa5a281..ea22a06 100644
--- a/docs/astro.config.mjs
+++ b/docs/astro.config.mjs
@@ -18,27 +18,39 @@ export default defineConfig({
link: '/getting-started/',
},
{
- label: 'Storage Plugins',
+ label: 'Plugins',
items: [
- { label: 'Introduction', link: '/storage/' },
- { label: 'File System', link: '/storage/file-system/' },
- { label: 'MySQL', link: '/storage/mysql/' },
- ],
- },
- {
- label: 'Loader Plugins',
- items: [
- { label: 'Introduction', link: '/loaders/' },
- { label: 'Default Loader', link: '/loaders/default/' },
- { label: 'MySQL Loader', link: '/loaders/mysql/' },
- ],
- },
- {
- label: 'Reporters',
- items: [
- { label: 'Introduction', link: '/reporters/' },
- { label: 'Default Reporter', link: '/reporters/default/', badge: 'WIP' },
- { label: 'Pino Reporter', link: '/reporters/pino/', badge: 'WIP' },
+ {
+ label: 'Introduction',
+ link: '/plugins/',
+ },
+ {
+ label: 'Storage Plugins',
+ collapsed: true,
+ items: [
+ { label: 'Introduction', link: '/plugins/storage/' },
+ { label: 'File System', link: '/plugins/storage/file-system/' },
+ { label: 'MySQL', link: '/plugins/storage/mysql/' },
+ ],
+ },
+ {
+ label: 'Loader Plugins',
+ collapsed: true,
+ items: [
+ { label: 'Introduction', link: '/plugins/loaders/' },
+ { label: 'Default Loader', link: '/plugins/loaders/default/' },
+ { label: 'MySQL Loader', link: '/plugins/loaders/mysql/' },
+ ],
+ },
+ {
+ label: 'Reporters',
+ collapsed: true,
+ items: [
+ { label: 'Introduction', link: '/plugins/reporters/' },
+ { label: 'Default Reporter', link: '/plugins/reporters/default/', badge: 'WIP' },
+ { label: 'Pino Reporter', link: '/plugins/reporters/pino/', badge: 'WIP' },
+ ],
+ },
],
},
{
diff --git a/docs/src/content/docs/getting-started.mdx b/docs/src/content/docs/getting-started.mdx
index cfad31e..8f44c5d 100644
--- a/docs/src/content/docs/getting-started.mdx
+++ b/docs/src/content/docs/getting-started.mdx
@@ -14,7 +14,7 @@ Emigrate is written in [TypeScript](https://www.typescriptlang.org) and is a dat
* The output can be customized using [Reporters](/reporters/).
:::tip[Did you know?]
-Thanks to the plugin system you can even write migrations in plain SQL! So no need for Java-based tools like Liquibase or Flyway.
+Thanks to [the plugin system](/plugins/) you can even write migrations in plain SQL! So no need for Java-based tools like Liquibase or Flyway.
:::
## Quick Start
@@ -46,10 +46,10 @@ But for now, this is the way to go.
### Pick a storage plugin
-Emigrate uses a storage plugin to store the migration history. You can use one of the following plugins:
+Emigrate uses a [storage plugin](/plugins/storage/) to store the migration history. You can use one of the following plugins:
-- [MySQL](/storage/mysql)
-- [File System](/storage/file-system)
+- [MySQL](/plugins/storage/mysql)
+- [File System](/plugins/storage/file-system)
Install the plugin you want to use, for example:
@@ -95,7 +95,7 @@ Otherwise the file would have the `.js` extension by default.
:::tip[Did you know?]
You can avoid typing `--plugin mysql` by configuring Emigrate using an `emigrate.config.js` file.
-See [Configuration](/configuration) for more information.
+See [Configuration](/configuration/) for more information.
:::
#### Fill the migration file
diff --git a/docs/src/content/docs/plugins/index.mdx b/docs/src/content/docs/plugins/index.mdx
new file mode 100644
index 0000000..0b19dad
--- /dev/null
+++ b/docs/src/content/docs/plugins/index.mdx
@@ -0,0 +1,35 @@
+---
+title: The Plugin System
+---
+
+import { LinkCard } from '@astrojs/starlight/components';
+
+Emigrate uses a plugin system to allow you to extend and customize the functionality so that it fits your needs.
+
+## The types of plugins
+
+Emigrate supports different types of plugins that all have different purposes.
+
+
+
+
+
+
+
+
diff --git a/docs/src/content/docs/loaders/default.mdx b/docs/src/content/docs/plugins/loaders/default.mdx
similarity index 100%
rename from docs/src/content/docs/loaders/default.mdx
rename to docs/src/content/docs/plugins/loaders/default.mdx
diff --git a/docs/src/content/docs/loaders/index.mdx b/docs/src/content/docs/plugins/loaders/index.mdx
similarity index 95%
rename from docs/src/content/docs/loaders/index.mdx
rename to docs/src/content/docs/plugins/loaders/index.mdx
index ddbf52d..3b0bde7 100644
--- a/docs/src/content/docs/loaders/index.mdx
+++ b/docs/src/content/docs/plugins/loaders/index.mdx
@@ -19,7 +19,7 @@ npx emigrate up --plugin mysql
Or set it up in your configuration file, see [Plugin configuration](/reference/configuration/#plugins) for more information.
:::tip[Did you know?]
-You can specify multiple loader plugins at the same time, which is needed when you mix file types in your migrations.
+You can specify multiple loader plugins at the same time, which is needed when you mix file types in your migrations folder.
For example, you can use the `mysql` loader for `.sql` files and the `typescript` loader for `.ts` files.
The [default loader](/loaders/default/) will be used for all other file types, and doesn't need to be specified.
:::
diff --git a/docs/src/content/docs/loaders/mysql.mdx b/docs/src/content/docs/plugins/loaders/mysql.mdx
similarity index 100%
rename from docs/src/content/docs/loaders/mysql.mdx
rename to docs/src/content/docs/plugins/loaders/mysql.mdx
diff --git a/docs/src/content/docs/reporters/default.mdx b/docs/src/content/docs/plugins/reporters/default.mdx
similarity index 100%
rename from docs/src/content/docs/reporters/default.mdx
rename to docs/src/content/docs/plugins/reporters/default.mdx
diff --git a/docs/src/content/docs/reporters/index.mdx b/docs/src/content/docs/plugins/reporters/index.mdx
similarity index 100%
rename from docs/src/content/docs/reporters/index.mdx
rename to docs/src/content/docs/plugins/reporters/index.mdx
diff --git a/docs/src/content/docs/reporters/pino.mdx b/docs/src/content/docs/plugins/reporters/pino.mdx
similarity index 100%
rename from docs/src/content/docs/reporters/pino.mdx
rename to docs/src/content/docs/plugins/reporters/pino.mdx
diff --git a/docs/src/content/docs/storage/file-system.mdx b/docs/src/content/docs/plugins/storage/file-system.mdx
similarity index 100%
rename from docs/src/content/docs/storage/file-system.mdx
rename to docs/src/content/docs/plugins/storage/file-system.mdx
diff --git a/docs/src/content/docs/storage/index.mdx b/docs/src/content/docs/plugins/storage/index.mdx
similarity index 100%
rename from docs/src/content/docs/storage/index.mdx
rename to docs/src/content/docs/plugins/storage/index.mdx
diff --git a/docs/src/content/docs/storage/mysql.mdx b/docs/src/content/docs/plugins/storage/mysql.mdx
similarity index 100%
rename from docs/src/content/docs/storage/mysql.mdx
rename to docs/src/content/docs/plugins/storage/mysql.mdx