Skip to content

Instantly share code, notes, and snippets.

@codepediair
Last active February 21, 2023 15:10
Show Gist options
  • Save codepediair/cb9390a39603a7e722961c25160c7dfb to your computer and use it in GitHub Desktop.
Save codepediair/cb9390a39603a7e722961c25160c7dfb to your computer and use it in GitHub Desktop.

deploy site to github pages

  1. run this command to regenerate the files
hugo
  1. go to github and create a repository whit this name

<user_name>.github.io/ for me codepediair.github.io/mysite

  1. and push all codes

create web site in 5 minutes

and deploy this on github pages

  1. install git
winget install --id Git.Git -e --source winget

  1. install HUGO
scoop install hugo-extended

  1. create new site with hugo cli
hugo new site mySite

  1. change directory to site
cd mySite

  1. add git to project
git init

  1. add theme
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke

  1. create first contant
hugo new posts/my-first-post.md
  1. open project in vscode or any code editor
code .

** open config.toml ** and add this line to buttom

baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
theme = 'ananke'
  1. go to content/posts/my-first-post.md and add this lines
---
title: "My First Post"
date: 2023-02-21T10:59:28+03:30
draft: true
---
## Introduction

This is **bold** text, and this is *emphasized* text.

Visit the [Hugo](https://gohugo.io) website!
  1. Run server
hugo server --buildDrafts
hugo server -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment