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

Add Flotiq and Astro integration guide #9798

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

trzcina
Copy link

@trzcina trzcina commented Oct 25, 2024

This documentation provides a step-by-step guide for integrating the Flotiq headless CMS with Astro. It helps developers enhance their Astro projects by incorporating dynamic content from Flotiq.

The guide covers the following topics:

  • Prerequisites for setting up the integration.
  • Creating and configuring content types in Flotiq.
  • Connecting an Astro project to Flotiq's API.
  • Fetching and displaying content from Flotiq using code examples.
  • Handling both Static Site Generation (SSG) and Server-Side Rendering (SSR) modes.

Copy link

netlify bot commented Oct 25, 2024

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 86b0655
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/6735ecd72bebac0008df30c3
😎 Deploy Preview https://deploy-preview-9798--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Oct 25, 2024

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale File Note
en guides/cms/flotiq.mdx Source added, will be tracked.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@sarah11918 sarah11918 added 3rd-party guide Community submitted CMS, deploy, backend etc. guide add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. labels Oct 29, 2024
@sarah11918
Copy link
Member

Hi @trzcina ! Thank you for submitting this guide! We hope to be able to start reviewing it this week! 🚀

Copy link
Member

@TheOtterlord TheOtterlord left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @trzcina! I've run through the recipe once, and made some initial notes about the order of steps, and using other package managers. Once we figure those out, I'll go through and review the copy.

The only issue I ran into was regenerating the SDK. I used pnpm, but running pnpm add flotiq-api-ts, even with --force, didn't regenerate the SDK after changing my content type. Deleting node_modules and installing with npm worked fine. Is it possible to regenerate the SDK with pnpm at all?

Comment on lines 37 to 43
### Setting up the Environment variables

Add the read-only API key from your Flotiq account to the `.env` file in the root of your Astro project:

```ini title=".env"
FLOTIQ_API_KEY=__YOUR_FLOTIQ_API_KEY__
```
Copy link
Member

Choose a reason for hiding this comment

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

nit: This might be better above the previous step, as we tell the user how to get the environment variable in the prerequisites. Then they can immediately paste and forget.

Copy link
Author

Choose a reason for hiding this comment

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

Right, I’ve moved the section closer to the prerequisites section.

src/content/docs/en/guides/cms/flotiq.mdx Outdated Show resolved Hide resolved
src/content/docs/en/guides/cms/flotiq.mdx Outdated Show resolved Hide resolved
src/content/docs/en/guides/cms/flotiq.mdx Outdated Show resolved Hide resolved
@trzcina
Copy link
Author

trzcina commented Oct 30, 2024

Thanks @TheOtterlord! I’ll prepare an improved version incl. a component featuring tabs.

The most important thing for me is to check why the SDK didn’t update after pnpm add with --force. I’ll let you know.

@sarah11918
Copy link
Member

Hey @trzcina ! Thanks for working with @TheOtterlord and for your patience! It looks like all the procedure was figured out, and I'll be looking at this in the next couple of days for a style/language pass. We should have this merged by the end of the week, if all goes well! 🙌

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Sorry, you didn't give permission for maintainers to edit, so I had to make one big suggestion on the whole file! 😅

These are some light text/language edits throughout, so I'd suggest the easiest thing to do here is accept the suggestion and then review to make sure nothing is wrong!

src/content/docs/en/guides/cms/flotiq.mdx Outdated Show resolved Hide resolved
Co-authored-by: Sarah Rainsberger <[email protected]>
@trzcina
Copy link
Author

trzcina commented Nov 14, 2024

Thanks, @sarah11918! I reviewed and committed your suggested changes. Thanks for the suggestions — looks good now.

@sarah11918
Copy link
Member

Hi @trzcina ! Thank you for making that commit, but you also have to give maintainers permission to edit so we can do basic things like update the branch.

Please edit the permissions on this PR for us so we can continue with it! 🙌 Then it won't be too long until we can merge it! 🥳

Copy link
Contributor

@casungo casungo left a comment

Choose a reason for hiding this comment

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

LGTM! just a quick note

</Fragment>
<Fragment slot="yarn">
```sh
yarn add flotiq-api-ts
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be rebuild? or am i missing something

Suggested change
yarn add flotiq-api-ts
yarn rebuild flotiq-api-ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party guide Community submitted CMS, deploy, backend etc. guide add new content Document something that is not in docs. May require testing, confirmation, or affect other pages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants