Install hugo

PS C:\matt> choco install hugo -confirm

Output:


Chocolatey v0.10.15
[Pending] Removing incomplete install for 'hugo'
Installing the following packages:
hugo
By installing you accept licenses for the packages.

hugo v0.62.1 [Approved]
hugo package files install completed. Performing other installation steps.
Downloading hugo 64 bit
  from 'https://github.com/gohugoio/hugo/releases/download/v0.62.1/hugo_0.62.1_Windows-64bit.zip'

Progress: 0% - Saving 84.56 KB of 12.64 MB
Progress: 1% - Saving 169.56 KB of 12.64 MB
Progress: 1% - Saving 254.56 KB of 12.64 MB
Progress: 2% - Saving 339.56 KB of 12.64 MB
<snip>

Progress: 95% - Saving 12.03 MB of 12.64 MB
Progress: 96% - Saving 12.17 MB of 12.64 MB
Progress: 97% - Saving 12.33 MB of 12.64 MB
Progress: 98% - Saving 12.47 MB of 12.64 MB
Progress: 99% - Saving 12.63 MB of 12.64 MB
Progress: 100% - Completed download of C:\Users\matty_bpxbglc\AppData\Local\Temp\chocolatey\hugo\0.62.1\hugo_0.62.1_Wi ndows-64bit.zip (12.64 MB).
Download of hugo_0.62.1_Windows-64bit.zip (12.64 MB) completed.
Hashes match.
Extracting C:\Users\matty_bpxbglc\AppData\Local\Temp\chocolatey\hugo\0.62.1\hugo_0.62.1_Windows-64bit.zip to C:\Progra mData\chocolatey\lib\hugo\tools...
C:\ProgramData\chocolatey\lib\hugo\tools
 ShimGen has successfully created a shim for hugo.exe
 The install of hugo was successful.
  Software installed to 'C:\ProgramData\chocolatey\lib\hugo\tools'

Chocolatey installed 1/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

End of output

Check hugo install

This didn’t work….


PS C:\matt> hugo --version

Output:

hugo : Error: unknown flag: --version
At line:1 char:1
+ hugo --version
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error: unknown flag: --version:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Usage:
  hugo [flags]
  hugo [command]
Available Commands:
  config      Print the site configuration
  convert     Convert your content to different formats

End of output

…because it’s just:

hugo version

Output: Hugo Static Site Generator v0.62.1-A1518704 windows/amd64 BuildDate: 2020-01-01T17:39:35Z End of output

Create a site

PS C:\matt> hugo new site mattypenny.net

Output:

Congratulations! Your new Hugo site is created in C:\matt\mattypenny.net.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/ or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.

End of output

Tried to run git init

PS C:\matt\mattypenny.net> git init

Output:

git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check 
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ git init
+ ~~~
    + CategoryInfo          : ObjectNotFound: (git:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

End of output

…and found it wasn’t installed.

I did find an executable:

PS C:\matt\mattypenny.net> C:\Users\matty\AppData\Local\Programs\Git\bin\git.exe init

Output:

Initialized empty Git repository in C:/matt/mattypenny.net/.git/
C:\Users\matty\AppData\Local\Programs\Git\bin\git.exe : warning: 'C:\ProgramData/Git/config' has a dubious owner: 
'matty'.
At line:1 char:1
+ C:\Users\matty\AppData\Local\Programs\Git\bin\git.exe init
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (warning: 'C:\Pr...owner: 'matty'.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
For security reasons, it is therefore ignored.
To fix this, please transfer ownership to an admininstrator.

End of output

Re-installed git

PS C:\matt\mattypenny.net> choco install git

Output:

Chocolatey v0.10.15
Installing the following packages:
git
By installing you accept licenses for the packages.

Progress: Downloading git.install 2.24.1.2... 0%
Progress: Downloading git.install 2.24.1.2... 0%
Progress: Downloading git.install 2.24.1.2... 0%
Progress: Downloading git.install 2.24.1.2... 0%
Progress: Downloading git.install 2.24.1.2... 0%
Progress: Downloading git.install 2.24.1.2... 0%
Progress: Downloading git.install 2.24.1.2... 0%
Progress: Downloading git.install 2.24.1.2... 0%
Progress: Downloading git.install 2.24.1.2... 0%


Progress: Downloading git 2.24.1.2... 76%
Progress: Downloading git 2.24.1.2... 97%
Progress: Downloading git 2.24.1.2... 100%

git.install v2.24.1.2 [Approved]
git.install package files install completed. Performing other installation steps.
The package git.install wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation

End of output ….and it hung after all the output above

I think that despite the stuff about chocolateyInstall.ps1, git was now installed.

I switched to got bash for the new bit

Setting up git

$ cd /c/matt/website

$ git submodule add -b master git@github.com:mattypenny/mattypenny.github.io.git public

Output:


Cloning into 'C:/matt/website/public'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:mattypenny/mattypenny.github.io.git' into submodule path 'C:/matt/website/public' failed

matty@sandie MINGW64 /c/matt/website (master)

End of output

$ ssh-keygen -t rsa -b 4096 -C "me@gmail.com"

Output:

Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/matty/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/matty/.ssh/id_rsa.
Your public key has been saved in /c/Users/matty/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:blah-de-blah
The key's randomart image is:
+---[RSA 4096]----+
|:) snip          |
+----[SHA256]-----+

End of output

$ ssh-add ~/.ssh/id_rsa

Output:

Could not open a connection to your authentication agent.

End of output

$ eval $(ssh-agent -s)

Output:

Agent pid 1798

End of output

$ ssh-add ~/.ssh/id_rsa

Output:

Enter passphrase for /c/Users/matty/.ssh/id_rsa:
Identity added: /c/Users/matty/.ssh/id_rsa (me@gmail.com)

End of output

$ clip < ~/.ssh/id_rsa.pub
$ ssh -T git@github.com

Output:

Hi mattypenny! You've successfully authenticated, but GitHub does not provide shell access.

End of output

Set up the github.io repo as the master for the hugo ‘public’ folder

$ git submodule add -b master git@github.com:mattypenny/mattypenny.github.io.git public

Output:

Cloning into 'C:/matt/website/public'...
Warning: Permanently added the RSA host key for IP address '140.82.118.3' to the list of known hosts.
warning: You appear to have cloned an empty repository.
fatal: 'origin/master' is not a commit and a branch 'master' cannot be created from it
Unable to checkout submodule 'public'

End of output

Push it to github

$ cd public
$ git add .

Output:

warning: LF will be replaced by CRLF in blog/hello-world-5/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in blog/index.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in categories/index.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in index.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in sitemap.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tags/index.xml.
The file will have its original line endings in your working directory

End of output

$ git commit -m 'First build'

Output:

[master (root-commit) f38d607] First build
 46 files changed, 2676 insertions(+)
 create mode 100644 android-chrome-192x192.png
 create mode 100644 android-chrome-512x512.png
 create mode 100644 apple-touch-icon.png
 create mode 100644 blog/hello-world-5/index.html
 create mode 100644 blog/index.html
 create mode 100644 blog/index.xml
 create mode 100644 browserconfig.xml
 create mode 100644 categories/index.html
 create mode 100644 categories/index.xml
 create mode 100644 css/fonts/miriamlibre-bold.woff
 create mode 100644 css/fonts/miriamlibre-bold.woff2
 create mode 100644 css/images/arrow_effect.svg
 create mode 100644 css/images/icon-tick.svg
 create mode 100644 css/images/stripe.svg
 create mode 100644 css/prism.css
 create mode 100644 css/styles.css
 create mode 100644 favicon-16x16.png
 create mode 100644 favicon-32x32.png
 create mode 100644 favicon-96x96.png
 create mode 100644 favicon.ico
 create mode 100644 images/CreateGithubPages010.png
 create mode 100644 images/CreateGithubPages020.png
 create mode 100644 images/browser-chrome-android.svg
 create mode 100644 images/browser-chrome.svg
 create mode 100644 images/browser-edge.svg
 create mode 100644 images/browser-firefox-android.svg
 create mode 100644 images/browser-firefox.svg
 create mode 100644 images/browser-ie.svg
 create mode 100644 images/browser-opera.svg
 create mode 100644 images/browser-safari-ios.svg
 create mode 100644 images/browser-safari.svg
 create mode 100644 images/icon-info.svg
 create mode 100644 images/icon-tag.svg
 create mode 100644 images/icon-warning.svg
 create mode 100644 images/logo.svg
 create mode 100644 index.html
 create mode 100644 index.xml
 create mode 100644 js/dom-scripts.js
 create mode 100644 js/prism.js
 create mode 100644 js/service-worker-registration.js
 create mode 100644 mstile-150x150.png
 create mode 100644 safari-pinned-tab.svg
 create mode 100644 site.webmanifest
 create mode 100644 sitemap.xml
 create mode 100644 tags/index.html
 create mode 100644 tags/index.xml

End of output

$ git push origin master

Output:

Enumerating objects: 57, done.
Counting objects: 100% (57/57), done.
Delta compression using up to 2 threads
Compressing objects: 100% (56/56), done.
Writing objects: 100% (57/57), 184.08 KiB | 1.96 MiB/s, done.
Total 57 (delta 10), reused 0 (delta 0)
remote: Resolving deltas: 100% (10/10), done.
To github.com:mattypenny/mattypenny.github.io.git
 * [new branch]      master -> master

End of output

Pushing the source to github

Tried this:

git push origin master

…but it failed

Output:

git push origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

End of output

Went back to the github instructions

???? image

then did this:

cd /c/matt/website (master)
git remote add origin https://github.com/mattypenny/website.git

Then the push worked

$ git push origin master

Output:

Enumerating objects: 346, done.
Counting objects: 100% (346/346), done.
Delta compression using up to 2 threads
Compressing objects: 100% (336/336), done.
Writing objects: 100% (346/346), 8.75 MiB | 1.71 MiB/s, done.
Total 346 (delta 29), reused 0 (delta 0)
remote: Resolving deltas: 100% (29/29), done.
To https://github.com/mattypenny/website.git
 * [new branch]      master -> master

End of output