|
6 | 6 |
|
7 | 7 | - **Live site:** https://tshark.dev |
8 | 8 | - **Source:** https://github.com/pocc/tshark.dev |
9 | | -- **Hosting:** Netlify (auto-deploys from GitHub) |
| 9 | +- **Hosting:** Cloudflare Workers (auto-deploys via GitHub Actions) |
10 | 10 | - **Generator:** [Hugo](https://gohugo.io/) (static site generator, Go-based) |
11 | 11 | - **Theme:** [Hugo Learn Theme](https://learn.netlify.com/en/) (customized) |
12 | 12 | - **Language:** English only (i18n files exist for 10 languages but only English is active) |
|
28 | 28 | | Content format | Markdown with YAML front matter | |
29 | 29 | | Syntax highlighting | Hugo Pygments (Chroma) with CSS classes | |
30 | 30 | | Search | Lunr.js (client-side full-text search) | |
31 | | -| Analytics | Google Analytics (UA-143435644-1) | |
32 | | -| Code highlighting | highlight.js (Atom One Dark Reasonable) | |
| 31 | +| Code highlighting | Hugo Chroma (build-time, github/github-dark) | |
33 | 32 | | Icons | Font Awesome 5 (minified custom subset) | |
34 | | -| Fonts | Open Sans, Roboto, Source Code Pro (self-hosted woff2) | |
| 33 | +| Fonts | Inter, JetBrains Mono (Google Fonts) + legacy woff2 | |
35 | 34 | | Comments | Disabled (Disqus template exists but commented out) | |
36 | 35 | | Charts | Google Charts (pie chart on Format Usage page) | |
37 | 36 | | Data tables | jQuery DataTables (pcap search table) | |
@@ -116,19 +115,36 @@ The site overrides several Learn Theme partials: |
116 | 115 | ## Build & Development |
117 | 116 |
|
118 | 117 | ```bash |
119 | | -# Serve locally (requires Hugo installed) |
120 | | -hugo server |
| 118 | +# Install dependencies (wrangler) |
| 119 | +npm install |
| 120 | + |
| 121 | +# Serve locally via Hugo dev server |
| 122 | +npm run dev |
121 | 123 | # Default: http://localhost:1313 |
122 | 124 |
|
123 | 125 | # Build static site |
124 | | -hugo |
125 | | -``` |
| 126 | +npm run build |
126 | 127 |
|
127 | | -No npm, no build pipeline. Hugo is the only build dependency. |
| 128 | +# Preview via Cloudflare Workers local runtime |
| 129 | +npm run preview |
| 130 | +# Default: http://localhost:8787 |
| 131 | + |
| 132 | +# Deploy to Cloudflare Workers |
| 133 | +npm run deploy |
| 134 | +``` |
128 | 135 |
|
129 | 136 | ## Deployment |
130 | 137 |
|
131 | | -Deployed via Netlify. Push to GitHub triggers an automatic build and deploy. The Netlify badge in README confirms this: `pedantic-lumiere-bf6286`. |
| 138 | +Deployed via **Cloudflare Workers** with static assets. Two deployment paths: |
| 139 | + |
| 140 | +1. **GitHub Actions** (automatic): Push to `master` triggers `.github/workflows/deploy.yml` which builds Hugo and runs `wrangler deploy`. Requires `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` repo secrets. |
| 141 | +2. **Local** (manual): Run `npm run deploy` to build and deploy from your machine. |
| 142 | + |
| 143 | +### Worker Architecture |
| 144 | + |
| 145 | +- **`wrangler.toml`** — Workers project config, static assets from `public/` |
| 146 | +- **`src/worker.ts`** — Worker entry point, serves static assets with stub for future API routes |
| 147 | +- **`package.json`** — Build/deploy scripts, wrangler as devDependency |
132 | 148 |
|
133 | 149 | ## Key Features |
134 | 150 |
|
|
0 commit comments