perf(serve): static boot shell, gzip and immutable caching for the hashed assets

Measured against the live host:
- the shell shipped no Content-Encoding, so every visit moved 139 KB of JS raw
  -> gzip on (level 5, vary, text/js/css/json/svg/woff2): 139,433 B -> 49,835 B
- /static/* is content-hashed but had no cache header -> max-age=31536000, immutable;
  index.html is no-cache so a deploy lands immediately
- try_files fell through to a non-existent index.php -> SPA fallback to index.html
- index.html now carries a boot shell (name, role, 'rendering the resume') so a cold
  load shows the identity instead of an empty dark rectangle while the JS types in
- deploy/nginx/me.hoelee.com.conf is the versioned copy of the live config; README
  documents the Portainer archive deploy path, the Tor mirror and the inode pitfall
This commit is contained in:
hoelee committed 2026-11-13 22:40:22 +08:00
1 parent 7f8ac893d0
commit 5727ab0c8a
3 files changed
+110 -5

No files matched your search

+22 -1
View File
@@ -23,13 +23,34 @@
html { background: #004040; color: #dedede; }
@media (max-width: 900px) { html { background: #002b36; } }
body { margin: 0; }
/* Boot shell: the panes are drawn by a stylesheet the app types in, so without this
the page is an empty dark rectangle for the first seconds. Rendered before the
JS module loads; Vue replaces it on mount. */
#app > .boot {
display: flex; flex-direction: column; justify-content: center;
min-height: 100vh; padding: 0 8vw; box-sizing: border-box;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
line-height: 1.5;
}
#app > .boot .n { font-size: clamp(1.1rem, 2.6vw, 1.6rem); color: #eaeaea; }
#app > .boot .r { margin-top: .4em; color: #9fd6c9; }
#app > .boot .h { margin-top: 2.2em; color: #7f9c96; font-size: .85em; }
#app > .boot .h::after { content: '_'; animation: boot-blink 1s steps(1) infinite; }
@keyframes boot-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #app > .boot .h::after { animation: none; } }
</style>
<meta name="theme-color" content="#004040" />
<link rel="icon" type="image/x-icon" href="./favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico">
</head>
<body>
<div id="app"></div>
<div id="app">
<div class="boot">
<p class="n">Mr Hoelee — Lee Teong Hoe</p>
<p class="r">Senior Full-Stack · DevOps · AI Systems Engineer — 10+ years, remote (GMT+8)</p>
<p class="h">rendering the resume</p>
</div>
</div>
<script type="module" src="/src/main.js"></script>
</body>
</html>