Best way to add image in markdown file in VSCode - using VSCode plugin 'Paste Image'
Greatly simplifies working with images in md file in VSCode, and IMO one of the best ways to create blog post md in VSCode
When working on a blog post that is written in .md, adding an image in the .md file can be tedious.
You can point to an image by its URL:
![alt-text](<url-of-image>) Alternatively you can place the image locally in static folder in hugo project root, as described in How to add image to a Hugo blogpost...
How to create a new Post in a Hugo blog
Method 1 hugo new posts/<name-of-post-file.md> Method 2 Directly create a MD file under content/posts and add frontmatter manually / copy from a existing md file.
Method 3 Learnt from a hugo theme(PaperMod) documentation here
Create new post md file based on a archetype.
Before doing this, add the archetype md file at archetypes/post.md
hugo new --kind post <name> # name must have .md or
hugo new -k post <name> # use -k instead of --kind But above creates new md file directly in content whereas I want it in content/posts/ (I could not see md files appear as posts in this theme until the md files are in content/posts/)....
How to add image to a Hugo blogpost
Adding image in body of your post in Markdown in Hugo.
You can add the image file say image.png to static folder, and then reference it in your md file which is at content/posts/ just like following:
![alt-text](/image.png) Reference: page
Also see: Add image in markdown file in VSCode using plugin Paste Image
Create Blog With Hugo
Hugo is one of the most popular open-source static site generators. Static sites can be created with Markdown files using Hugo.
This article outlines the steps to generate a blog(static site) using Hugo and hosting it on GitHub.
Installing Hugo Hugo is available as an executable binary for all platforms, so no ‘installation’ is required as such. Just download and add its location to your Path to access it from anywhere in your terminal....