SQLServerCentral Article

Building SQL Memorial - Getting Started

,

Introduction

One of the projects I've been wanting to tackle for some time is putting up a memorial for those people that our community has lost. I talked about it when Dwain Camps passed, and I kicked myself for not having something available when Tom Roush passed. Recently Gareth Swanepoel suddenly left us after COVID-19 related complications and I decided to move forward.

My aim here is to have a place that we can remember those that touched us. I don't want to control it, but provide a way for others to include thoughts, pictures, links, and more. I've announced some losses in Database Weekly, but I'd like something more permanent. I like what Todd Kleinhans did with his SQL Memorial, and I hope this can include, and expand, on his work. I also hope that others contribute and submit PRs that might contains their own thoughts and memories.

I'm also hoping some people with more creativity and artistic talent help me improve the project. To do that, I think an open source GitHub project is the way to do this. I've tried a few different ways to build a site over the years, but for this I think a static site is the best idea.

For those that want to see the site, it is available at www.sqlmemorial.org.

Tools Used

I used a few tools to start to assemble this site, and I've listed them here. While this isn't database related, this is a simple way to start getting some data distributed out to people. I'm going to use Jekyll, but that will require a few things. Since I tend to work on Windows, I don't want to install a bunch of things I don't use, so I'm going to make this containerized.

Getting Started

To get this project going, I started by setting up version control. I want to keep track of changes, and more importantly, ensure others can contribute. From there, I needed to get the site up and running, This section will look at the steps I followed to get my site working.

GitHub

My first step was to build a repo on GitHub. While I do think this ought to be held by some organization at some point, I decided to just get going. I did spend a few minutes looking at repo transfers, and since I can transfer this late, I was happy. I started by clicking the New option at GitHub under my account and setting up a new repo.

new repo name

I wasn't sure what else to choose, so I started with these settings. I assume I can change them later, and I'm not terribly worried about licensing here, but I've always liked the work the Creative Commons has done.

repo settings

With this setup, I cloned the repo to my local machine. I edited the README.MD and then submitted that.

Since I've learned not to go crazy up front, I also quickly created a new branch and checked it out. I'll use this to experiment with Jekyll.

My repo is here: https://github.com/way0utwest/sqlmemorial

Docker

I've had Docker Desktop running for quite some time. I use this for some work with Redgate, but also for multiple SQL Server installations that I don't want to permanently run. It works well, and it's been easy to get going. I'm not going to explain how to set this up, but once you have this up, it's not bad.

I ran this initially:

docker pull jekyll/jekyll

This gets the latest image for Jekyll, but in some initial testing, there are some issues with this v4.x image. Instead, I saw some posts where people noted that v3.8 seems to build and serve correctly. As a result, I deleted that image and then ran this:

docker pull jekyll/jekyll:3.8

Local Jekyll

Once I had the image, I needed to create a new Jekyll site. I'll explain more about how this works as I build the site, but for now, essentially you need a folder structure where you drop content. To do that, you need to run the "jekyll new" command. In the root of my repo, I ran this:

docker run --rm --label=jekyll --volume=%CD%:/srv/jekyll -it -p 4000:4000 jekyll/jekyll:3.8 jekyll new sqlmemorial

This got me a new folder under my repo.

repo root folder structure

Inside here, I had the beginning of a jekyll site.

basic jekyll site.

I edited the index file as follows:

Editing the main page.

Once this was done, I then ran these commands.

cd sqlmemorial
docker run --rm --label=jekyll --volume=%CD%:/srv/jekyll -it -p 4000:4000 jekyll/jekyll:3.8 jekyll build

This built the site. In my folder, I can now see an _site folder, in which the markdown and other files are converted to HTML.

structure of the site once built

To test things, I then decided to serve the site locally. This is the command I ran:

docker run --rm --label=jekyll --volume=%CD%:/srv/jekyll  -it -p 4000:4000 jekyll/jekyll:3.8 jekyll serve

When this gets going, I see this in the CLI, which tells me the site is up:

Jekyll site running

If I browse to http://localhost:4000, I now see this:

Default Jekyll Site running

Changing Configuration

I hadn't committed anything yet, and I want something that sort of feels like a 0.1 version, so I need to edit the various items on the page. To do that, I'll start with the config.yml file that was create. This is a generic configuration file, and the information from here is used to build out the site and fill in some items. Here is the generic file:

Generic jekyll YAML config

I'll edit some items and save this. Once done, I re-run the "serve" command and get my local site up again. Things are looking better, but before I commit, there are a few things to change.

Beginning to customize the site

The first thing is to fix the About page. This is the About.md file in my repo. I'll edit that to have some information about me and the project.

The next thing is that the main page lists posts by default. For now, I think that's fine. I can have a post for each individual, but I need to add some. These are posts in the _posts folder under my site. If you look at the Jekyll documentation, you find that each of these posts needs to be in the format: YEAR-MONTH-DAY-title.MARKUP. In a practical manner, since I just attended Gareth Swanepoel's funeral, I'd set up this file for my post: 2021-01-08-gareth.swanepoel.md.

new file in explorer

I renamed the existing default file and then edited it. I used the text from the obituary, but I'm hoping that I can get more information and details from others. Potentially we can get a template of some sort as well.

I also had an image that I want to add. Images are something that I should include in the "Assets" folder. For Jekyll, this is created by the site build, but if I add this folder under SQLMemorial, anything I put in there will be copied to the site Assets folder. As a result, I'm going to create the "assets" and then an "images" folder. I'll put the image there.

Image assets

Now when I rebuild the site, I see the first post listed on the main page:

New home Page

Summary

This is a good start. The next part of this is to commit these changes to the repository and start getting automation set up to deploy this to the public site. That will let me share some information with others and ensure a more public recognition and memory for our community members.

Rate

4.5 (4)

You rated this post out of 5. Change rating

Share

Share

Rate

4.5 (4)

You rated this post out of 5. Change rating