Overview:
The Jekyll Blog Comments Azure Function is an Azure Function App designed to receive comment form submissions and create a pull request against a GitHub repository. This function is part of the jekyll-blog-comments system and is used to add comments to a Jekyll site.
Features:
- PostComment function: This function receives form POST submissions and creates a pull request to add the comment to the Jekyll site.
- Integration with GitHub: The app uses a GitHub personal access token to access and edit the target repository.
- Comment website URL: The app requires the URL of the website that hosts the comments to ensure that the correct site is posting comments.
- CommentFallbackCommitEmail: In case the form submission does not provide an email address, this setting specifies the email address to use for GitHub commits and pull requests.
- Optional sentiment analysis: The app can use a Microsoft Azure Recognition subscription key for sentiment analysis of comments. This feature is optional and can be left empty if not required.
Installation:
To set up the Jekyll Blog Comments Azure Function, follow these steps:
- Create an Azure Portal account.
- Fork the repository for the app.
- Create a v1 Azure Function.
- Set up a subscription key in Microsoft Azure Recognition (optional).
- Configure the function to deploy from your forked repository.
- Set up the following App Settings for your Azure Function:
- PullRequestRepository: Specify the owner and name of the repository that houses your Jekyll site for pull requests to be created against.
- GitHubToken: Provide a GitHub personal access token with access to edit your target repository.
- CommentWebsiteUrl: Enter the URL of the website that hosts the comments.
- CommentFallbackCommitEmail: Specify an email address to use for GitHub commits and pull requests if the form submission does not provide one.
- SentimentAnalysis.SubscriptionKey: If you want to use sentiment analysis, provide a Subscription Key for Microsoft Azure Recognition. Leave empty if not required.
- SentimentAnalysis.Region: Specify the region for your Subscription key (e.g., westus).
- SentimentAnalysis.Lang: Enter the language code for comments. Refer to the provided link to find the appropriate language code.
Summary:
The Jekyll Blog Comments Azure Function is a useful tool for adding comment functionality to a Jekyll site. It provides integration with GitHub for creating pull requests to add comments, and also offers optional sentiment analysis. By following the installation guide, users can easily set up and configure this function to enhance their Jekyll-based blogs with comment functionality.