diff --git a/Dockerfile b/Dockerfile index fc9e1b3b..b6998b23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,14 @@ ENV NODE_OPTIONS=--max_old_space_size=16000 WORKDIR /app +# Docusaurus derives per-page dates from git history: sitemap , +# the "Last updated" footer (showLastUpdateTime/Author), and the +# TechArticle JSON-LD dates. node:20-alpine ships without git, so these are +# silently dropped from production builds unless git is installed here. +# NOTE: the build context must include the .git directory (do not add .git to +# .dockerignore) and the checkout must not be shallow, or dates will be partial. +RUN apk add --no-cache git + COPY . . RUN yarn install && yarn build diff --git a/nginx/default.conf b/nginx/default.conf index 71a7c7ed..f046d404 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -52,6 +52,16 @@ server { add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; } + # Raw markdown twins (/docs/**/index.md) emitted by plugins/llms-txt.js for + # LLM/agent consumption. nginx has no mime type for .md, so they were served + # as application/octet-stream — browsers download them instead of displaying, + # and some crawlers skip non-text types. + location ~ \.md$ { + default_type text/markdown; + charset utf-8; + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; + } + # Doc images/videos are updated in place — cache hard but allow revalidation location /img/ { try_files $uri =404;