Websites for little guys
2023-10-21T16:59:57+03:00
I like making sure other people can get exactly the same access to all the tools I use. If anything you see me do today looks interesting, feel free to ask me how I did it! Or you can grab all the tools I will use at once by following these simple steps.
Minimum viable terminal programs:
Recommended terminal programs:
how is it 2023 and nobody's come up with a satisfying explanation as to why cell phones never show up in our dreams if we're using them for 12 hours a day?
— Zephyr On Call (hibernating - back 2024) (@zephyr_on_call) May 14, 2023
hiAndrewQuinn
or some varianthttps://gohugo.io/ | https://github.com/gohugoio/hugo
winget install Hugo.Hugo.Extended
.
winget
? Install it with the instructions here, then try it.brew install hugo
.
brew
? Install it with the command here, then try it!sudo snap install hugo
> sudo apt install hugo
(gives newer version)hugo version
.
Much more complex instructions @ Installation | Hugo!
⚠️: Most of the shorter commands work in PowerShell too. ChatGPT comes in really handy here.
New-Item -ItemType Directory -Name "example-1"
mkdir example-1
Set-Location -Path "example-1"
cd example-1
pwd
. Does it end with example-1
?
ls
(works everywhere). The folder should be empty.⚠️: Anything which starts with hugo
is built into the hugo
program itself and should work identically on both PowerShell and other shells.
# Hugo 101 :: Start a new Hugo website!
# Hugo 101 :: The dot '.' means "Start it right here, not in a folder in here."
# Hugo 101 :: The '--force' means "Even if this isn't empty" (although it _should_ be).
hugo new site . --force
# Hugo 101 :: ... oh, and these things are comments.
# Hugo 101 :: You can paste them into the shell harmlessly. In fact I recommend it!
Check that it worked: Run ls
(works everywhere) to see if a bunch of new folders were created.
If you want to get rid of everything in the folder and start from the beginning:
pwd
first.Remove-Item -Recurse -Force *
rm -rf *
(does NOT work on PowerShell)Hugo always needs a theme before it will make anything show up at all. Let’s give it one!
# Hugo 101 :: Make a new theme, called minimum-viable-hugo.
hugo new theme minimum-viable-hugo
# Hugo 101 :: Tell Hugo we want to use minimum-viable-hugo.
echo "theme = 'minimum-viable-hugo'" >> hugo.toml
hugo.toml
is a TEXT FILE that should appear where we are. It tells Hugo all the settings for the whole project. We can open it in any text editor we want, even Notepad if that’s all we have!
.toml
= Tom’s Obvious Minimal Language. Easy to read!
You can see what’s in it with gc hugo.toml
(PowerShell) / cat hugo.toml
(shell) / bat hugo.toml
(Shell Bling Ubuntu).
# Hugo 101 :: GOTCHA #1: Your root page is called _index.md.
hugo new _index.md
echo "Lorem ipsum dolor sit amet" >> content/_index.md
.md
= Markdown. Because writing HTML by hand sucks.
# Hugo 101 :: An H1 heading in Markdown
## An H2 heading in Markdown
*Italics* and **bold** in Markdown.
![Alt text:A place to an image in Markdown](image-in-markdown.jpg)
We can open _index.md
in any text editor we want, and in fact we will!
If you look at content/_index.md
, with cat
or gc
or opening it in a text editor, it will look like
Change draft
to false
. Then you’ll be able to run your site with just
Time set aside to answer questions, try out some of the ‘advanced’ stuff on Minimum Viable Hugo, just generally let people try things they think would be neat, etc.
localhost
== using your own computer as the server! Neat!Time set aside to set up Github accounts for anyone who needs one.
git
Time set aside to install Git for anyone who needs it.
git version
. If something appears, it’s installed!gh
[1/2]gh
command-line tool.Time set aside to install cli.github.com.
gh version
.gh
[2/2]gh auth login
and follow the instructions.
Check: Run gh auth status
. If it shows your username, you’re golden!
example-1
folder in the terminal.gh repo create
and follow the instructions.Time set aside to get a new Git repo online.
Time set aside to follow the Procedure at GoHugo.IO.
add - commit - push
loop.
git add .
will add all of your changes.git commit -m "Description of what I did"
will commit them all to Git’s “long term memory”.git push
will push your changes to GitHub, where
I do this exact thing dozens of times a day in the real world. add
, commit
, push
. That’s it. It’s literally how I built this whole presentation!
hugo server
in another terminal, minimize it, and visit localhost:####
in your web browser to see the content change.example-1/content/_index.md
. Anything!localhost:####
again in your web browser.git status
to see the change.git add .
, git commit -m "just playing around"
, git push
… and then wait.Time set aside to answer questions, help people who ran into issues, let people try things they think would be neat, etc.
Time set aside to get fireship.io running locally and start tweaking it live in front of people.