Hugo Commands and Config
☰ Table of Content
Some Hugo commands and config.
New site
| |
New post
| |
Add section
A new section requires:
- An archetype file.
- A
_index.mdinside section folder. - A
[menu]entry inconfig.toml.
Following example creates a section call section91.
Archetype
Copy archetypes/default.md to archetypes/section9.md and modify type:
| |
Value of type will be section directory name. See below.
Title
Create a test.md under section9
| |
That will create directory section9 under content with test.md inside. Create _index.md to set the title:
content/section9/_index.md:
| |
Menu
Add a menu entry else the new section will not be shown:
config.toml:
| |
Syntax Highlight
Enable syntax highlight in config.toml:
| |
Rsync
Ssh rsync public folder to remote server:
| |
John Siu
Update: 2022-05-12