Why this Site Exists
Inspiration
This site wouldn’t exist without the initial spark that drove me to try to do this thing. That spark was lit by:
-
Luke Smith is a freedom-advocate who maintained a YouTube channel–and also a PeerTube instance–featuring technical videos showcasing free software. He has, on his channel, a video stepping through the process of publishing your own website; that video inspired me to try the same thing.
-
Friends
-
Ethan Bashkansky
I met Ethan in during Acad Camp; we were both students in the Robinson Center for Young Scholars at UW. Ethan is industrious and bold; even before it became hip to do so, he became a digital nomad and tutored online while travelling the world. To support his tutoring business, he created a website. He has been encouraging me to do the same for a while, and I’m finally complying with his (very good) advice.
-
Issa Rice
Issa was Ethan’s roommate. He’s very cool and has an amazing website (which I have also linked to from my homepage). Over the years, Issa has been an influence on Ethan’s thinking and also on mine. However, he is currently suffering from complications of Long Covid, and he could use your support. Maybe consider sending him a positive message. 🙂
-
Educational Materials Hosting
Beside the spark of inspiration, I have immediately realizable utility for a website with respect to my tutoring practice. In particular, I can post the educational materials I make for my clients on here.
-
Math
It is frequently the case that I am wanting for a program or a paper that I wrote; now, hopefully, I will be able to access these materials. Moreover, I will be able to direct my students to my website for them to peruse at their leisure. It is my hope that others will find these (freely available) materials useful.
-
Piano
Every piano teacher teaching young students will know that getting their students to practice is hard. I hope that having a website I can direct parents to (with instructions) will make it easier to enforce a practicing schedule. At the very least, it will be convenient for parents to access materials on-demand.
Personal Content
In addition to my tutoring/teaching, I also actually practice math and music. I hope to use my website as a gallery for my work.
-
Math
Most of my mathematical work is expositional. However, I do limited work towards research, as it were. I will publish my progress as it becomes available (and I flesh out the site).
-
Music
I haven’t published any music in a while (as of 2024, when writing this), but it’s my plan to change that. I’ve recently upgraded my recording studio (which will be a separate blog post), and I’m hoping to get music out in a few months at the latest.
-
Misc.
Who knows what else I’ll do? It might be nice to host git repos on here (as well as on github). Maybe I’ll even start making digital art! The sky’s the limit, really.
How this Site Exists
Building the Site
OK. It’s really easy to want to do something; it’s harder to actually do it. So, how did I make this site?
Learning Hugo from Scratch
In order to build an extensible website as painlessly as possible, I decided to use a static site generator:
Hugo. Hugo, like other static site generators, compartmentalizes structure–via templates–from
content–via .md
or .org
files, etc.
Structure
Layouts are the templates in Hugo; they define the structure for your pages and are the main things you have to define to make your site. The best way to understand how this works is by seeing some minimal examples. If you want to follow along at home, I have included instructions on how to quickly setup a development environment. As far as I know, the absolutely most minimal possible working hugo project is the following:
index.html:
test
hugo-project-root-directory
├── hugo.toml
└── layouts
└── index.html
You can see this page in your browser by running the hugo server
from within hugo-project-root-directory
; by
default, the address for the local server will be localhost:1313
, which you can put into your browser’s address bar.
You should see only the word test
on the page.
Content
However, the most principled way to structure our project is by changing it to the following:
index.html:
{{ define "test" }}
{{ .Content }}
{{ end }}
baseof.html:
{{ block "test" . }}
{{ end }}
_index.md:
test
hugo-project-root-directory
├── hugo.toml
├── layouts
│ ├── index.html
│ └── _default
│ └── baseof.html
└── content
└── _index.md
This should render exactly the same site.
Going Further
The examples above are minimal, and demonstrate the most basic way that Hugo works. However, they are woefully inadequate to demonstrate how Hugo works on a larger scale. I encourage you to experiement with them by following this tutorial. In that tutorial, the author actually follows sane conventions instead of singularly focusing on making the examples as minimal as possible.
From there, there is a whole world of possibilities with Hugo. See the official documentaion for more. Additionally, if you’re an emacs user, you can use org-mode to generate markdown with ox-hugo, and even combine that with org-roam.
Populating the Site
As of the time I’m writing this, I’m still adding stuff to the site. However, I can already mention a few things:
Text
I hope that the majority of the content on my site is useful text. I hope to regularly update my site with new text content, and so Hugo’s ability to render sites from markdown is very nice. I am an emacs user, and so I have been experimenting with ox-hugo. Ox-hugo uses org-mode to enhance the markdown-drafting experience. For this particular post, though I didn’t use it; I’ll have more to say about ox-hugo later.
Media
Besides text, I also want to have downloadable or interactive content on my site.
- Downloadable Papers
-
Math Exposition
I have a few of these expository papers stored up from my time in college. Some of them were incomplete or otherwise unsatisfactory, so it was good to revisit and revise them. Setting up this website has been a nice opportunity to clean some of those up.
-
Sheet Music
I have various scores I want to host on my website. In particular:
-
Compositions for Students
I like to have custom materials for my students whenever possible. In particular, I have some beginning piano students at the moment who would benefit from having custom pieces–with the sheet music available for their parents to download and be able to review.
-
My “Serious” Compositions
I have written various pieces over the years, and I would like to have my scores available for people to peruse. Moreover, if there’s already a place for my scores to live, maybe I’ll write some more pieces!
-
-
- JS Apps
-
Email Obfuscation Cipher
I want people to be able to contact me via email. However, I don’t want web-scrapers to get my email. So, I implemented a simple string involution to “encrypt” my email. The encrypted email is placed on the page, and people who wish to contact me can use my simple JS app to automatically decrypt it (and also to discover the encryption protocol, if they wish).
-
(Xenharmonic) Ear Training
I made an app that quizzes the user on musical ear-training using the Web Audio API. While I was at it, I added the ability to make the intervals Xenharmonic.
-
- Galleries
-
Music
Of course, it makes sense to put my musical recordings and videos on here–and so, I have and will.
-
Photos and Visual Art
I don’t take many photos–and most of the ones I do take will probably accompany text. However, I do take some photos from time to time. It might be nice to post them in one big collection (or organize them somehow). Also, I have been trying to get into making visual (and especially digital) art more. As I make pieces, I will post them. Hopefully, I will improve over time; I am certainly not a technically competent visual artist at this time.
-
Styling the Site
As of the time of writing, I haven’t done any styling. I will probably make a separate blog post about this later, since it’s a fairly involved process.
Deploying the Site
Now that my site is built, I have to actually publish it!
Domain Registration
I used Epik to register my domain. You may have noticed that my domain, sanchace.xyz
, uses
xyz
rather than com
. These “endings” are called top-level domains. Usually, com
is more expensive than xyz
,
and was originally primarily used by companies, and is administrated by Verisign.
Conversely, xyz
is explicitly general-purpose and is administated by XYZ.com and
Team Internet Group.
There are various other top-level domains, as well. You can see a full list here.
Hosting Solution
There are various hosting solutions you can use, including:
-
Free Static Site Hosting, such as:
-
Virtual Private Server – more commonly VPS
A VPS is basically a compute rental service over the internet. These usually cost ~$5/month. There are various providers for this, too:
-
Self Hosting
Alternatively, if your ISP will tolerate it, you can consider hosting your website on hardware you own. This is the ideal situation if you have a computer that can run at low power and can get a static IP, but good luck dealing with ISPs… There are work-arounds, like DDNS. However, I have decided to experiment some more with cloud computing for now.
Setting up the VPS
Once I got my server (which runs Debian, by the way), I needed to do a few things:
-
Securing the Server
The first thing I do when I spin up a server is to transfer my ssh keys and and disable password authentication. Then, instead of being able to access the server with a password (which could be anyone from anywhere), you must access the server from a machine with a private key that goes with the public keys on the server.
-
Setting up the Webserver
I use nginx as my webserver. It is pretty straightforward to set up; you just need to simlink
sites-available
tosites-enabled
and write a simple config file. -
Setting up HTTPS Certification
I use certbot to automatically generate–and renew!–Secure Sockets Layer (SSL) certificates. SSL certificates enable HTTPS, where the “S” stands for “Secure” (and the “HTTP” stands for “HyperText Transfer Protocol”).
Deploying the Site
I used rsync to move the site files from my local development environment to the
webserver. Traditionally, the directory is some subdirectory of /var/www/
. That’s it!