emelleme / ascend-society

MIT License
0 stars 0 forks source link

Integrate Site with Contentful CMS #46

Open emelleme opened 1 year ago

emelleme commented 1 year ago

We will use Contentful for the content management of the site. This will enable designated users to edit and manage the content without requiring development resources. The integration will involve setting up API calls to pull data from Contentful and create static site content during the build process with Eleventy.

Here is a high-level overview of the plan:

1. Create/Configure Content Models in Contentful: The first step will be to create or configure content models in Contentful to match the structure of the content on our Eleventy site. This will likely involve creating a few different models depending on the complexity and variety of our site's content.

2. Set Up API Keys: We will need to generate API keys from the Contentful management dashboard. These will be required to authenticate our application and allow it to pull content from Contentful.

3. Integrate Contentful API with Eleventy: We'll use the Contentful JavaScript SDK to fetch our content from Contentful during Eleventy's build process. The data fetched will then be passed to Eleventy templates to generate the pages of our site.

4. Mapping Contentful Data to Eleventy Templates: We'll map the data fetched from Contentful to our existing Eleventy templates, making sure that each field from our Contentful models is correctly populated in the templates.

5. Test Locally: Before deploying, we'll run extensive local tests to make sure that the content is correctly being pulled from Contentful and populated into our Eleventy site.

6. Automate the Build Process: We'll set up a continuous deployment pipeline using GitHub Actions (or another preferred tool) so that every time there is a change in Contentful, it triggers a new build of our Eleventy site, ensuring our content is always up-to-date.

7. Deploy and Test Live Site: Finally, we'll deploy our Eleventy site integrated with Contentful and perform rigorous testing to ensure the live site works as expected.

emelleme commented 1 year ago

Contentful API Documentation - https://www.contentful.com/developers/docs/references/

Integrate Contentful with Eleventy Site - https://www.contentful.com/blog/integrating-contentful-with-eleventy-create-static-sites/

emelleme commented 1 year ago

@shejza @Erza123 , Anytime you add an image, can you use https://squoosh.app/ to reduce the size of the image? this app will maintain the quality while reducing the size.

Thank you