Skip to content

The Contentful Broken References App is a simple Contentful App providing an interface to bulk identify broken references in the contents.

License

Notifications You must be signed in to change notification settings

pauloamgomes/contentful-broken-references-app

Repository files navigation

Contentful Broken References App

The Contentful Broken References App is a simple Contentful App providing an interface to bulk identify broken references in the contents.

A broken reference occurs when the linked entry is deleted or unpublished, making it inaccessible to the reference field. Typically and depending on how your application is built a broken reference can results in an error, causing issues, such as missing content or broken relationships. To ensure data integrity and avoid these issues, this App will help to identify and resolve broken references in your Contentful entries.

🛠 Setup

Install the App using by doing the below steps:

  1. Create a new Contentful custom App and define the Application Name (e.g. Broken References)

  2. Download this repo and drag the dist folder into the Bundles upload zone:

App Bundles Upload

Give a name to the bundle

App Bundles Uploade

You can find more details about hosting an Contentful app her

  1. Set the App configuration screen and Page location

App Locations

  1. Save, and Install the App in your space, on the space configuration screen fill the Contentful Delivery Access token.

App Configuration Screen

  1. The App should be available in the Apps menu:

Apps Menu

  1. Open the App and it will automatically analyze and display if any, a list of broken references:

Apps Menu

Clicking in the broken reference items will open the affected entry and you'll be able to fix it.

🥷 Development

In the project directory, you can run:

yarn start

Creates or updates your app definition in Contentful, and runs the app in development mode. Open your app to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

yarn build

Builds the app for production to the dist folder. It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

yarn upload

Uploads the dist folder to Contentful and creates a bundle that is automatically activated. The command guides you through the deployment process and asks for all required arguments. Read here for more information about the deployment process.

yarn upload-ci

Similar to yarn upload it will upload your app to contentful and activate it. The only difference is that with this command all required arguments are read from the environment variables, for example when you add the upload command to your CI pipeline.

For this command to work, the following environment variables must be set:

  • CONTENTFUL_ORG_ID - The ID of your organization
  • CONTENTFUL_APP_DEF_ID - The ID of the app to which to add the bundle
  • CONTENTFUL_ACCESS_TOKEN - A personal access token

💡Learn more

This project was bootstrapped with Create Contentful App.

Copyright and license

Copyright 2023 pauloamgomes under the MIT license.

About

The Contentful Broken References App is a simple Contentful App providing an interface to bulk identify broken references in the contents.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published