Skip to content
Project for base hugo files
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
archetypes
config/_default
content
mttyd.github.io @ 7defbd5
resources/_gen
static/img
themes
.gitignore
.gitmodules
README.md
othermdstuff.md

README.md

My personal blog

If anyone else is playing along from home here's where I'm at...

  • Decided to move to hosting on mttyd.github.io
  • Using Hugo for static page generation
  • Decided on the Academia Hugo theme
  • Converted WP site to Hugo (converter did 40% of the job much re-formatting)
  • Cleaned up posts and removed a large amount of stale outdated content

Links:

Building your site using this template

If you aren't using an editor like Visual Studio Code or are unfamilar with programming this guide may prove difficult (it's brief). You may want to read the links above first and use this as a quickstart guide. Cloning my repository may be the simplist method since it is already a functional site.

  • First install Hugo using the getting-started link above
    • I am on Windows so from an admin PowerShell prompt I typed choco install hugo -confirm

With a new Hugo site


  • After installing Hugo create a project folder and from there run hugo new site sitename.com sitename being the name of your page
  • You will need to select a Hugo theme to use. I picked Hugo Academic
  • For other steps follow the links above

By Cloning my repository


  • Clone my repository and remove my stuff
  • from the root project folder run npm install If you don't have NPM installed
  • modify the base location and publish dir in /config/config.toml
  • Change the admin profile to your info /content/authors/admin/_index.md
  • Each section of the site lives in self descriptive folders
    • courses
    • home
    • post
    • project
    • publication
    • slides
    • task
  • I've disabled some of the sections but if you want to turn them modify the "active" attribute in each file in /content/home
  • Posts are all contained in their own /content/post/(post name folder) and each post page is named index.md
  • The featured.jpg file in each post will be the featured image for the site
  • I decided on placing all post images in the post folders but these could also be placed in /static/img

To run a test server

  • From the console in the root of yoru project type hugo serve
  • This will start a local development server you can view at http://localhost:1313

To generate static pages

in a terminal in the root directory of the project type hugo this will build the static pages in the folder that was specified in your /config/config.toml file

Hosting your site on github pages

  • Create a GitHub repository named (yourgithubusername).github.io
  • Copy the contents of your static pages directory to this repository
  • Your site will now be available on (yourgithubusername).github.io

Managing your site

I decided to create two GitHub repositories, one for my code and one for the static pages. Without making things more complex I commit and push to both of them depending on what I want to update.

You can’t perform that action at this time.