Backend function for Kontent.ai Learn that uses Kontent.ai as a source of its data.
The service is responsible for fetching all the content related to API Reference pages on the documentation portal, and passing it forward using Azure Blob Storage.
- This project is a TypeScript Azure Functions application.
- It reacts to Event Grid events (
update
andget
endpoints). - The function fetches content related to API Reference pages using Kontent.ai Delivery SDK for Javascript.
- The fetched content is then resolved and processed into a simplified JSON format.
- Finally, it saves the processed data to an Azure Blob Storage, where the following API Reference services can access it.
- Node (+yarn) installed
- Visual Studio Code installed
- Subscriptions on Kontent.ai
- Open Visual Studio Code and install the prerequisites according to the following steps.
- Log in to Azure using the Azure Functions extension tab.
- Clone the project repository and open it in Visual Studio Code.
- Run
yarn install
in the terminal. - Set the required keys.
- Deploy to Azure using Azure Functions extension tab, or run locally by pressing
Ctrl + F5
in Visual Studio Code.
KC.ProjectId
- Kontent.ai project IDKC.PreviewApiKey
- Kontent.ai Delivery Preview API keyKC.SecuredApiKey
- Kontent.ai Delivery Secured API keyAzure.StorageKey
- Azure Storage keyAzure.StorageAccountName
- Azure Storage account nameAzure.ContainerName
- Azure Storage container nameDocsWebsiteUrl
- Kontent.ai Learn URLEventGrid.TriggerReferenceUpdateStarter.Endpoint
- Event Grid endpoint for Blob Provider's ReferenceUpdateStarter functionEventGrid.TriggerReferenceUpdateStarter.Key
- Event Grid topic authentication key
- Run
yarn run test
in the terminal.
Feel free to open a new issue where you describe your proposed changes, or even create a new pull request from your branch with proposed changes.
All the source codes are published under MIT license.