Intro
- We’ll be using
yml/yamlformat for all examples down below, I recommend usingymlovertomlas it is easier to read. - You can find any YML to TOML converters if necessary.
Guide
Follow Quick Start guide to setup hugo and create a new site.
QuoteNote: Use -f to select yml format
hugo new site <name of site> -f yml
Make sure you install latest version of hugo.
After you have created a new site, at Step 3 follow the steps:
Method 1
Inside the folder of your Hugo site, run:
git clone https://github.com/FreeCAD/website PATH_TO_YOUR_LOCAL_GIT_DIRECTORY --depth=1QuoteUpdating theme :
cd PATH_TO_YOUR_LOCAL_GIT_DIRECTORY git pull
Method 2
Or you can Download as Zip from Github Page and extract in your themes directory
Finally …
Add in config.yml:
theme: TrigoMethod 4
Install Go programming language in your operating system.
Intialize your own hugo mod
hugo mod init PATH_TO_YOUR_LOCAL_GIT_DIRECTORY- Add Trigo Theme in your
config.ymlfile
module:
imports:
- path: github.com/FreeCAD/website/tree/main/themes/Trigo- Update theme
hugo mod get -uSample config.yml
Use appropriately
baseURL: https://examplesite.com/
title: "ExampleSite"
paginate: 6
theme: Trigo
enableRobotsTXT: true
buildDrafts: false
buildFuture: false
buildExpired: false
pygmentsUseClasses: true
googleAnalytics: UA-123-45
minify:
disableXML: true
minifyOutput: true
params:
env: production # to enable google analytics, opengraph and schema.
title: "ExampleSite"
description: "ExampleSite description"
keywords: [Blog, Portfolio]
authors: [Me, You, Tom Sawyer]
images: [<link or path of image for opengraph>]
DateFormat: January 2, 2006
defaultChroma: auto # dark, light
showReadingTime: true
showShareButtons: true
showPagination: true
showCopyCodeButton: false
label:
text: Home
icon: /apple-touch-icon.webp
iconHeight: 35
analytics:
google:
SiteVerificationTag: XYZabcSample Page.md
---
title: "My first post"
date: 2020-09-15T11:30:03+00:00
# weight: 1
# aliases: [/first]
tags: [first]
authors: [Me, You, Tom Sawyer]
draft: false
description: "Desc Text."
disableShare: false
showReadingTime: true
showPagination: true
cover:
image: <image path/url> # image path/url
alt: <alt text> # alt text
caption: <text> # display caption under cover
---You can use it by creating archetypes/post.md
hugo new --kind post <name>