Command Line helper in VSCode for Hugo Static Site generator.
gohugo.config
:string
- Relative path to your Hugo Config TOML file
- Default:
config.toml
gohugo.port
:number
- Hugo Development server PORT
- Default:
3000
gohugo.showTerminal
:boolean
- Show Terminal on Hugo Server Start. Enable it to show the terminal where Hugo Server is running. If false, terminal is hidden, and can be manually opened by the user, if needed.
- Default:
false
Provides following VSCode Commands
- Get Version
- To get
hugo
command version
- To get
- Create New Site
- Creates a new hugo project, and changes workspace
- Add Theme or Select Theme
- Add Theme, from custom URL
- Select themes from Hugo's official list.
- Create New Content
- Creates a new Post, or any Content.
- Supports Archetypes completely, i.e.
- Templates defined under archetypes will be considered, while creating new content
- Folder Templates defined as archetypes will be used to spit out folder content, with --kind option.
- Start/Stop Debug Server
- Build
- Generate Prod Build
Currently this project supports only .toml
configurations.
To open VSCode Command Palette, click
- Windows/Linux:
CTRL + SHIFT + P
- MacOS:
CMD + SHIFT + P
Create new content without Archetypes
Create new content with Archetypes
Create new content is a special command which supports Archetypes as well as plain default templates. User should keep a note of the following 3 things that can happen if using this command:
- Without Archetypes:
- When there is no archetype templates, user is free to pass any string path, which can
contain filenames or filenames within a subdirectory e.g:
default
will create adefault.md
file incontentDir
posts/default.txt
will a create a subdirectoryposts
insidecontentDir
, with a filedefault.txt
in it.
- When there is no archetype templates, user is free to pass any string path, which can
contain filenames or filenames within a subdirectory e.g:
- With Archetype:
- User can still use Default template with option
[Default]
- User can chose a Archetype Template Directory and input a path where proper files will be created
- User can chose a Archetype Template File and input a path with filename.
- If a Subdirectory is present in the path, new generated file will be created inside that subdirectory.
- If not Subdirectory is not present, file will be generated in
contentDir/
.
- User can still use Default template with option
- Current version works only with
.toml
configurations.- Will fix this in later releases.