Skip to content

    Development documentation — this describes the current development branch. Documented behavior may not exist in the latest release.

    Build and configuration

    Markdown Live Preview is a static site built with Vite. This page is for users and contributors who want to build it from source or understand its configuration surface.

    • Node.js 22 (the version used by the container build and the supported baseline).
    • npm (bundled with Node).
    Terminal window
    npm ci
    npm run build

    The build output is written to dist/. Serve it with any static file server, or use the provided scripts:

    Terminal window
    npm run preview # Vite preview server
    npm run serve-dist # serve dist/ on port 5001

    A Makefile wraps the common tasks (make setup, make build, make dev, make preview, make serve-dist).

    Terminal window
    npm run dev

    This is a client-only app; there are no server-side environment variables for application logic. The relevant configuration lives in a few files:

    FilePurpose
    nginx/default.confContent Security Policy, security headers, caching, and SPA fallback for the container.
    DockerfileMulti-stage build: Node 22 build stage → Nginx 1.27 runtime. Exposes port 80.
    docker-compose.ymlLocal build-and-run with a healthcheck; maps 8080:80.
    charts/markdown-live-preview/values.yamlHelm chart configuration (image, resources, probes, security context, ingress).

    Runtime behavior such as retention windows and the analytics measurement ID is defined in the application source (src/main.js). Changing these is a code change, not deployment configuration.

    There is no automated test suite in this repository. npm test is the upstream placeholder that intentionally exits non-zero ("Error: no test specified") — it does not indicate a real failure and is not a coverage signal. Verification relies on building, container smoke tests, chart checks, and the documentation validator rather than a unit-test run.