Learning to Make a Website- Setting Up
The rabbit-hole went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that Alice had not a moment to think about stopping herself before she found herself falling down a very deep well.
For reference I am using a Macbook and text editor. I don’t really understand all the steps but it seems to be enough to get going. Most of the stuff below comes about from just typing text into the Terminal. Here’s a good intro to the Terminal. I started using instructions from this book which is great if you want a complete instruction. I might try using Gatsby in the future, they seem to have a good tutorial for set up.
Install Packages
I am using a framework called Hugo. They have a bunch of nice looking simple themes and promise really fast loading speeds. On my Macbook, I first installed a software called Homebrew that can then easily install Hugo, and in the future, whatever other packages are of interest.
Following the directions on the Homebrew website, I just copy and pasted the line of code there into the Terminal. It came up with an error… usually I just google the error and try a bunch of solutions until I find something that works. You should probably be a little careful when pasting in random code from online into your terminal FYI. In my case the error came up because of some problems with permisions. The solution was in this Stack Exchange post, which I copy and pasted into the Terminal:
sudo chown -R $(whoami) /usr/local/*
Next to install is Hugo. Into the Terminal we go:
brew install hugo
Navigate to the folder on your computer where you want to store the website folder while you work on it, replace the **** with your user name on the computer:
cd /Users/****/Documents/Hugo
and then finally create your site! Replace the **** with your site name.
hugo new site ****
Next commit the changes to git version control, you only do the first line one time, when you add new blog posts you use the second two, just replace “Create Website” with whatever changes you made for your notes.
git init .
git add .
git commit -m "Create Website"
I’ll look into git in the future, it doesn’t seem necessary to know more than that to get started..
Choose a theme and download it into the ‘themes’ folder of your website project. I chose Anatole. The documentation on that is pretty helpful.
Lastly, start the server in the Terminal, and then in your browser of choice navigate to http://localhost:1313
hugo run server
Leave the terminal window open while you work on the various pages in your website folder and it will automatically update the site!