-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor import paths for consistency and update documentation descri…
…ptions
- Loading branch information
1 parent
08545d6
commit 2d714c3
Showing
38 changed files
with
442 additions
and
327 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
--- | ||
i18nReady: true | ||
title: "How it works" | ||
description: "Learn how StudioCMS helps you manage and deliver your content by exploring a comprehensive breakdown of it's fundamental components." | ||
sidebar: | ||
order: 1 | ||
badge: | ||
text: "Updated" | ||
variant: "success" | ||
--- | ||
|
||
# Introduction | ||
|
||
StudioCMS is a powerful CMS built for Astro that allows you to manage and serve your content using [Astro DB](https://docs.astro.build/en/guides/astro-db/). It's designed to be easy-to-use and flexible enough to handle any type of content. | ||
|
||
Extending StudioCMS is easy too! You can create your own plugins to add new features to StudioCMS. | ||
|
||
## How does it work? | ||
|
||
StudioCMS is divided into multiple parts: | ||
|
||
- **studiocms**: The primary integration that hooks into your Astro project and provides the ability to interact with Astro DB (through the `@astrojs/db` integration). | ||
- **@studiocms/core**: The core integration that provides the foundation for StudioCMS. It provides the database configurations, and adds various features including virtual imports, logging, etc. | ||
- **@studiocms/auth**: An integration that provides authentication configuration options for the StudioCMS Dashboard. | ||
- **@studiocms/assets**: An integration that provides the assets for the StudioCMS Dashboard. | ||
- **@studiocms/frontend**: An integration that provides the frontend layouts and components for the StudioCMS ecosystem. | ||
- **@studiocms/renderers**: An integration that provides the renderers for the StudioCMS ecosystem. | ||
- **@studiocms/dashboard**: The primary web interface for managing your StudioCMS project. It provides a user-friendly interface for creating, editing, and deleting content. | ||
- **@studiocms/imagehandler**: An integration that provides a `<CustomImage />` component to handle remote images and optimize them for your project in an SSR environment. | ||
- **@studiocms/robotstxt**: An integration that automates the creation of a `robots.txt` file for your StudioCMS project. | ||
- **@studiocms/betaresources**: An integration that provides resources for the StudioCMS beta. | ||
|
||
## Breakdown | ||
|
||
### StudioCMS: Core | ||
|
||
StudioCMS Core is an Astro Integration which provides a comprehensive CMS solution out-of-the-box. This integration registers StudioCMS as the first plugin, sets up database configurations, watches for configuration changes, and adds various features including virtual imports, logging, and default frontend routes. | ||
|
||
#### Features | ||
|
||
- **@astrojs/db**: StudioCMS Core uses the `@astrojs/db` integration to connect to a libSQL database. | ||
- **Virtual Imports**: StudioCMS Core adds several [virtual modules](https://vitejs.dev/guide/api-plugin#virtual-modules-convention) packed with features that give you full control over your dynamic content. | ||
- **Logging**: StudioCMS Core logs all changes to Astro Studio. This can be enabled in your config file. | ||
- **Default Frontend Routes**: The StudioCMS Core integration adds default frontend routes to your Astro project to allow for easy access to the StudioCMS dashboard. | ||
- **Plugin System**: You can extend StudioCMS using plugins to add additional functionality. | ||
|
||
#### Core Virtual Modules | ||
|
||
:::tip | ||
Modules prefixed with `virtual:` are virtual modules that are primarily used internally by StudioCMS, but can be used by developers to access StudioCMS data. To access these modules with proper typings, see the [project development `.d.ts` file](https://github.com/withstudiocms/studiocms/blob/main/packages/studiocms_core/virtuals.d.ts) for an example of how to configure your project to sense these types. | ||
|
||
Modules without the `virtual:` prefix have full typings defined and injected into your project's `.astro/` directory automatically, and can be accessed directly without any extra configuration. | ||
::: | ||
|
||
- **`virtual:studiocms/config`**: Provides the resolved configuration for the StudioCMS integration ecosystem. | ||
- **`virtual:studiocms/version`**: Provides the current version of the StudioCMS integration ecosystem. | ||
- **`virtual:studiocms/pluginSystem`**: Provides the plugin system interfaces during runtime for StudioCMS. | ||
- **`studiocms:components`**: Provides the front-end exported components for StudioCMS. | ||
- **`studiocms:helpers`**: Provides the front-end exported helper functions for StudioCMS. | ||
- **`studiocms:helpers/contentHelper`**: Provides the exported content helper functions for StudioCMS. | ||
- **`studiocms:helpers/headDefaults`**: Provides the exported head defaults for StudioCMS. | ||
- **`studiocms:helpers/routemap`**: Provides the exported route map for StudioCMS. | ||
- **`studiocms:i18n`**: Provides the i18n utilities for StudioCMS. | ||
|
||
### StudioCMS: Auth | ||
|
||
The StudioCMS Auth integration provides authentication configuration options for the StudioCMS Dashboard. This integration is used to determine how users can authenticate with the StudioCMS Dashboard. | ||
|
||
#### Features | ||
- **`@oslojs`**: The StudioCMS Auth integration uses the `@oslojs` utilities to handle local authentication options such as username and password. | ||
- **`arctic`**: The StudioCMS Auth integration uses the `arctic` library to handle OAuth authentication options such as GitHub. | ||
- **`three`**: The StudioCMS Auth integration uses the ThreeJS library to create a 3D logo animation for the login and # pages. | ||
- **`@studiocms/ui`**: The StudioCMS Auth integration uses the `@studiocms/ui` library to provide UI components for the login and # pages. | ||
|
||
#### Auth Virtual Modules | ||
|
||
- **`studiocms:auth/lib/encryption`**: Provides encryption functions for the StudioCMS Auth integration. | ||
- **`studiocms:auth/lib/password`**: Provides password functions for the StudioCMS Auth integration. | ||
- **`studiocms:auth/lib/session`**: Provides session functions for the StudioCMS Auth integration. | ||
- **`studiocms:auth/lib/types`**: Provides types for the StudioCMS Auth integration. | ||
- **`studiocms:auth/lib/user`**: Provides user functions for the StudioCMS Auth integration. | ||
- **`studiocms:auth/utils/authEnvCheck`**: Provides authentication environment check functions for the StudioCMS Auth integration. | ||
- **`studiocms:auth/scripts/three`**: Provides ThreeJS scripts for the StudioCMS Auth integration. | ||
- **`studiocms:auth/scripts/formListener`**: Provides form listener scripts for the StudioCMS Auth integration. | ||
|
||
### StudioCMS: Dashboard | ||
|
||
The StudioCMS Dashboard is a web interface that allows you to manage your StudioCMS project. It provides a user-friendly interface for creating, editing, and deleting content for your project. The StudioCMS Dashboard is built with [Astro](https://astro.build) and our [`@studiocms/ui](/customizing/studiocms-ui/) library. | ||
|
||
#### Tech Stack | ||
|
||
- **Dashboard**: The StudioCMS Dashboard provides a user-friendly interface for managing your StudioCMS project. | ||
- **AuthConfig**: The StudioCMS Dashboard provides authentication configuration options. | ||
- **DashboardRouteOverride**: The StudioCMS Dashboard provides a dashboard route override configuration option. Allowing you to change the default route for the StudioCMS Dashboard and API. | ||
|
||
### StudioCMS: ImageHandler | ||
|
||
The StudioCMS ImageHandler is an integration that provides a custom image component for your Astro project. This component is used to handle remote images and optimize them in a SSR environment. | ||
|
||
#### Features | ||
|
||
- **`<CustomImage />`**: The StudioCMS ImageHandler provides a custom image component for your Astro project. | ||
|
||
#### ImageHandler Virtual Modules | ||
|
||
- **`studiocms:imageHandler/components`**: The Virtual module that provides the exported image components for the StudioCMS ImageHandler. | ||
|
||
### StudioCMS: Renderers | ||
|
||
The StudioCMS Renderers integration provides the renderers for the StudioCMS ecosystem. This integration is used to determine how content should be rendered in StudioCMS. | ||
|
||
#### Renderers Virtual Modules | ||
|
||
- **`studiocms:renderer`**: Provides the main renderer component for the StudioCMS ecosystem. | ||
- **`studiocms:renderer/config`**: Provides the configuration for the StudioCMS renderer. | ||
- **`studiocms:renderer/astroMarkdownConfig`**: Provides the configuration for Astro Markdown support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.