Installation | Update

Read Install and Update instructions here

2 min FreeCAD
a cover alternative title

IntroLink to this heading

  • We’ll be using yml/yaml format for all examples down below, I recommend using yml over toml as it is easier to read.
  • You can find any YML to TOML converters if necessary.

GuideLink to this heading

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 1Link to this heading

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 2Link to this heading

Or you can Download as Zip from Github Page and extract in your themes directory

Direct Links:

Finally …Link to this heading

Add in config.yml:

theme: FC

Method 4Link to this heading

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


Sample config.ymlLink to this heading

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.mdLink to this heading

---
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>