Thank you for your interest in contributing to Link2Pay documentation! This guide will help you get started.
Found a problem with the documentation?
- Check existing issues first
- If it's new, open an issue with:
- Clear title describing the problem
- Page URL where the issue occurs
- Description of what's wrong
- Expected vs actual behavior
- Screenshots if applicable
Have an idea for better documentation?
- Open a discussion
- Explain your suggestion
- Provide examples if possible
- We'll discuss and potentially create an issue to track implementation
For quick fixes:
- Click "Edit this page on GitHub" at the bottom of any page
- Make your changes in the GitHub web editor
- Propose changes via Pull Request
- We'll review and merge quickly!
For larger contributions:
- Fork the repository
- Create a new branch (
git checkout -b docs/new-feature-guide) - Add your documentation (see Writing Guidelines)
- Test locally (
npm run docs:dev) - Commit with clear message
- Push and create Pull Request
- Node.js 18+
- npm 9+
- Git
# Clone your fork
git clone https://github.com/YOUR_USERNAME/docs-link2pay.git
cd docs-link2pay
# Install dependencies
npm install
# Start development server
npm run docs:dev
# Open http://localhost:5173# Build for production
npm run docs:build
# Preview production build
npm run docs:preview- Use kebab-case for filenames (
quick-start.md, notQuickStart.md) - Place files in appropriate directories:
/docs/guide/- User guides and tutorials/docs/api/- API reference documentation/docs/sdk/- SDK documentation
- Create subdirectories for related content
Headers:
- Use sentence case ("Quick start guide", not "Quick Start Guide")
- Only one H1 per page (the title)
- Use H2 for main sections, H3 for subsections
Code blocks:
- Always specify language for syntax highlighting
- Use TypeScript for JavaScript examples
- Show both request and response for API examples
```typescript
const invoice = await api.createInvoice({
amount: 100,
currency: "USDC"
});
```Links:
- Use relative paths for internal links (
/guide/concepts) - Use descriptive link text (not "click here")
- Verify all links work
Admonitions: Use containers for important information:
::: tip
Helpful tip for users
:::
::: warning
Important warning
:::
::: danger
Critical information
:::Clarity:
- Write for beginners (explain jargon)
- Use active voice
- Keep sentences concise
- Use examples liberally
Accuracy:
- Test all code examples
- Verify API responses match current implementation
- Update version numbers when applicable
Completeness:
- Cover edge cases
- Mention error scenarios
- Link to related documentation
- Provide "Next Steps" section
Consistency:
- Follow existing patterns and terminology
- Use "Link2Pay" (not "link2pay" or "LinkToPay")
- Use "Stellar" (not "stellar network" in prose)
- Use "invoice" consistently (not mixing with "bill")
Good example:
// Create an invoice with line items
const invoice = await link2pay.invoices.create({
clientName: "Acme Corp",
clientEmail: "billing@acme.com",
amount: 1000,
currency: "USDC",
items: [
{
description: "Web Development",
quantity: 40,
rate: 25
}
]
});
console.log(`Payment link: ${invoice.paymentLink}`);Bad example:
// bad code with no context
var x = await api.create({n: "test", e: "test@test.com", a: 100});Follow this structure for endpoint documentation:
- Endpoint title & HTTP method
- Description (1-2 sentences)
- Authentication requirement
- Rate limits if applicable
- Request parameters (path, query, body)
- Example request (curl + language SDKs)
- Example response (success case)
- Error responses (common errors)
- Related endpoints
Use Mermaid for diagrams:
```mermaid
sequenceDiagram
Client->>Server: Request
Server->>Client: Response
```- Test all code examples
- Run
npm run docs:buildsuccessfully - Check for broken links
- Verify formatting looks good locally
- Update table of contents if needed
- Add yourself to contributors list (optional)
## Description
Brief description of changes
## Type of Change
- [ ] Fix typo/error
- [ ] Improve existing docs
- [ ] Add new documentation
- [ ] Update code examples
- [ ] Other (describe)
## Related Issue
Closes #123
## Checklist
- [ ] Tested locally
- [ ] Followed style guidelines
- [ ] Updated navigation if needed
- [ ] Added examples where helpful- Maintainers will review within 3-5 business days
- Address any requested changes
- Once approved, we'll merge and deploy
- Docs will be live within minutes (Vercel auto-deploy)
# Page Title
Brief introduction paragraph.
## Main Section
Content with **bold** and *italic* emphasis.
### Subsection
- Bullet points
- Use dashes for lists
- Keep items parallel
1. Numbered lists
2. For sequential steps
3. Or ordered information
**Important term**: Definition of the term.
`inline code` for short code references.
[Link text](/path/to/page) for internal links.
[External link](https://example.com) for external references.| Use | Don't Use |
|---|---|
| Link2Pay | link2pay, LinkToPay, L2P |
| Stellar | stellar network, Stellar Network |
| Freighter | freighter, Freighter Wallet |
| testnet | Testnet, test net |
| mainnet | Mainnet, main net |
| invoice | bill, receipt |
| payment link | checkout link, pay link |
| wallet address | public key (in user-facing docs) |
Do:
- Use "you" and "your" (second person)
- Be encouraging and supportive
- Explain the "why" behind recommendations
- Acknowledge complexity when it exists
Don't:
- Use "we" or "I" (except in tutorials)
- Assume advanced knowledge
- Use condescending language
- Leave users without next steps
- 💬 Discord Community - Ask questions
- 📧 Email - Contact maintainers
- 📚 Discussions - Start a conversation
Thank you for contributing! 🎉