Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ ENV NODE_OPTIONS=--max_old_space_size=16000

WORKDIR /app

# Docusaurus derives per-page dates from git history: sitemap <lastmod>,
# 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
Expand Down
10 changes: 10 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading