generated from autonomic-cooperative/astro-payload-template
Compare commits
7 Commits
2a494425ad
...
7dbc81c5b2
Author | SHA1 | Date | |
---|---|---|---|
7dbc81c5b2 | |||
4b30d58db6 | |||
62e50496a2 | |||
c90d2c0d9b | |||
4544c7942c | |||
7997268fad | |||
d8cfd644f8 |
14
.drone.yml
14
.drone.yml
@ -14,7 +14,7 @@ steps:
|
|||||||
registry: git.autonomic.zone
|
registry: git.autonomic.zone
|
||||||
context: astro
|
context: astro
|
||||||
dockerfile: astro/Dockerfile
|
dockerfile: astro/Dockerfile
|
||||||
trigger: &exclude-event-custom
|
when: &exclude-event-custom
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
event:
|
event:
|
||||||
@ -30,8 +30,8 @@ steps:
|
|||||||
context: payload
|
context: payload
|
||||||
dockerfile: payload/Dockerfile
|
dockerfile: payload/Dockerfile
|
||||||
target: dev
|
target: dev
|
||||||
trigger:
|
when:
|
||||||
<< *exclude-event-custom
|
<<: *exclude-event-custom
|
||||||
|
|
||||||
- name: publish payload prod container
|
- name: publish payload prod container
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
@ -40,8 +40,8 @@ steps:
|
|||||||
username: 3wordchant
|
username: 3wordchant
|
||||||
repo: git.autonomic.zone/autonomic-cooperative/astro-payload-test-payload
|
repo: git.autonomic.zone/autonomic-cooperative/astro-payload-test-payload
|
||||||
target: prod
|
target: prod
|
||||||
trigger:
|
when:
|
||||||
<< *exclude-event-custom
|
<<: *exclude-event-custom
|
||||||
|
|
||||||
- name: deploy stack
|
- name: deploy stack
|
||||||
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
||||||
@ -63,8 +63,8 @@ steps:
|
|||||||
PAYLOAD_URL: "https://admin.paystro.swarm-demo.autonomic.zone"
|
PAYLOAD_URL: "https://admin.paystro.swarm-demo.autonomic.zone"
|
||||||
depends_on:
|
depends_on:
|
||||||
- publish payload prod container
|
- publish payload prod container
|
||||||
trigger:
|
when:
|
||||||
<< *exclude-event-custom
|
<<: *exclude-event-custom
|
||||||
|
|
||||||
- name: build astro content
|
- name: build astro content
|
||||||
image: git.autonomic.zone/autonomic-cooperative/astro-payload-test-astro:latest
|
image: git.autonomic.zone/autonomic-cooperative/astro-payload-test-astro:latest
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
---
|
---
|
||||||
import { Image } from "@astrojs/image/components";
|
import { Image } from "@astrojs/image/components";
|
||||||
|
import type { Post } from "@/types/payload-types";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
post: Post;
|
||||||
|
}
|
||||||
|
|
||||||
const { post } = Astro.props;
|
const { post } = Astro.props;
|
||||||
---
|
---
|
@ -1,5 +1,10 @@
|
|||||||
---
|
---
|
||||||
import Post from "@/components/Post.astro"
|
import PostEntry from "@/components/PostEntry.astro"
|
||||||
|
import type { Post } from "@/types/payload-types";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
posts: Post[];
|
||||||
|
}
|
||||||
|
|
||||||
const { posts } = Astro.props;
|
const { posts } = Astro.props;
|
||||||
---
|
---
|
||||||
@ -10,8 +15,9 @@ const { posts } = Astro.props;
|
|||||||
{
|
{
|
||||||
posts.length > 0 ? (
|
posts.length > 0 ? (
|
||||||
posts.map((post) => (
|
posts.map((post) => (
|
||||||
<Post post={post}/>
|
typeof(post) === 'object') &&
|
||||||
))
|
<PostEntry post={post}/>
|
||||||
|
)
|
||||||
) : (
|
) : (
|
||||||
<p>No posts available</p>
|
<p>No posts available</p>
|
||||||
)
|
)
|
||||||
|
@ -71,7 +71,7 @@ const Posts: CollectionConfig = {
|
|||||||
name: "content",
|
name: "content",
|
||||||
type: "richText",
|
type: "richText",
|
||||||
admin: {
|
admin: {
|
||||||
elements: ["h2", "h3", "h4", "link", "ol", "ul", "upload"],
|
elements: ["h2", "h3", "h4", "link", "ol", "ul", "upload", "blockquote", "indent"],
|
||||||
leaves: ["bold", "italic", "underline"],
|
leaves: ["bold", "italic", "underline"],
|
||||||
upload: {
|
upload: {
|
||||||
collections: {
|
collections: {
|
||||||
@ -90,11 +90,10 @@ const Posts: CollectionConfig = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "authors",
|
name: "author",
|
||||||
//TODO: Add active user as default
|
//TODO: Add active user as default
|
||||||
type: 'relationship',
|
type: 'relationship',
|
||||||
relationTo: 'authors',
|
relationTo: 'authors',
|
||||||
hasMany: true,
|
|
||||||
admin: {
|
admin: {
|
||||||
position: "sidebar",
|
position: "sidebar",
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user