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 add-font-ursafont
# or
git checkout -b fix-typo-fundamentals
# or
git checkout -b improve-animation-examplesProject structure
Understanding the project layout helps you find what you need:
.vitepress/
├── config.mts # VitePress configuration
├── data/
│ ├── fonts.json # Font showcase data
│ ├── sketches.json # Example sketch metadata and leaderboard input
│ └── 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 (fonts, images, SVGs)Key files
.vitepress/config.mts- VitePress configuration.vitepress/data/fonts.json- Font showcase data.vitepress/data/sketches.json- Example sketch metadata used by the docs and leaderboard.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 "Add Ursafont to font showcase"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! If your contribution is an accepted example sketch, it will also count toward the Leaderboard on the next redeploy.
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 font
- Add entry to
.vitepress/data/fonts.json - (Optional) Add preview image to
public/font_previews/ - Submit pull request
Adding a sketch
- Add entry to
.vitepress/data/sketches.json - Test the sketch works correctly
- Submit pull request
- Check the Leaderboard after the next deployment
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! 🚀