Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLB-188: Decap integration #117

Merged
merged 20 commits into from
Dec 19, 2023
Merged

SLB-188: Decap integration #117

merged 20 commits into from
Dec 19, 2023

Conversation

pmelab
Copy link
Contributor

@pmelab pmelab commented Dec 12, 2023

Description of changes

Integrate the Decap installation from #93 into Gatsby.

Motivation and context

Provide a canonical way to use Decap in Silverback.

How to test

  1. Start a Gitpod with this PR
  2. Go to http://localhost:8000/admin
  3. CRUD some content
  4. See the changes in /apps/decap/data
  5. Rebuild the website to see pages in the frontend

Will not work with "VSCode in Browser". Decap has to run on localhost.

Review notes

I marked several occasions for improvements. Jira tickets for these have already been created.

How has this been tested?

  • Manually
  • Unit tests
  • Integration tests

@pmelab pmelab force-pushed the SLB-188-decap-integration branch from 596426f to 05449f3 Compare December 14, 2023 10:13
@pmelab pmelab marked this pull request as ready for review December 14, 2023 10:21
Copy link
Member

@Leksat Leksat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have a call later? I have issues

  • making it work locally
  • making publisher work in gitpod

},
{
id: '',
rid: '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it come from Decap? I thought rid, nid, etc are Drupalisms.

@@ -1,4 +1,3 @@
import { Markup } from '@custom/schema';
import rehypeSanitize from 'rehype-sanitize';
import rehypeStringify from 'rehype-stringify';
import remarkParse from 'remark-parse';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had many issues updating these in silverback-mono. Just complaining 😅

apps/website/src/templates/decap-page.tsx Outdated Show resolved Hide resolved
apps/website/image.mjs Outdated Show resolved Hide resolved
@Leksat
Copy link
Member

Leksat commented Dec 19, 2023

If I kill Gatsby's serve and run dev (Publisher), I get this error:

 ERROR #@amazeelabs/gatsby-source-silverback_gatsby-plugin-sharp-20000  UNKNOWN

Failed to retrieve metadata from image
/workspace/silverback-template/apps/website/.cache/caches/@amazeelabs/gatsby-sou
rce-silverback/108d32cdffffa2f68724c10033dbb234/landscape.jpg

  Error: Input buffer contains unsupported image format

To get AmazeeLabs/silverback-mono@f9ef855
which caused the cloudinary resolver not to load by default.
@pmelab pmelab force-pushed the SLB-188-decap-integration branch 2 times, most recently from 6d31915 to 2fcdfa8 Compare December 19, 2023 09:53
@pmelab pmelab requested a review from Leksat December 19, 2023 10:12
Copy link
Member

@Leksat Leksat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works now.

Would be nice to fix validation

warn [
  {
    "code": "invalid_type",
    "expected": "array",
    "received": "undefined",
    "path": [
      "content"
    ],
    "message": "Required"
  }
]```

@pmelab pmelab merged commit aa80b03 into release Dec 19, 2023
5 checks passed
@pmelab pmelab deleted the SLB-188-decap-integration branch December 19, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants