starlight-mega-menu 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pre-commit-config.yaml +35 -2
- package/CLAUDE.md +11 -0
- package/package.json +1 -1
package/.pre-commit-config.yaml
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
---
|
|
2
|
+
# =============================================================================
|
|
3
|
+
# GOVERNANCE CHECKS (fail-fast)
|
|
4
|
+
#
|
|
5
|
+
# These run FIRST. Direct commits to main are forbidden — all changes must
|
|
6
|
+
# go through a pull request linked to a GitHub issue. If this hook fails:
|
|
7
|
+
#
|
|
8
|
+
# 1. Create a GitHub issue describing the change
|
|
9
|
+
# 2. Create a feature branch: git checkout -b feat/<issue>-description
|
|
10
|
+
# 3. Commit to the feature branch, then open a PR with "Closes #<issue>"
|
|
11
|
+
#
|
|
12
|
+
# See CONTRIBUTING.md for the full workflow.
|
|
13
|
+
# =============================================================================
|
|
2
14
|
repos:
|
|
15
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
16
|
+
rev: v6.0.0
|
|
17
|
+
hooks:
|
|
18
|
+
- id: no-commit-to-branch
|
|
19
|
+
name: "GOVERNANCE: never commit directly to main"
|
|
20
|
+
args: ["--branch", "main"]
|
|
21
|
+
|
|
22
|
+
# ===========================================================================
|
|
23
|
+
# Repository-specific hooks (escape hatch)
|
|
24
|
+
#
|
|
25
|
+
# Runs scripts/pre-commit-local.sh if present and executable. Repos use
|
|
26
|
+
# this for language-specific checks (ruff, eslint, tsc, etc.) that do not
|
|
27
|
+
# belong in the universal config.
|
|
28
|
+
# ===========================================================================
|
|
3
29
|
- repo: local
|
|
4
30
|
hooks:
|
|
5
31
|
- id: local-hooks
|
|
@@ -9,11 +35,12 @@ repos:
|
|
|
9
35
|
always_run: true
|
|
10
36
|
pass_filenames: false
|
|
11
37
|
|
|
38
|
+
# ===========================================================================
|
|
39
|
+
# File hygiene
|
|
40
|
+
# ===========================================================================
|
|
12
41
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
13
42
|
rev: v6.0.0
|
|
14
43
|
hooks:
|
|
15
|
-
- id: no-commit-to-branch
|
|
16
|
-
args: ["--branch", "main"]
|
|
17
44
|
- id: trailing-whitespace
|
|
18
45
|
- id: end-of-file-fixer
|
|
19
46
|
- id: mixed-line-ending
|
|
@@ -26,11 +53,17 @@ repos:
|
|
|
26
53
|
- id: check-merge-conflict
|
|
27
54
|
- id: detect-private-key
|
|
28
55
|
|
|
56
|
+
# ===========================================================================
|
|
57
|
+
# Security
|
|
58
|
+
# ===========================================================================
|
|
29
59
|
- repo: https://github.com/gitleaks/gitleaks
|
|
30
60
|
rev: v8.30.0
|
|
31
61
|
hooks:
|
|
32
62
|
- id: gitleaks
|
|
33
63
|
|
|
64
|
+
# ===========================================================================
|
|
65
|
+
# Linting
|
|
66
|
+
# ===========================================================================
|
|
34
67
|
- repo: https://github.com/adrienverge/yamllint
|
|
35
68
|
rev: v1.38.0
|
|
36
69
|
hooks:
|
package/CLAUDE.md
CHANGED
|
@@ -242,6 +242,8 @@ docker run --rm -it \
|
|
|
242
242
|
cp /app/node_modules/f5xc-docs-theme/src/content.config.ts \
|
|
243
243
|
/app/src/content.config.ts && \
|
|
244
244
|
cp -r /content/docs/* /app/src/content/docs/ && \
|
|
245
|
+
DOCS_TITLE=$(grep -m1 "^title:" /app/src/content/docs/index.mdx \
|
|
246
|
+
| sed "s/title: *[\"]*//;s/[\"]*$//") \
|
|
245
247
|
npx astro dev --host
|
|
246
248
|
'
|
|
247
249
|
```
|
|
@@ -249,6 +251,15 @@ docker run --rm -it \
|
|
|
249
251
|
Open `http://localhost:4321`. File changes on the
|
|
250
252
|
host require restarting the container.
|
|
251
253
|
|
|
254
|
+
If your `docs/` directory contains static asset
|
|
255
|
+
subdirectories (images, diagrams — folders with
|
|
256
|
+
no `.md`/`.mdx` files), add a volume mount for
|
|
257
|
+
each one so they are served as public assets:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
-v "$(pwd)/docs/images:/app/public/images:ro"
|
|
261
|
+
```
|
|
262
|
+
|
|
252
263
|
For a full production build:
|
|
253
264
|
|
|
254
265
|
```bash
|