@studiocms/blog 0.1.0-beta.12 → 0.1.0-beta.14

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.
package/README.md CHANGED
@@ -1 +1,7 @@
1
- # StudioCMS - Blog Provider
1
+ # StudioCMS - Blog Provider
2
+
3
+ For information and docs related to this package see [The StudioCMS Docs](https://docs.studiocms.dev/package-catalog/studiocms-plugins/studiocms-blog/)
4
+
5
+ ## License
6
+
7
+ [MIT Licensed](./LICENSE).
package/dist/index.js CHANGED
@@ -12,7 +12,6 @@ function studioCMSBlogPlugin(options) {
12
12
  return definePlugin({
13
13
  identifier: packageIdentifier,
14
14
  name: "StudioCMS Blog",
15
- // TODO: Update this to the correct version when the package is ready to be published
16
15
  studiocmsMinimumVersion: "0.1.0-beta.8",
17
16
  frontendNavigationLinks: [{ label: title, href: route }],
18
17
  pageTypes: [{ identifier: packageIdentifier, label: "Blog Post (StudioCMS Blog)" }],
@@ -1,5 +1,4 @@
1
1
  ---
2
- import config from 'studiocms:config';
3
2
  import { StudioCMSRenderer } from 'studiocms:renderer';
4
3
  import studioCMS_SDK from 'studiocms:sdk';
5
4
  import studioCMS_SDK_Cache from 'studiocms:sdk/cache';
@@ -8,10 +7,6 @@ import Layout from '../layouts/Layout.astro';
8
7
  // This is here to refresh the cache when needed
9
8
  const allPages = await studioCMS_SDK_Cache.GET.pages();
10
9
 
11
- if (config.dbStartPage) {
12
- return Astro.redirect('/start');
13
- }
14
-
15
10
  let { slug } = Astro.params;
16
11
 
17
12
  if (!slug) {
@@ -24,13 +19,11 @@ if (!page) {
24
19
  return new Response(null, { status: 404 });
25
20
  }
26
21
 
27
- const { title, description, heroImage, defaultContent } = page;
28
-
29
- const content = defaultContent?.content || '';
22
+ const { title, description, heroImage } = page;
30
23
  ---
31
24
 
32
25
  <Layout title={title} description={description} heroImage={heroImage}>
33
26
  <main>
34
- <StudioCMSRenderer content={content} />
27
+ <StudioCMSRenderer data={page} />
35
28
  </main>
36
29
  </Layout>
@@ -26,19 +26,12 @@ if (!post) {
26
26
  }
27
27
 
28
28
  const { title, description, heroImage, publishedAt, updatedAt, defaultContent } = post;
29
-
30
- // If no content is found, redirect to 404
31
- if (!defaultContent) {
32
- return new Response(null, { status: 404 });
33
- }
34
-
35
- const content = defaultContent.content || '';
36
29
  ---
37
30
  <Layout {title} {description} {heroImage}>
38
31
  <main>
39
32
  <article>
40
33
  <PostHeader {title} {description} {heroImage} {publishedAt} {updatedAt} />
41
- <StudioCMSRenderer {content} />
34
+ <StudioCMSRenderer data={post} />
42
35
  </article>
43
36
  </main>
44
37
  </Layout>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studiocms/blog",
3
- "version": "0.1.0-beta.12",
3
+ "version": "0.1.0-beta.14",
4
4
  "description": "Add a blog to your StudioCMS project with ease!",
5
5
  "author": {
6
6
  "name": "Adam Matthiesen | Jacob Jenkins | Paul Valladares",
@@ -14,7 +14,8 @@
14
14
  "contributors": [
15
15
  "Adammatthiesen",
16
16
  "jdtjenkins",
17
- "dreyfus92"
17
+ "dreyfus92",
18
+ "code.spirit"
18
19
  ],
19
20
  "license": "MIT",
20
21
  "keywords": [
@@ -48,7 +49,7 @@
48
49
  "exports": {
49
50
  ".": {
50
51
  "types": "./dist/index.d.ts",
51
- "import": "./dist/index.js"
52
+ "default": "./dist/index.js"
52
53
  }
53
54
  },
54
55
  "type": "module",
@@ -57,12 +58,12 @@
57
58
  "astro-integration-kit": "^0.18"
58
59
  },
59
60
  "devDependencies": {
60
- "@types/node": "^20.14.11"
61
+ "@types/node": "^22.0.0"
61
62
  },
62
63
  "peerDependencies": {
63
- "astro": "^5.4.3",
64
+ "astro": "^5.5.0",
64
65
  "vite": "^6.2.0",
65
- "studiocms": "0.1.0-beta.12"
66
+ "studiocms": "0.1.0-beta.14"
66
67
  },
67
68
  "scripts": {
68
69
  "build": "build-scripts build 'src/**/*.{ts,css}'",