studiocms 0.1.0-beta.5 → 0.1.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +15 -101
  2. package/package.json +21 -20
  3. package/src/integration.ts +50 -14
package/README.md CHANGED
@@ -1,137 +1,51 @@
1
- # Introducing AstroStudio CMS: A Community-Driven CMS for Astro Studio
1
+ # Introducing StudioCMS: A Community-Driven CMS for Astro DB
2
2
 
3
- As part of our efforts, we're excited to introduce AstroStudio CMS - a dedicated content management system (CMS) built on top of Astro's latest product, [Astro Studio](https://studio.astro.build). This project was developed by [Adam](https://github.com/Adammatthiesen), [Dreyfus](https://github.com/dreyfus92), and [Jumper](https://github.com/jdtjenkins), three passionate members of the Astro community.
3
+ As part of our efforts, we're excited to introduce StudioCMS - a dedicated content management system (CMS) built on top of Astro's latest feature, [Astro DB](https://studio.astro.build). This project was developed by [Adam](https://github.com/Adammatthiesen), [Dreyfus](https://github.com/dreyfus92), and [Jumper](https://github.com/jdtjenkins), three passionate members of the Astro community.
4
4
 
5
5
  ## Why another CMS?
6
6
 
7
7
  While Astro's content capabilities are powerful, we recognized a need for a more streamlined and user-friendly CMS solution within the Astro ecosystem. Many Astro users, especially those coming from more traditional CMS backgrounds, have expressed a desire for a dedicated CMS that can seamlessly integrate with Astro projects.
8
8
 
9
- AstroStudio CMS was born out of this need, providing a content management platform that is tailor-made for Astro. By building on top of Astro Studio, we're able to offer a CMS experience that feels native to the Astro workflow, making it easier for both developers and content creators to collaborate on Astro-powered projects.
9
+ StudioCMS was born out of this need, providing a content management platform that is tailor-made for Astro. By building on top of Astro DB, we're able to offer a CMS experience that feels native to the Astro workflow, making it easier for both developers and content creators to collaborate on Astro-powered projects.
10
10
 
11
11
  ## An Experimental Endeavor
12
12
 
13
- It's important to note that AstroStudio CMS is an experimental project that heavily relies on the @astrojs/db package, which is currently in active development and not yet considered stable. As a result, you should expect a significant number of breaking changes as the project continues to evolve.
13
+ It's important to note that StudioCMS is an experimental project that heavily relies on the `@astrojs/db` package, which is currently in active development and not yet considered stable. As a result, you should expect a significant number of breaking changes as the project continues to evolve.
14
14
 
15
- We believe that by building on the cutting-edge features of Astro Studio, we can create a powerful and innovative CMS solution. However, this also means that AstroStudio CMS may not be suitable for mission-critical or production-ready projects at this stage. We encourage you to use caution and thoroughly test the CMS in your own projects before deploying it to a live environment.
15
+ We believe that by building on the cutting-edge features of Astro DB, we can create a powerful and innovative CMS solution. However, this also means that StudioCMS may not be suitable for mission-critical or production-ready projects at this stage. We encourage you to use caution and thoroughly test the CMS in your own projects before deploying it to a live environment.
16
16
 
17
17
 
18
18
  ## Leveraging the Power of Astro
19
19
 
20
- AstroStudio CMS is built from the ground up to seamlessly integrate with Astro's robust and efficient framework. By harnessing the power of Astro, we've created a CMS solution that aligns perfectly with the Astro ecosystem, providing a solid foundation for building and scaling Astro-powered applications.
20
+ StudioCMS is built from the ground up to seamlessly integrate with Astro's robust and efficient framework. By harnessing the power of Astro, we've created a CMS solution that aligns perfectly with the Astro ecosystem, providing a solid foundation for building and scaling Astro-powered applications.
21
21
 
22
22
  ## Key Features
23
23
 
24
- **Astro Foundation:** Astrolicious leverages Astro's robust and efficient framework, providing a solid base for building and scaling applications.
24
+ **Astro Foundation:** StudioCMS leverages Astro's robust and efficient framework, providing a solid base for building and scaling applications.
25
25
 
26
26
  **Enhanced Markdown:** We've incorporated 'Marked' with support for extensions, enriching the markdown experience with greater flexibility and functionality.
27
27
 
28
- **Shiki Syntax Highlighting:** Astrolicious offers Shiki-powered syntax highlighting, ensuring your code is both visually appealing and easy to read. This is especially useful in non-Cloudflare environments due to bundle size considerations.
28
+ **Shiki Syntax Highlighting:** StudioCMS offers Shiki-powered syntax highlighting, ensuring your code is both visually appealing and easy to read. This is especially useful in non-Cloudflare environments due to bundle size considerations.
29
29
 
30
- **Markdoc Integration:** In addition to 'Marked', Astrolicious provides an alternative with Markdoc, offering users a choice for their markdown processing needs.
30
+ **Markdoc Integration:** In addition to 'Marked', StudioCMS provides an alternative with Markdoc, offering users a choice for their markdown processing needs.
31
31
 
32
- **Secure Studio Database:** All data is securely housed within the Astro Studio database, ensuring accessibility only to authorized users with studio.astro.build login credentials.
32
+ **Built-in Authentication:** StudioCMS features built-in authentication with support for multiple platforms, including Local and Github, enhancing security and user management (currently in development).
33
33
 
34
- **Built-in Authentication:** Astrolicious features built-in authentication with support for multiple platforms, including Local and Github, enhancing security and user management (currently in development).
35
-
36
- **Unpic Image Service:** Astrolicious includes a free and efficient image service, Unpic, which makes managing external URLs straightforward, with support for major CDNs.
34
+ **Unpic Image Service:** StudioCMS includes a free and efficient image service, Unpic, which makes managing external URLs straightforward, with support for major CDNs.
37
35
 
38
36
  ## A Community-Driven Effort
39
37
 
40
- At the heart of Astrolicious is a deep commitment to community involvement and collaboration. We believe that the development of AstroStudio CMS should be a collective effort, drawing on the diverse talents and perspectives of the Astro community.
38
+ At the heart of Astrolicious is a deep commitment to community involvement and collaboration. We believe that the development of StudioCMS should be a collective effort, drawing on the diverse talents and perspectives of the Astro community.
41
39
 
42
40
  To that end, we've handed the repository Astrolicious as an open organization, welcoming contributors of all skill levels to get involved and help shape the future of this CMS. Whether you're a seasoned Astro developer or new to the ecosystem, we encourage you to join our [Discord server](https://chat.astrolicious.dev/) and explore ways to contribute.
43
41
 
44
42
  By fostering a sense of shared ownership and investment, we aim to create a CMS that truly reflects the needs and desires of the Astro community. Your feedback, ideas, and code contributions will be invaluable as we work to build a feature-rich and user-friendly content management solution for Astro.
45
43
 
46
- So don't be a stranger - come join us on this journey and help us realize the full potential of AstroStudio CMS!
47
-
48
- # Installation
49
-
50
- Start from a clean Astro installation with AstroDB
51
-
52
- Example with pnpm
53
-
54
- ```sh
55
- # create a new project with pnpm
56
- pnpm create astro@latest
57
- ```
58
-
59
- ```sh
60
- # add astrodb
61
- pnpm astro add db
62
- ```
63
-
64
- ```sh
65
- # Add Astro-Studio-CMS
66
- pnpm astro add @astrolicious/studiocms
67
- ```
68
-
69
- ## Authentication
70
-
71
- Lucia Auth - requires two .env tokens to create the connection between Github and your Auth
72
-
73
- ```
74
- # credentials for GitHub OAuth App
75
- CMS_GITHUB_CLIENT_ID=
76
- CMS_GITHUB_CLIENT_SECRET=
77
-
78
- # OPTIONALS
79
- ## Cloudinary Javascript SDK
80
- CMS_CLOUDINARY_CLOUDNAME="demo"
81
- ```
82
-
83
- When you setup the Github Oauth App for these keys use the following for the setup:
84
-
85
- For Local dev to work:
86
-
87
- Homepage URL: http://localhost:4321
88
- Authorization callback URL: http://localhost:4321/dashboard/login/github/callback
89
-
90
- For going to Production:
91
-
92
- Homepage URL: https://example.com
93
- Authorization callback URL: https://example.com/dashboard/login/github/callback
94
-
95
- ## Configuration
96
-
97
- Your `astro.config.mjs` should look like the following
98
-
99
- > Note: Admins are currently defined by their Github Usernames!
100
-
101
- ```mjs
102
- import { defineConfig } from "astro/config";
103
- import studioCMS from "@astrolicious/studiocms";
104
- import db from '@astrojs/db';
105
- import node from "@astrojs/node";
106
-
107
- // https://astro.build/config
108
- export default defineConfig({
109
- site: 'https://example.com',
110
- output: "server",
111
- adapter: node({ mode: 'standalone' }),
112
- integrations: [
113
- db(),
114
- studioCMS({
115
- dbStartPage: true // DEFAULT - This injects a start page to setup your DB data.
116
- })
117
- ],
118
- });
119
- ```
120
-
121
- ## First Start and setup
122
-
123
- This project is designed to be setup to a new Studio DB, to get started follow the [Link to Astro Studio](https://docs.astro.build/en/recipes/studio/#create-a-new-studio-project)
124
-
125
- *Note: `astrojs/db` does not currently maintain all database data without a [seed file](https://docs.astro.build/en/guides/astro-db/#seed-your-database) which would not work with the CMS. Until a local database is persistant between sessions we highly recommend connecting to a remote DB to allow for data to persist*
126
-
127
- Commands to run:
128
- - `astro db link` - Link to Astro Studio and Create a new DB for your CMS Installation
129
- - `astro db push` - Creates the base tables on the remote database.
130
- - `astro dev --remote` - Starts the Dev server connected to the linked database
44
+ So don't be a stranger - come join us on this journey and help us realize the full potential of StudioCMS!
131
45
 
132
- Once that process completes successfuly you are ready to navigate to http://localhost:4321/start and follow the instructions to get started.
46
+ ## Get Started
133
47
 
134
- It will redirect and ask you to shutdown and change the above mentioned config option `dbStartPage` to `false` at which point that will enable full functionality of the CMS. you can now restart the dev server with `astro dev --remote` to continue viewing your new site!
48
+ Follow the documentation to [get started with StudioCMS](https://docs.astro-studiocms.xyz/start-here/getting-started).
135
49
 
136
50
  ## Get Involved
137
51
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "studiocms",
3
- "version": "0.1.0-beta.5",
4
- "description": "A dedicated CMS for Astro Studio. Built from the ground up by the Astro community.",
3
+ "version": "0.1.0-beta.6",
4
+ "description": "A dedicated CMS for Astro DB. Built from the ground up by the Astro community.",
5
5
  "author": {
6
6
  "name": "Adam Matthiesen | Jacob Jenkins | Paul Valladares",
7
7
  "url": "https://astro-studiocms.xyz"
@@ -45,45 +45,46 @@
45
45
  "dependencies": {
46
46
  "@cloudinary/url-gen": "^1.19.0",
47
47
  "@inox-tools/runtime-logger": "^0.3.1",
48
+ "@markdoc/markdoc": "^0.4.0",
48
49
  "@matthiesenxyz/astrolace": "^0.3.2",
49
50
  "@matthiesenxyz/integration-utils": "^0.2.0",
50
51
  "@matthiesenxyz/unocss-preset-daisyui": "^0.1.2",
51
- "@shikijs/transformers": "^1.14.1",
52
52
  "@noble/hashes": "^1.4.0",
53
- "@unpic/astro": "^0.0.46",
54
- "micromatch": "^4.0.7",
55
- "lucia": "^3.2.0",
56
- "arctic": "^1.9.1",
53
+ "@shikijs/transformers": "^1.14.1",
57
54
  "@unocss/astro": "^0.62.3",
58
55
  "@unocss/reset": "^0.62.3",
56
+ "@unpic/astro": "^0.0.46",
59
57
  "astro-integration-kit": "^0.16.1",
58
+ "arctic": "^1.9.1",
60
59
  "daisyui": "^4.12.10",
60
+ "lucia": "^3.2.0",
61
61
  "marked": "^13.0.2",
62
62
  "marked-alert": "^2.0.1",
63
63
  "marked-emoji": "^1.4.1",
64
64
  "marked-footnote": "^1.2.2",
65
65
  "marked-shiki": "^1.1.0",
66
66
  "marked-smartypants": "^1.1.7",
67
+ "micromatch": "^4.0.7",
67
68
  "mrmime": "^2.0.0",
68
- "shiki": "^1.14.1",
69
- "semver": "^7.6.3",
70
69
  "package-json": "^10.0.1",
71
- "unpic": "^3.18.0",
70
+ "semver": "^7.6.3",
71
+ "shiki": "^1.14.1",
72
72
  "unocss": "^0.62.3",
73
- "@studiocms/assets": "0.1.0-beta.5",
74
- "@studiocms/auth": "0.1.0-beta.5",
75
- "@studiocms/betaresources": "0.1.0-beta.5",
76
- "@studiocms/core": "0.1.0-beta.5",
77
- "@studiocms/dashboard": "0.1.0-beta.5",
78
- "@studiocms/frontend": "0.1.0-beta.5",
79
- "@studiocms/imagehandler": "0.1.0-beta.5",
80
- "@studiocms/renderers": "0.1.0-beta.5",
81
- "@studiocms/robotstxt": "0.1.0-beta.5"
73
+ "unpic": "^3.18.0",
74
+ "@studiocms/assets": "0.1.0-beta.6",
75
+ "@studiocms/auth": "0.1.0-beta.6",
76
+ "@studiocms/betaresources": "0.1.0-beta.6",
77
+ "@studiocms/core": "0.1.0-beta.6",
78
+ "@studiocms/dashboard": "0.1.0-beta.6",
79
+ "@studiocms/frontend": "0.1.0-beta.6",
80
+ "@studiocms/imagehandler": "0.1.0-beta.6",
81
+ "@studiocms/renderers": "0.1.0-beta.6",
82
+ "@studiocms/robotstxt": "0.1.0-beta.6"
82
83
  },
83
84
  "peerDependencies": {
84
85
  "@astrojs/db": ">=0.14",
85
86
  "astro": ">=4.15",
86
- "@studiocms/blog": "0.1.0-beta.5"
87
+ "@studiocms/blog": "0.1.0-beta.6"
87
88
  },
88
89
  "peerDependenciesMeta": {
89
90
  "@studiocms/blog": {
@@ -18,8 +18,8 @@ import {
18
18
  } from '@studiocms/core/utils';
19
19
  import studioCMSDashboard from '@studiocms/dashboard';
20
20
  import studioCMSFrontend from '@studiocms/frontend';
21
- import studiocmsImageHandler from '@studiocms/imagehandler';
22
- import studiocmsRenderers from '@studiocms/renderers';
21
+ import studioCMSImageHandler from '@studiocms/imagehandler';
22
+ import studioCMSRenderers from '@studiocms/renderers';
23
23
  import studioCMSRobotsTXT from '@studiocms/robotstxt';
24
24
  import { defineIntegration } from 'astro-integration-kit';
25
25
  import { name, version } from '../package.json';
@@ -50,13 +50,25 @@ export default defineIntegration({
50
50
  addWatchFile(getStudioConfigFileUrl(astroConfig.root));
51
51
 
52
52
  // Resolve Options
53
- resolvedOptions = await configResolver(params, options);
53
+ const ResolvedOptions = await configResolver(params, options);
54
+
55
+ // Set Resolved Options
56
+ resolvedOptions = ResolvedOptions;
57
+
58
+ // Break out resolved options
59
+ const {
60
+ verbose,
61
+ rendererConfig,
62
+ dbStartPage,
63
+ dashboardConfig,
64
+ defaultFrontEndConfig,
65
+ imageService,
66
+ overrides,
67
+ includedIntegrations,
68
+ } = ResolvedOptions;
54
69
 
55
70
  // Setup Logger
56
- integrationLogger(
57
- { logger, logLevel: 'info', verbose: resolvedOptions.verbose },
58
- CoreStrings.Start
59
- );
71
+ integrationLogger({ logger, logLevel: 'info', verbose }, CoreStrings.Start);
60
72
 
61
73
  // Check Astro Config for required settings
62
74
  checkAstroConfig(params);
@@ -65,21 +77,45 @@ export default defineIntegration({
65
77
  addIntegrationArray(params, [
66
78
  { integration: nodeNamespaceBuiltinsAstro() },
67
79
  { integration: studioCMSCore(resolvedOptions) },
68
- { integration: studioCMSFrontend(resolvedOptions) },
69
- { integration: studiocmsImageHandler(resolvedOptions) },
70
- { integration: studiocmsRenderers() },
71
- { integration: studioCMSAuth(resolvedOptions) },
72
- { integration: studioCMSDashboard(resolvedOptions) },
80
+ { integration: studioCMSRenderers(rendererConfig) },
81
+ {
82
+ integration: studioCMSFrontend({
83
+ verbose,
84
+ dbStartPage,
85
+ defaultFrontEndConfig,
86
+ }),
87
+ },
88
+ {
89
+ integration: studioCMSImageHandler({
90
+ verbose,
91
+ imageService,
92
+ overrides,
93
+ }),
94
+ },
95
+ {
96
+ integration: studioCMSAuth({
97
+ verbose,
98
+ dbStartPage,
99
+ dashboardConfig,
100
+ }),
101
+ },
102
+ {
103
+ integration: studioCMSDashboard({
104
+ verbose,
105
+ dbStartPage,
106
+ dashboardConfig,
107
+ }),
108
+ },
73
109
  ]);
74
110
 
75
111
  // Setup Integrations (External / Optional)
76
112
  addIntegrationArrayWithCheck(params, [
77
113
  {
78
- enabled: resolvedOptions.includedIntegrations.useAstroRobots,
114
+ enabled: includedIntegrations.useAstroRobots,
79
115
  knownSimilar: ['astro-robots', 'astro-robots-txt'],
80
116
  integration: studioCMSRobotsTXT({
81
117
  ...robotsTXTPreset,
82
- ...resolvedOptions.includedIntegrations.astroRobotsConfig,
118
+ ...includedIntegrations.astroRobotsConfig,
83
119
  }),
84
120
  },
85
121
  ]);