Intro
- We’ll be using
yml/yaml
format for all examples down below, I recommend usingyml
overtoml
as 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.
Note: 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/FreeCAD-website PATH_TO_YOUR_LOCAL_GIT_DIRECTORY --depth=1
Updating 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
Direct Links:
Finally …
Add in config.yml
:
theme: FC
Method 4
Install Go programming language in your operating system.
Intialize your own hugo mod
hugo mod init PATH_TO_YOUR_LOCAL_GIT_DIRECTORY
- Add FC in your
config.yml
file
module:
imports:
- path: github.com/FreeCAD/FreeCAD-website/tree/main/themes/FC
- Update theme
hugo mod get -u
Quick Links
Sample config.yml
Use appropriately
baseURL: https://examplesite.com/
title: "ExampleSite"
paginate: 6
theme: FC
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]
author: "FreeCAD"
# author: [Me, You] # multiple authors
images: [<link or path of image for opengraph>]
DateFormat: January 2, 2006
defaultTheme: auto # dark, light
disableThemeToggle: false
ShowReadingTime: true
ShowShareButtons: true
ShowPaginationLinks: true
ShowCopyCodeButton: false
hideSummary: false
label:
text: Home
icon: /apple-touch-icon.png
iconHeight: 35
analytics:
google:
SiteVerificationTag: XYZabc
Sample Page.md
---
title: "My first post"
date: 2020-09-15T11:30:03+00:00
# weight: 1
# aliases: [/first]
tags: [first]
author: "FreeCAD"
# author: [Me, You] # multiple authors
draft: false
description: "Desc Text."
disableShare: false
hideSummary: false
ShowReadingTime: true
ShowPaginationLinks: 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>