How I sync my Hashnode with my Hugo blog

Hashnode provide a visual editor easy to use and create blog. Hashnode also provide auto backup into github in markdown format. So I gonna create blog in hashnode and sync it to my hugo blog Step 1: make a script to convert from hashnode format to hugo format Even they’re both markdown, but both has a special properties to format the blog. So here we have to convert mostly those properties, for the body don’t need to to touch much....

August 13, 2024 · 5 min

How to auto update the created date on a post in Hugo

The basic ideal is that run a script to edit the date of the post before git commit command. Make the post with the special character to update the date Here I’m gonna replace the date in the line has _date:. This make it easy to find and replace. --- title: "This is an template post" _date: Create a script to update the date Not thing special about the script. The hook is located in: ....

August 13, 2024 · 2 min

Add comment section on Hugo

ref: https://gohugo.io/content-management/comments/ There are multiple plugin/provider to use for this feature, but we gonna choose Disqus, due to it’s quite well-known. Step 1: Register and setup an account in Disqus This is the website: https://disqus.com/ The register process is quite simple, the only thing you need to remember is your short name it like your website id. Step 2: Include the service to hugo.yaml services: disqus: shortname: your-short-name-here Step 3: Update comments....

September 15, 2020 · 1 min

This is an template post

First section Variables for the settings: https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-variables/ Subsection 1 This is subsection 1 Subsubsection This is sub-subsection How to insert code Example: https://github.com/adityatelange/hugo-PaperMod/blob/exampleSite/content/posts/code_syntax.md Basically you, just need this on the top of the block: ```vue {linenos=true} 1 2 3 4 5 6 7 8 <template> <v-chip size="x-small" :color="props.color" style="margin-right: 3px; margin-bottom: 2px"> <div style="font-weight: bold">{{ props.text }}</div> </v-chip> </template> <script setup> const props = defineProps({ text: { type: String }, color: { type: String } }); </script>

1 min