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

Four-stage flow: Markdown and Git, Hugo, private S3 storage and CloudFront distribution.
Figure 1 — Conceptual flow of the laboratory. Original illustration.

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.

ComponentResponsibilityExpected evidence
GitEditorial historyIdentified commit
HugoSite generationSuccessful build
PagefindStatic searchUpdated index
S3 and CloudFrontStorage and deliveryValidated 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 hh, hit latency LhL_h and miss latency LmL_m. In a simplified model:

E[L]=hLh+(1−h)Lm E[L] = h L_h + (1-h)L_m

If h=0.8h=0.8, Lh=40 msL_h=40\,\mathrm{ms} and Lm=200 msL_m=200\,\mathrm{ms}, 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

  1. Hugo. Documentation. Static site generator documentation.
  2. AWS. Restrict access to an Amazon S3 origin. Origin access documentation.
  3. Pagefind. Documentation. Static search documentation.
  4. web.dev. Web Vitals. User experience metrics reference.

  1. The generator uses templates and content to produce the site, without requiring Hugo on the server that delivers it. ↩︎

  2. OAC authorizes the distribution to access the S3 origin; the infrastructure permissions configuration still needs to be validated. ↩︎