Azure CLI

Azure CLI Azure CLI is a set of commands used to create and manage Azure resources. To start off, run the following command to display all available commands. $ az --help To display available subcommands add --help after any command. $ az login --help Use the find command to fetch examples of use for commands. az find "az login" Login To login to Azure run the following command: $ az login To sign in with a service principal run the following command:...

November 9, 2022 · 1 min · Me

ReCAPTCHA in Staticman

In this post I will implement ReCAPTCHA with Staticman. Due to Spam from bots we need to enable ReCAPTCHA to verify human interaction. Go to Google ReCAPTCHA and create one for your website. Choose verison 2 as Staticman only supports this verison. Encrypt the secret key by going to your heroku web app. https://staticman-erik.herokuapp.com/v3/encrypt/SECRET Edit the config.yml file with: staticman: api: https://staticman-erik.herokuapp.com/v3/entry/gitlab/eriksnartland/blog_comments/main/comments recaptcha: sitekey: "key" secret: "encoded-secret" Edit the staticman.yml file in the blog_comments repo:...

December 30, 2021 · 2 min · Me

Staticman

In this post I will implement Staticman on my website. Using the following sources I was able to implement it: https://dev.to/julio_ui/configuring-staticman-comments-with-hugo-317g https://yasoob.me/posts/running_staticman_on_static_hugo_blog_with_nested_comments/ https://github.com/eduardoboucas/hugo-plus-staticman https://dancwilliams.com/hugo-staticman-nested-replies-and-email-notifications/ https://binarymist.io/blog/2018/02/24/hugo-with-staticman-commenting-and-subscriptions/ Staticman As Staticman works with REST form submissions we need to deploy a new instance of Staticman. We will deploy Staticman using Heroku which is recommended by Staticman. Heroku provides services and tools to build, run, and scale web applications. Staticman uses a git repository to store comments....

November 29, 2021 · 7 min · Me

Static comments with Staticman

My website is built with Hugo, which is a fast, open-source framework, that enables building flexible websites. To engage with audiences I have enabled comments on my site. Disqus Disqus is a third party application which ships with Hugo. Disqus allows users to comment on blog posts. It is easy to setup and is supported by most Hugo themes. To enable Disqus add the following line in your config: disqusShortname: yourdiscussshortname Why is it bad?...

November 28, 2021 · 3 min · Me

GitOps

GitOps is used to automate the process of provisioning infrastructure. It consists of: IaC MRs CI/CD With these tools GitOps provides a set of best practices for automated deployment and management of infrastructure. Infrastructure as code (IaC) is the process of managing and provisioning infrastructure. IaC allows versioned configuration of infrastructure which can be deployed to test, dev and prod environments. IaC enables reproducible and backed up infrastructure. The IaC configuration can be deployed locally, through CICD processes or both....

October 23, 2021 · 4 min · Me