Files
mattermost/.gitignore
T
Eva SarafianouandCursor dd69d06dc6 Migrate docs site: Docusaurus config, Algolia, OpenAPI pipeline, and CI (#37402)
* Align Docusaurus config for monorepo, wire Algolia DocSearch (P6)

Fixes projectName/editUrl/path references left over from the docs-unified
repo split, adds trailingSlash for predictable CloudFront 404 handling, and
wires an Algolia search block into themeConfig that's only included when
credentials are present (Docusaurus's schema rejects an empty appId/apiKey,
so this keeps builds green with or without them). Also fixes the
sidebar/redirect generator scripts, which still pointed at the pre-rename
docs/ directory instead of main/, and adds docs/Makefile,
.env.local.example, and an updated README for local dev.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Wire OpenAPI generation to api/v4/source and add docs-ci.yaml (P7)

Replaces build-openapi.mjs's custom YAML-merge implementation with a thin
wrapper around the canonical `make -C api build` target, keeping only the
MDX sanitization step (quote/autolink fixes) that docusaurus-plugin-openapi-docs
needs. Adds a "prebuild" npm script so `npm run build` regenerates the spec
automatically, and ignores the generated api/v4/html artifacts (narrow form,
since ssr_template.hbs and static/favicon.ico under that path are committed).

Also adds docs-ci.yaml as a path-scoped PR/master build+typecheck gate for
the docs site, replacing the legacy `docs` repo's Sphinx-based ci.yml now
that docs live in this monorepo.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Rename OpenAPI prebuild script for clarity

"prebuild" is an npm lifecycle hook name (auto-runs before "npm run build"),
not a descriptive name, so `npm run prebuild` didn't signal it's specifically
about OpenAPI generation. Split it into "build:openapi" (the actual script,
runnable directly and self-explanatory) with "prebuild" now just delegating
to it, preserving the automatic pre-build trigger.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Regenerate sidebars automatically before dev/build (P7 fixup)

documentation.generated.json and developers.generated.json are gitignored
and nothing produced them on a fresh checkout, so both `npm start` and
`npm run build` failed with MODULE_NOT_FOUND outside a working tree that
happened to have stale copies lying around. Wire the sidebar generators
into `prestart`/`prebuild` so they're always regenerated first.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove docs/site/.env.local.example

There's a single Algolia DocSearch app for docs.mattermost.com; credentials
aren't distributed to individual developers, so a per-dev .env.local
workflow doesn't apply. Credentials are only ever injected in CI/CD via
repository variables. Local builds/dev server run fine without them (the
Algolia block in docusaurus.config.ts is conditional).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Wire OpenAPI doc generation into prestart/prebuild, drop unused Makefile

docusaurus-plugin-openapi-docs requires a separate `docusaurus gen-api-docs`
CLI step to populate docs/api/reference/ (gitignored) — nothing was
invoking it, so a fresh checkout's npm start/build failed the same way the
sidebar JSONs did. Split build:openapi into build:openapi:spec (slow, runs
make -C api build) and build:openapi:docs (fast, generates MDX from the
existing spec), and wire prestart to reuse an existing spec instead of
rebuilding it every dev-server start.

Also drops docs/Makefile: four of its five targets were pure passthroughs
to npm scripts, unreferenced by CI or anything else, and there's no
repo-wide `make -C <dir>` convention to fit into.

Note: a duplicate-doc-id build failure (operationId `status` in the
Playbooks OpenAPI spec colliding with the main API's `status` tag) is
being fixed separately in mattermost-plugin-playbooks.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix stale docs/ reference in sidebar generator's error message

The existence check still hardcoded "docs/" in its error text after SRC
was repointed to main/. Use the SRC constant in the message so it can't
drift out of sync with the actual path again.

Co-authored-by: Cursor <cursoragent@cursor.com>

* remove code comment

* Drop unused artifact upload from docs-ci.yaml

Nothing consumes it: P9's docs-cd.yml will rebuild independently on push
to master rather than downloading it via workflow_run (avoids workflow_run
trigger footguns for an infrequent, cheap-enough rebuild), and P10's
preview build always needs its own independent build anyway (bakes a
per-PR BASE_URL). This was carried over from the old docs repo's ci.yml
out of habit; that repo's own PR-time uploads had the same unused-artifact
issue (only cd.yml's post-merge run ever consumed it).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 12:32:39 +03:00

196 lines
3.1 KiB
Plaintext

logs
.DS_Store
node_modules
/data
/dist
/webapp/dist
jobserver
npm-debug.log
webapp/yarn-error.log
mattermost.mattermost-license
config/mattermost.mattermost-license
config/config.json
config/*.crt
web/static/js/bundle*.js
web/static/js/bundle*.js.map
web/static/js/libs*.js
config/active.dat
config/config.json
config/logging.json
/plugins
# disable folders generated by Cypress
e2e-tests/cypress/node_modules
e2e-tests/cypress/tests/downloads
e2e-tests/cypress/tests/screenshots
e2e-tests/cypress/tests/videos
e2e-tests/cypress/tests/integration/benchmark/__benchmarks__
e2e-tests/cypress/tests/integration/performance/logs
e2e-tests/cypress/tests/fixtures/ldap_tmp
e2e-tests/cypress/tests/fixtures/mmctl
e2e-tests/cypress/results
e2e-tests/cypress/.eslintcache
# disable files/folders generated by Playwright
e2e-tests/playwright/node_modules
e2e-tests/playwright/playwright-report
e2e-tests/playwright/storage_state
e2e-tests/playwright/test-results
e2e-tests/playwright/results
e2e-tests/playwright/specs/**/*-darwin.png
e2e-tests/playwright/specs/**/*-window.png
e2e-tests/playwright/specs/accessibility/**/*-snapshots
e2e-tests/playwright/.eslintcache
# ignore temporary added configuration for pgloader
server/tests/temp.load
# Enterprise & products imports files
imports/imports.go
# go.work file
go.work
go.work.sum
#license files
*.license
*.mattermost-license
# Build Targets
.prebuild
.npminstall
.yarninstall
/prepackaged_plugins
tools/sharedchannel-test/sharedchannel-test
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
testfiles
# Architecture specific extensions/prefixes
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof
# Log files
*.log
*.log.jsonl
*.log.gz
# Fuzz binaries and working dir
*fuzz.zip
app/workdir
.tmp
# Vim temporary files
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
# VSCode project files
.vscode
*.code-workspace
# Gogland project files
mattermost-server.iml
# Build files
*bundle.js
web/sass-files/sass/.sass-cache/
*config.codekit
*.sass-cache
*styles.css
# Default local file storage
data/*
webapp/data/*
api/data/*
api4/data/*
app/data/*
/enterprise
cover.out
ecover.out
cprofile.out
*.test
webapp/coverage
/report.xml
junit.xml
.agignore
.ctags
/tags
.idea
/debug
/client
__debug_bin
report.xml
go.*.orig
config.override.mk
docker-compose.override.yaml
## Notice Folders
.notice/
.notice-work/
.aider*
.env
.envrc
.planning/
**/CLAUDE.local.md
**/CLAUDE.md
.claude
.cursorrules
.cursor/*
!.cursor/README.md
!.cursor/cursor.md
!.cursor/Dockerfile
!.cursor/environment.json
!.cursor/scripts/
.cursor/scripts/*
!.cursor/scripts/cloud-agent-install.sh
!.cursor/scripts/cloud-agent-start.sh
server/prev-report.xml
server/prev-gotestsum.json
server/shard-*.txt
# Docusaurus docs site (docs/)
docs/site/build/
docs/site/.docusaurus/
docs/site/node_modules/
docs/api/reference/
docs/pdf/build/
docs/pdf/node_modules/
docs/site/openapi/
# OpenAPI make build artifacts
api/v4/html/static/mattermost-openapi-v4.yaml
api/v4/html/index.html
api/node_modules/