Domain

I opted for cloudflare, and the setup process was seamless. Furthermore, render offered a comprehensive walkthrough.

Analytics

Having previously utilized their cloud service, I selected umami for analytics. Nevertheless, this occasion prompted a shift towards a self-hosted solution via Render, motivated by the realization that browsers such as Brave block Umami’s scripts in cloud-hosted environments.

analytics/Dockerfile
FROM ghcr.io/umami-software/umami:postgresql-latest

It’s important to note that, by default, Umami logs visits from localhost. To prevent this, you can adjust the configuration as follows:

quartz/quartz.config.ts
const config: QuartzConfig = {
  configuration: {
    analytics: process.env.ENABLE_ANALYTICS ? 
    { provider: 'umami', host: 'your-host (without /script.js suffix)', websiteId: 'your-website-id' } : null,
    ...

Updated render.yaml

render.yaml
services:
  - type: web
    name: your-name
    runtime: static
    rootDir: "./quartz"
    buildCommand: "npm ci && ENABLE_ANALYTICS=1 npx quartz build"
    staticPublishPath: "./public"
    domains: ["your-domain"]
  - type: web
    name: umami
    runtime: docker
    rootDir: "./analytics"
    plan: free
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: umami-db
          property: connectionString
      - key: HASH_SALT
        generateValue: true
databases:
  - name: umami-db
    plan: free
    databaseName: umami
    user: umami