Demonstration article. This text presents a laboratory scenario, not results from a real production deployment.
1. Context and requirements
A static website is generated before the reader’s request. Instead of querying a database for every access, the browser receives HTML, CSS and other assets. For a single-author blog, this reduces the number of components required at runtime.
The objective of this example is to separate authorship, generation and distribution without introducing an application server. The solution should enable us to:
- Write content in Markdown and maintain its history in Git.
- Generate only articles eligible for publication.
- Deliver static files over HTTPS and use caching consistently.
- Validate the result before integrating it with the infrastructure.
2. Conceptual architecture
Hugo transforms content and templates into static files 1. A private S3 origin with CloudFront and Origin Access Control (OAC) allows the distribution to have authorized access to the origin 2. AWS configuration is outside the scope of this example.
| Component | Responsibility | Expected evidence |
|---|---|---|
| Git | Editorial history | Identified commit |
| Hugo | Site generation | Successful build |
| Pagefind | Static search | Updated index |
| S3 and CloudFront | Storage and delivery | Validated HTTP response and cache |
3. Editorial integrity and build
It is important to separate source code from the published directory. The build must take place in a clean directory so removing an article does not leave old files in the local artifact.
Example command run in the repository after installing dependencies:
BASE_URL=http://127.0.0.1:8000/ ./scripts/build.sh --local
python3 scripts/serve.py --port 8000
The build exit code is an initial control, not proof of production availability. The integration process should publish only the public/ directory of an approved execution.
4. Caching and performance
An asset whose name contains a content hash can be cached for longer. Changing its bytes produces a different address. HTML and search index metadata require an update policy consistent with the publication process.
To illustrate latency assessment, consider the cache hit ratio , hit latency and miss latency . In a simplified model:
If , and , the theoretical average is 72 ms. These values are hypothetical, not measurements. The model does not estimate tail percentiles or Core Web Vitals.
5. Validation and limitations
Publication must be verified in stages: file integrity, navigation, security, cache behavior and observability. Local inspection does not replace tests of the real distribution.
Browse the article list or search to explore this collection. The LCP, INP and CLS targets are described in the Web Vitals documentation.
References
- Hugo. Documentation. Static site generator documentation.
- AWS. Restrict access to an Amazon S3 origin. Origin access documentation.
- Pagefind. Documentation. Static search documentation.
- web.dev. Web Vitals. User experience metrics reference.