We have a scenario where you are already using the default page http(s)://<username>.github.io
so
you need to change your publishing source.
- You have Hugo generator installed. (ref: how install hugo)
- You have created and configure github repository where you want save your blog info. (ref: creating and configuring Hugo static website)
hugo server -D
####
# ........
# Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
####
In your root directory:
hugo
####
# ........
# build all html pages, so the next step must be populate the document which
# have been created peeviouly
####
- The hugo static site will need a binding to a github url publishing source:
In the config.toml file the key baseURL must have the github url
page
baseURL =http(s)://<username>.github.io/$githubblogrepositoryname
- The hugo static site will need to know the destination to generate the static site, this is a binding to github url
publishing source:
publishdir = "docs". This folder name must be the same that you configure on setting your githubblogrepository pages source
ref how configure publishing resources - Check that you are on $githubblogrepositoryname and then launch: hugo -D
- Commit and upload the changes to remote and have fun 👍
Some hugo references: