I think i just got one-shotted by Claude

This is a post to demonstrate the blog template.

Google analytics

Nice!

This was pretty easy actually.

Instructions are clearly laid out in this article. The most important steps are:

  • Set up a “property ID” (basically a unique idetifying key in a database that Google maintains)
  • Place that property ID into some very simple code (see below), and add it to the files beneath your website
<script async src="https://www.googletagmanager.com/gtag/js?id=G-{ insert property id here }"></script> 
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-{ insert property id here }');  
</script>

If you’re interested to know why this works, I spent a little time trying to understand:

  • Web browsers are an application that make a call to server when you enter a URL, a Uniform Resoure Locator
  • They are returned sets of files that they render (they execute blocks of code, and visually represent that software syntax in a nice, graphical format)
  • When your web browser receives my html text files, it executes the above code, which:
    • Instantiates a list
    • Adds some data to that list
    • Sends that data to Google’s servers

Remember, Google maintains a record of my property ID, which that data gets associated to. All of that information is then made available through the Google Analytics platform, and can be organized to look like the below:

Google Analytics Dashboard

For what it’s worth, you can specify other types of data (all related to the types of “cookies” stored in your web browser), but I haven’t got anything particularly interesting or different there, just the default stuff.

Complete aside: it looks like my website is getting hammered by Chinese servers. I’ve read this is because there are constantly an army of Chinese bots trawling American web sites for security openings. Stay safe out there! It’s the world wide web.

What is jekyll and how does it work?

What is Jekyll?

Jekyll is written in good ol’ Ruby. As is common in the world of software, Liquid is also in the mix, a templating language that is open-source and was created by Shopify in the early 2000’s. Jekyll templates are written in Liquid.

While that may sound complicated, at an implementation level, all that means is: you write templates, invoke those templates across your website, and inject specific content into those templates using {curly braces}.

To get started, simply download Ruby and add to path, then download Jekyll and Bundler (a dependency manager). And you should be good to go!

How does it work?

I think the most important thing to note here is really just how much Jekyll simplifies the process of standing up a website, if your focus is content. With the large volume of free templates already in circulation, all you have to do is find a format you like, host it on GitHub Pages, and write content in markdown.

When you push updates, the templates re-compile and automatically recreate a folder named _site, by standard convention. This _site folder contains all your static html files, which are returned to visitors upon HTTP request.

An introduction to pennymark

Recently, I’ve been taking some baby steps to learn web architecture and development. A first step in this direction has been to explore Jekyll, which I learned about from a friend. Jekyll is a ruby app that can be used to quickly and cheaply spin up static web applications, with minimal software experience.

Jekyll has been a great place to start, because:

  • It is a quick dev experience: there are many free templates out there that accommodate a wide range of use cases (just scroll through some of these examples to see)
  • It is fast: no databases are involved
  • It is also secure: no database means there’s nothing to hack
  • It is cheap: again, no database means less operating costs, and in fact, you can host Jekyll blogs for free on GitHub, with two simple steps
    • Point your domain name at GitHub’s servers
    • Add your domain name to your GitHub repository

This blog will simply serve as my ongoing notes and takeaways on things I find interesting.

Thanks @mdo for Lanyon