Skip to content
/ blog Public

Source repository for my personal blog.

Notifications You must be signed in to change notification settings

dgp1130/blog

Repository files navigation

Devel without a Cause Blog

My personal blog, hosted at https://blog.dwac.dev/.

CI Netlify Status

Local Builds

This project uses NodeJS and must be installed. You can install it directly or install nvm and run nvm use to switch to the version of Node supported in this project.

Run a hot-reloading server with npm start. Open http:https://localhost:8080/ to view the local site.

You can make a one-off build with npm run build. This is not all that useful for local development, but CI takes advantage of it.

You can debug the build in VSCode with the 11ty Build launch configuration. This will run a build and attach the VSCode debugger to each process as it executes. This should trigger breakpoints in .eleventy.js and any related files.

You can also run npm run build:debug to run the build pipeline with --inspect-brk on the relevant command to breakpoint on the 11ty execution.

You can run/build for production by using npm run start:prod and npm run build:prod. These enable various optimizations for production use. Note that npm run start:prod will encounter a CSP error and live reload will not work, as browser sync is not included in prod.

Tests

Run all tests once with npm test.

There are two sets of tests that are executed:

  1. Tests of the NodeJS code used in the 11ty build.
    • Run directly with npm run test:11ty.
    • Debug with the 11ty Test launch configuration in VSCode.
  2. Tests of the client browser code.
    • Run directly with npm run test:browser.
    • Watch with npm run test:browser:dev.
    • Debug with npm run test:browser:dev and open http:https://localhost:9876/debug.html. This should include include an HTML reporter, live reloads, and functioning source maps.

Deployments

This repo deploys with Netlify. The CI GitHub action contains part of the configuration, while the rest is done on Netlify directly.

You can also perform one-off test deployments to verify the Netlify configuration and the real production environment. Build the application first, then use npm run deploy-test ${alias} to deploy it to Netlify. This should generate a URL for you to visit and test the site with. It is also an easy way to test on mobile phones without having to run the site locally.

Docs

Looking for more documentation about the project? Take a look at our docs!

Unversioned Resources

Resources not stored in source control (like original, uncompressed images) are stored in a DWAC Google Drive folder.

Analytics

See analytics docs.

Domain Management

The domain is registered with Google Domains and uses their default DNS.

Domains in Google Domains are configured with Netlify via DNS CNAME redirects. blog.dwac.dev redirects to dwac-blog.netlify.app which is updated from the deploy branch.

SSL/TLS

*.dev domains must use HSTS, so SSL/TLS is required. The certificate is provisioned from Let's Encrypt via Netlify's native integration.

Search Engine Optimization

Google Search Console can be accessed here.