56
loading...
This website collects cookies to deliver better user experience
hugo new site ${siteName}
to create my site.git init
solved that really quickly. Then I created my repo on Github. After you do that it will give you instructions on how to create your first commit and change your origin for the remote and push your code. git submodule add ${url to theme repo} themes/{theme-name}
to put it in place.theme: "anubis" # This is the name of the folder in the themes directory
hugo serve
. But if you really want to get going then you will need to deploy it somewhere online. I put mine on netlify as I knew the name already and the process was simple enough. netlify.toml
[build]
publish = "public"
command = "hugo --gc --minify"
[context.production.environment]
HUGO_VERSION = "0.85.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
[context.split1]
command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment]
HUGO_VERSION = "0.85.0"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.85.0"
[context.branch-deploy]
command = "hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
HUGO_VERSION = "0.85.0"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"
.yml
and not .yaml
. It only looks for the one).backend:
name: git-gateway
branch: main
repo: jamesattensure/integratn-io
publish_mode: editorial_workflow
media_folder: "static/images"
public_folder: "/images"
collections:
- name: "posts"
label: "Posts"
folder: "content/posts"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
fields:
- {label: "Draft", name: draft, widget: "boolean", default: true}
- {label: "Layout", name: "layout", widget: "hidden", default: "post"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Categories", name: "categories", widget: "list"}
- {label: "Tags", name: "tags", widget: "list"}
- {label: "Series", name: series, widget: "list"}
- {label: "No Comment", name: "nocomment", widget: "boolean", default: false}
- {label: "Body", name: "body", widget: "markdown"}
config.yaml
to connect it. Here are the two posts I followed to get it setup. cloudywithachanceofdevops.com and gideonwolfe.com.