-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (43 loc) · 1.9 KB
/
Makefile
File metadata and controls
62 lines (43 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
SHELL := /bin/bash
run: ## Run Docusaurus
docker compose up -d
stop: ## Stop Docusaurus
docker compose down
install: ## Install dependencies
docker compose run --rm doc yarn
logs: ## View Docusaurus logs
docker compose logs -f doc
run-es: ## Run Docusaurus in development mode (Spanish)
docker compose run --rm -p 4000:4000 doc yarn run startes
# ==========================================
# Production Build Commands
# ==========================================
build: ## Build for production (all locales)
docker compose run --rm doc yarn run build
build-en: ## Build for production (English only)
docker compose run --rm -e DOCUSAURUS_DEFAULT_LOCALE=en doc yarn run build
build-es: ## Build for production (Spanish only)
docker compose run --rm -e DOCUSAURUS_DEFAULT_LOCALE=es doc yarn run build
serve: ## Serve production build locally (Search & Multilanguage work here)
docker compose run --rm -p 4000:4000 doc yarn run serve
# ==========================================
# CMS Commands
# ==========================================
collections: ## Regenerate Sveltia CMS config.yml from folder structure
python3 generate_cms_config.py
tutorials: ## Regenerate tutorials-generated.json from MDX files
python3 generate_tutorials.py
# ==========================================
# Utility Commands
# ==========================================
clear: ## Clear Docusaurus cache
docker compose run --rm doc yarn run clear
translations: ## Generate translation files
docker compose run --rm doc yarn run write-translations
# ==========================================
# Help
# ==========================================
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
.PHONY: install run stop run-es build build-en build-es serve collections tutorials clear translations help
.DEFAULT_GOAL := help