Old personal Hugo site of Noah Williams, licensed under MIT for educational benefit.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Noah Williams 0fbd074913 Grammatical revision 1 year ago
archetypes init 1 year ago
archive move completed to-do file for installation to archive dir 1 year ago
content Add message of deprecation 1 year ago
data Add example content 1 year ago
hooks move hooks into dedicated hooks directory 1 year ago
nginx Remove nginx listener that was breaking certbot 1 year ago
static Try to add keybase icon 1 year ago
themes/hugo-future-imperfect Rebuild 1 year ago
.gitignore Add docs folder to gitignore 1 year ago
.gitmodules Clumsily update the theme 1 year ago
Dockerfile Add nginx package to dockerfile 1 year ago
README.md Grammatical revision 1 year ago
config.toml Remove useless bitbucket 1 year ago
install_server.sh Add fully qualified path to chmod line 1 year ago
license.md License software under MIT & release 1 year ago
save.sh Add incremental save script 1 year ago

README.md

(Deprecated) Documentation for noahsbwilliams.com

Note: This repository exists for reference purposes and is no longer actively maintained. Current website stack consists of a Ghost instance running on another VPS.

Stack

Hugo static site served by Nginx on Ubuntu Server 18.04 LTS

Functions

  • Function as git SCM server to supplement GitHub repo

  • Analytics on site traffic

  • Serve Hugo static content

  • Feature SEO-indexable main domain website for personal blog and list of projects

  • Be separate from personal cloud

  • Auto-build website from a git branch

  • Be easily editable from any git client

  • Feature convenient installer script

  • Feature Docker container for easy deployment on any server

Nginx Configuration

In /etc/nginx/sites-availible, an nginx server block is present. This is a copy of the one located in the nginx folder of this repository. This is symlinked into /etc/sites-enabled. In a future docker image or deploy script, this server block will be included; for now, including it is too complicated for deployment.

While port 80 is left open, SSL is enabled through certbot, and automatic HTTPS redirects to port 443 are enabled globally.

Deployment/DevOps

The unprivileged git user in the group devops is used on the server for SCM & DevOps purposes. In its home folder is a git repository called personalWebsite.git, which is configured as one of two remotes for this site (the other being this GitHub page). The post-receive script checks out the site to /home/personalWebsite, also set to ownership by the git user, then copies the contents of the docs folder within that to /var/www/noahsbwilliams.com to sanitize them.

The deploy directory for noahsbwilliams.com is /var/www/noahsbwilliams.com. It is owned by www-data:devops and its permissions are set to 775 so the git user can both read & write.

On the server, the post-receive file included in this repo is symlinked into /home/git/personalwebsite.git/hooks for easy updates.

On the local machine, the script in the pre-commit git hook is used, symlinked into ./.git/hooks for easy updates. It conducts automatic rebuilds in the development environment for every commit.

To do (also see to-do.md)

  • Symlink git hooks included in SCM to git hooks directory (server side)
  • Needs testing & potential editing of script
  • Fix weird issue with older version of hugo not recognizing the necessary elements to render a page properly
    • Call the snap version of hugo directly from build script.
    • This is useful because the version of hugo distributed through apt is not new enough to get the required features working.
  • Document nginx server blocks configuration better
  • Fix inconsistent loading of images
    • This was mitigated by changing featuredpath from =date to the actual hardcoded path of the featured images in each post.

Notable quirks

  • When deploying, setup ssl pronto on server - both Safari and Brave web browsers refuse to load JavaScript on http pages!
  • Don't include nginx listers on port 443! This breaks Certbot! Listeners on port 80 are fine though.
  • Running hugo server while running an independent hugo build might result in glitches for that build.
    • Determined to be an issue with the implementation of js loading featured images using the "path by date" function.