Last updated - 2024-09-05
ToDo
ToDo | Date | |
---|---|---|
✅ | Global images | 2024-SEP-03 |
✅ | Tags | 2024-SEP-04 |
✅ | Categories | 2024-SEP-03 |
✅ | Google analytics | 2024-SEP-05 |
✅ | Comment system - Integrating Giscus | 2024-SEP-05 |
Adding global images
- Create
images
folder undercontent
directory. - Upload images under
contents/images/
foldder - Add images using the
figure
shortcode.
e.g.
{\{< figure src="/images/jerry.gif" alt="Jerry" width="200" align="center" >}}
Adding tags and categories
Edit your config.yaml
or hugo.yaml
and add a taxonomies
section as given below,
taxonomies:
category: categories
tag: tags
author: authors
Once this is done, you can add categories and tags under the front matter.
categories:
- Development
- Projects
- Learning
tags:
- machine learning
- AI
- OCR
- image processing
- tensorflow
- python
- tesseract
- problem solving
- personal projects
I use cursor as my editor. Once I’m done writing the article, I use the built-in AI to generate the categories and tags.
Google Analytics
This one was easy! Everything you need is given under this link
services:
googleAnalytics:
ID: G-MEASUREMENT_ID
Adding Comments
The way i understand it, setting up comments on a hugo website depends on the comment system and the theme that you are using.
I’m using Giscus and running my site using the PaperMod theme. The following steps might be only applicable for Giscus + Papermod.
Configuring Giscus
- Create and public github repo and enable discussions under settings
- Go to https://giscus.app/ and complete the configuration session.
This would generate an HTML script
, e.g.,
<script src="https://giscus.app/client.js"
data-repo="username/repo"
data-repo-id="repo-id"
data-category="Announcements"
data-category-id="category-id"
data-mapping="pathname"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="en"
crossorigin="anonymous"
async>
</script>
Site configuration
- Follow the steps here.
- For the posts that you want to enable comments add
comments: true
to the front matter.
./J