Skip to content

Commit d1858ed

Browse files
nsheapsclaudeautomation-nsheaps[bot]
authored
feat: unified docs space, wizard with remote repo form, image fixes (#23)
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: automation-nsheaps[bot] <251779498+automation-nsheaps[bot]@users.noreply.github.com>
1 parent 7fe52d0 commit d1858ed

26 files changed

Lines changed: 1278 additions & 143 deletions
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Content Formatting
2+
3+
All user-facing content (documentation, page content, inline help) follows these formatting rules.
4+
5+
## Markdown Syntax
6+
7+
- Use **standard Markdown** as the primary content format
8+
- Fall back to **GitHub Flavored Markdown (GFM)** when standard Markdown is insufficient (e.g., tables, task lists, strikethrough)
9+
- Avoid raw HTML in content unless absolutely necessary for features that neither standard Markdown nor GFM can express
10+
- When HTML is required, use semantic elements with `data-type` attributes (e.g., `<div data-type="callout">`) rather than presentational markup
11+
12+
## Images
13+
14+
- Use standard Markdown image syntax: `![alt text](url)`
15+
- Alt text is required for all images and should describe the content meaningfully
16+
- Never use raw HTML `<img>` tags in documentation content
17+
- Images render at their **natural size** by default, centered, capped at `max-width: 100%`
18+
- Do NOT set an explicit width on images unless the user or design specifically requires it
19+
- The `ImageBlock` extension defaults to `width: null` (natural size) — do not change this to `100%` or any fixed value
20+
- Follow Notion's image presentation: centered, natural size, rounded corners, subtle hover shadow
21+
22+
## Screenshots
23+
24+
- All screenshots live in `docs/screenshots/` organized by category (e.g., `features/`, `guides/`)
25+
- Filenames are descriptive and kebab-case: `slash-menu.png`, `landing-page.png`
26+
- Each screenshot captures **only the relevant UI element or area**, not a full page, unless the screenshot is specifically meant to show a full page view (e.g., landing page, editor overview)
27+
- Do not keep unused screenshots — if a screenshot is not referenced in docs content, remove it
28+
- Do not keep duplicate screenshots under different names
29+
30+
## Asset References in Bundled Docs
31+
32+
- Use the `{{base}}` placeholder for asset paths: `![alt]({{base}}screenshots/features/example.png)`
33+
- `{{base}}` is resolved at runtime to the correct base URL via `import.meta.env.BASE_URL`
34+
- Never hardcode absolute paths like `/screenshots/...` or relative paths without `{{base}}`
35+
36+
## Links
37+
38+
- Use standard Markdown link syntax: `[text](url)`
39+
- Prefer descriptive link text over bare URLs
40+
- Internal page references use wiki-link style when supported
41+
42+
## Code
43+
44+
- Use fenced code blocks with language tags: ` ```javascript `
45+
- Use inline code for short references: `` `functionName` ``
46+
- Mermaid diagrams use fenced code blocks with the `mermaid` language tag
47+
- Math uses LaTeX: `$$block$$` and `$inline$`

.github/workflows/preview-deploy.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
PR_NUMBER: ${{ github.event.pull_request.number }}
3939
REPO_URL: ${{ github.event.repository.html_url }}
4040
PRODUCTION_URL: https://nsheaps.github.io/cept/app/
41+
VITE_IS_PREVIEW: 'true'
42+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
4143

4244
- name: Deploy to GitHub Pages subdirectory
4345
run: |
@@ -49,8 +51,14 @@ jobs:
4951
git config user.email "github-actions[bot]@users.noreply.github.com"
5052
5153
# Fetch gh-pages branch or create it
54+
# Discard working tree changes since the build is already complete
55+
git checkout -- .
5256
git fetch origin gh-pages || true
53-
git checkout gh-pages || git checkout --orphan gh-pages
57+
if git rev-parse --verify origin/gh-pages >/dev/null 2>&1; then
58+
git checkout -B gh-pages origin/gh-pages
59+
else
60+
git checkout --orphan gh-pages
61+
fi
5462
5563
# Clean the PR directory and copy new build
5664
rm -rf "${DEPLOY_DIR}"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ packages/mobile/ios/App/Pods/
4747
packages/desktop/dist/
4848
packages/desktop/release/
4949

50+
# Generated at build time (preview deploys)
51+
packages/ui/src/components/docs/_main-branch-docs.ts
52+
5053
# Logs
5154
*.log
5255
npm-debug.log*

docs/content/guides/markdown-extensions.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,23 @@ Math uses LaTeX syntax:
6262
- **Block**: `$$E = mc^2$$`
6363
- **Inline**: `$a^2 + b^2 = c^2$`
6464

65+
## Images
66+
67+
Use standard Markdown image syntax:
68+
69+
```markdown
70+
![Alt text describing the image](url)
71+
```
72+
73+
- Alt text is required for all images
74+
- Images render at their natural size, centered, capped at the content width
75+
- Cept does not stretch images to fill the page — small images stay small
76+
- Use GitHub Flavored Markdown (GFM) conventions when standard Markdown is not sufficient
77+
6578
## Design Principles
6679

67-
1. **Markdown first** — Standard markdown is preferred for all content that has a natural markdown representation
68-
2. **HTML fallback** — Rich blocks that extend markdown use HTML with `data-type` attributes
69-
3. **Interoperability** — Files can be opened in any markdown editor; extended blocks render as HTML
70-
4. **No proprietary format** — Everything is plain text, never binary or opaque
80+
1. **Standard Markdown first** — Use standard Markdown syntax whenever possible. This is the default for all content that has a natural Markdown representation.
81+
2. **GFM fallback** — When standard Markdown is not sufficient (e.g., tables, task lists, strikethrough), fall back to GitHub Flavored Markdown.
82+
3. **HTML as last resort** — Rich blocks that extend Markdown use HTML with `data-type` attributes. Avoid raw HTML when Markdown or GFM can express the same thing.
83+
4. **Interoperability** — Files can be opened in any Markdown editor; extended blocks render as HTML.
84+
5. **No proprietary format** — Everything is plain text, never binary or opaque.
-94 KB
Binary file not shown.
-81.5 KB
Binary file not shown.
-50.2 KB
Loading
-14.6 KB
Binary file not shown.
-48.6 KB
Loading
-94 KB
Binary file not shown.

0 commit comments

Comments
 (0)