Skip to content

Commit 569598a

Browse files
Review feedback
1 parent 8883964 commit 569598a

File tree

14 files changed

+127
-374
lines changed

14 files changed

+127
-374
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ __pycache__
44
/.idea
55
/.envrc
66
/.direnv/
7+
/.claude

CLAUDE.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Documentation Build System
6+
7+
This is the Spacelift user documentation repository using MkDocs with Material theme. The live documentation is at https://docs.spacelift.io/.
8+
9+
## Common Commands
10+
11+
### Development
12+
13+
- `make run` - Run the documentation site locally via Docker Compose (http://localhost:8000)
14+
- `mkdocs serve` - Run locally with MkDocs directly
15+
- `mkdocs serve -a '0.0.0.0:8000'` - Run with external access
16+
17+
### Testing and Linting
18+
19+
- `make lint` - Run all linting checks (markdown + image optimization)
20+
- `pre-commit` - Run pre-commit hooks manually
21+
- `pre-commit install` - Install git hooks for automatic validation
22+
23+
### Self-Hosted Documentation
24+
25+
- `mike serve --branch self-hosted-releases-prod` - Preview self-hosted docs
26+
- Requires fetching: `git fetch origin self-hosted-releases-prod`
27+
28+
## Architecture
29+
30+
### Dual Documentation System
31+
32+
The repository maintains two versions of documentation:
33+
34+
- **SaaS version**: Standard documentation for cloud users
35+
- **Self-hosted version**: Documentation for on-premises installations
36+
37+
This is managed through:
38+
39+
- Two navigation files: `nav.yaml` (SaaS) and `nav.self-hosted.yaml` (self-hosted)
40+
- Conditional content using Jinja macros: `is_saas()` and `is_self_hosted()`
41+
- Environment variable `SPACELIFT_DISTRIBUTION` controls which version is built
42+
43+
### Key Files and Structure
44+
45+
- `docs/` - All Markdown documentation content
46+
- `mkdocs.yaml` - Main MkDocs configuration (uses `nav.yaml` by default)
47+
- `nav.yaml` / `nav.self-hosted.yaml` - Navigation structure for each version
48+
- `main.py` - Custom Jinja macros for conditional content
49+
- `hooks/` - MkDocs build hooks for banner fetching and URL processing
50+
- `overrides/` - Custom theme templates and components
51+
- `docs/assets/` - Static assets (CSS, images, screenshots)
52+
53+
### Content Organization
54+
55+
Documentation is organized into main sections:
56+
57+
- **Getting Started** - Initial setup and onboarding
58+
- **Main Concepts** - Core concepts like Stack, Blueprint, Configuration, Run, Policy, Resources
59+
- **Vendors** - Tool-specific guides (Terraform, Ansible, Kubernetes, etc.)
60+
- **Integrations** - Third-party integrations and cloud providers
61+
- **Product** - Product-specific features and administration
62+
63+
### Screenshots and Assets
64+
65+
- Screenshots go in `docs/assets/screenshots/`
66+
- Images are automatically optimized with oxipng during pre-commit
67+
- Use descriptive filenames for screenshots
68+
69+
### Conditional Content Patterns
70+
71+
```markdown
72+
{% if is_saas() %}
73+
SaaS-only content here
74+
{% endif %}
75+
76+
{% if is_self_hosted() %}
77+
Self-hosted-only content here
78+
{% endif %}
79+
```
80+
81+
Use `{% raw %}` blocks when Jinja interferes with code examples containing template syntax.
82+
83+
## Development Workflow
84+
85+
### Making Changes
86+
87+
1. Edit Markdown files in `docs/` directory
88+
2. Add new pages to appropriate navigation file(s)
89+
3. Test locally with `make run`
90+
4. Validate with pre-commit hooks
91+
5. Both SaaS and self-hosted versions are automatically built on PR
92+
93+
### Adding New Pages
94+
95+
- Add to `nav.yaml` for SaaS-only pages
96+
- Add to `nav.self-hosted.yaml` for self-hosted-only pages
97+
- Add to both files for pages that appear in both versions
98+
99+
### Pre-commit Validation
100+
101+
The repository uses pre-commit hooks for:
102+
103+
- Large file detection
104+
- YAML validation
105+
- Markdown linting (markdownlint)
106+
- Link checking (markdown-link-check)
107+
- PNG optimization (oxipng)

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Spacelift is a specialized CI/CD platform designed to address the collaborative
66

77
Infrastructure as Code projects create a unique set of challenges:
88

9-
- **State management**: Unlike application code, infrastructure changes rely on state files that track what's currently deployed
109
- **Coordination**: Multiple team members working on the same infrastructure can create conflicts
1110
- **Dependencies**: Infrastructure components often depend on one another, creating complex deployment ordering requirements
1211
- **Security**: Infrastructure credentials have significant privileges and require careful handling
12+
- **State management**: Unlike application code, infrastructure changes rely on tracking what's currently deployed - this is particularly important for tools like Terraform, OpenTofu and Pulumi, which externally store a "digital twin" of your infrastructure state
1313

1414
Spacelift transforms infrastructure management from a risky solo endeavor into a collaborative experience with guardrails.
1515

@@ -70,4 +70,4 @@ New to Spacelift? We recommend exploring our documentation in this order:
7070
4. [Integrations](integrations/source-control/README.md) - Connect Spacelift to your existing tools
7171
5. [Workers](concepts/worker-pools/README.md) - Execute jobs securely in your environment
7272

73-
If you're ready to try Spacelift, [sign up for a free trial](https://spacelift.io/free-trial) or [contact our team](https://spacelift.io/contact) for a personalized demo.
73+
If you're ready to try Spacelift, sign up for a free trial in [the EU region 🇪🇺](https://spacelift.io/free-trial), [the US region 🇺🇸](https://spacelift.io/free-trial) or [contact our team](https://spacelift.io/contact) for a personalized demo.

docs/concepts/blueprint/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ inputs:
122122
type: secret
123123
# secret means the input will be masked in the UI
124124
- id: tf_version
125-
name: OpenTofu/Terraform version of the stack
125+
name: Terraform version of the stack
126126
type: select
127127
options:
128128
- "1.3.0"
129129
- "1.4.6"
130130
- "1.5.0"
131131
- id: manage_state
132-
name: Should Spacelift manage the state of OpenTofu/Terraform
132+
name: Should Spacelift manage the state of OpenTofu
133133
default: true
134134
type: boolean
135135
- id: destroy_task_epoch

0 commit comments

Comments
 (0)