Getting started
Ready to contribute to textmode.js documentation? This guide will help you set up your local development environment. (ง •̀ω•́)ง
Prerequisites
Before you begin, make sure you have:
- Node.js - Version 18 or higher recommended
- npm - Comes with Node.js
- Git - For version control
- A code editor - VS Code, Sublime Text, or your favorite editor
- A GitHub account - For submitting contributions
Setup steps
1. Fork the repository
Visit the code.textmode.art repository and click the Fork button in the top-right corner.
2. Clone your fork
# Replace YOUR-USERNAME with your GitHub username
git clone https://github.com/YOUR-USERNAME/code.textmode.art.git
cd code.textmode.art3. Install dependencies
npm installThis will install VitePress and all required dependencies.
4. Start the development server
npm run devThe documentation site will be available at http://localhost:4175. The dev server supports hot reload - your code changes will appear instantly!
5. Create a branch
Always create a new branch for your changes:
# Use a descriptive branch name
git checkout -b clarify-installation-docs
# or
git checkout -b fix-typo-first-sketch
# or
git checkout -b improve-export-docsProject structure
Understanding the project layout helps you find what you need:
.vitepress/
├── config.mts # VitePress configuration
├── data/
│ ├── sketches.json # Example sketch metadata
│ └── contributors.json # Optional contributor profile metadata
└── theme/ # Custom theme components
docs/ # Documentation pages (you'll mostly edit here)
├── examples/ # Example pages with interactive demos
├── contributing/ # Contributing guides
└── *.md # Core documentation pages
api/ # Auto-generated API reference
blog/ # Blog posts
public/ # Static assets (images, SVGs)Key files
.vitepress/config.mts- VitePress configuration.vitepress/data/sketches.json- Example sketch metadata used by the docs.all-contributorsrc- Canonical contributor registry.vitepress/data/contributors.json- Optional social/profile metadata for the website
Making changes
Editing documentation
Documentation files are in the docs/ folder. They use Markdown format (.md files):
---
title: Page Title
---
# Heading
Your content here...Testing your changes
As you edit files, the dev server will automatically reload. Check your changes at http://localhost:4175.
Building the site
Before submitting, verify the site builds without errors:
npm run buildIf the build succeeds, you're ready to submit!
Submitting your contribution
1. Commit your changes
# Stage your changes
git add .
# Commit with a clear message
git commit -m "Clarify first sketch setup"Write clear commit messages that describe what you changed and why.
2. Push to your fork
# Push your branch to GitHub
git push origin your-branch-name3. Create a pull request
- Visit your fork on GitHub
- Click "Pull request" or "Compare & pull request"
- Provide a clear title and description
- Click "Create pull request"
Pull request guidelines
When submitting a pull request:
- One feature per PR - Keep changes focused
- Clear description - Explain what you changed and why
- Test locally - Make sure the site builds
- Follow existing style - Match the formatting of surrounding code
- Be patient - Maintainers will review your PR as soon as possible
Getting credit
To be credited as a contributor, maintainers update .all-contributorsrc with:
npm run contributors:add -- your-github-username doc
npm run contributors:generateIf you want additional social links to appear on the site, add them to .vitepress/data/contributors.json.
You'll appear on the Contributors page when your PR is merged!
Tips for success
- Start small - Fix a typo or improve a single paragraph first
- Ask questions - Open an issue or ask in Discord if you're unsure
- Read existing docs - Match the style and tone of existing content
- Be responsive - Reply to feedback on your pull request
- Have fun! - Contributing should be enjoyable
Common tasks
Adding a sketch
- Add entry to
.vitepress/data/sketches.json - Test the sketch works correctly
- Submit pull request
Fixing a typo
- Find the file in
docs/ - Make the correction
- Submit pull request
Need help?
- GitHub Issues - Open an issue
- Discord - Join the community
- Email - Contact the maintainers directly
Thank you for contributing to textmode.js! 🚀