Thank you for your interest in contributing to docs-to-pdf! This document provides guidelines and instructions for contributing.
- Node.js >= 20.0.0
- mise - Development environment manager (optional but recommended)
-
Clone the repository
git clone https://github.com/jean-humann/docs-to-pdf.git cd docs-to-pdf -
Install dependencies using mise (recommended)
If you have mise installed, it will automatically install the correct Node.js version:
mise install
The
.mise.tomlfile in the project root configures the required Node.js version. -
Install dependencies
yarn install
-
Build the project
yarn build
Always run tests before committing:
# Run all tests
yarn test
# Run tests in watch mode
yarn test:watchAlways lint your code before committing:
# Run ESLint
yarn lint
# Auto-fix linting issues
yarn lint:fixBuild TypeScript to JavaScript:
yarn buildThe project includes comprehensive Docker support with E2E tests.
# Quick test (Alpine + Node 24 for all Docusaurus versions)
cd docker
./test-quick.sh
# Full E2E test suite (all combinations)
./test-e2e.shSee docker/README.md for more details on Docker development and testing.
Before submitting a PR, ensure:
- β
All tests pass:
yarn test - β
Code is linted:
yarn lint - β
TypeScript builds without errors:
yarn build - β No new TypeScript errors introduced
- β Docker tests pass (if modifying Docker-related code)
This project uses release-please-action to automate releases and changelog generation.
Follow the Conventional Commits specification:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that don't affect code meaning (white-space, formatting, etc.)refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementtest: Adding missing tests or correcting existing testsbuild: Changes affecting the build system or external dependenciesci: Changes to CI configuration files and scriptschore: Other changes that don't modify src or test files
feat: add support for custom footer templates
fix: resolve PDF generation timeout on large sites
docs: update Docker usage examples
refactor: improve error handling in openDetails function
test: add E2E tests for Docusaurus v3For breaking changes, add ! after the type or add BREAKING CHANGE: in the footer:
feat!: require Node.js 20 or higher
BREAKING CHANGE: Dropped support for Node.js 18Do NOT manually update the CHANGELOG.md file.
The release process is automated using release-please-action (GitHub Action):
Configuration files:
release-please-config.json- Release strategy and package configuration.release-please-manifest.json- Tracks current version
Workflow:
- When commits are merged to
master, release-please-action analyzes commit messages - It automatically creates or updates a release PR
- When the release PR is merged, it:
- Updates the CHANGELOG.md
- Bumps the version in package.json
- Creates a GitHub release
- Triggers npm publishing (if configured)
- Triggers Docker image publishing
Note: The workflow uses the default GITHUB_TOKEN. If you need CI checks to run on Release Please PRs, a Personal Access Token can be configured.
release-please determines version bumps based on commit types:
fix: Patch version (0.0.x)feat: Minor version (0.x.0)- Breaking changes: Major version (x.0.0)
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests and linting:
yarn test && yarn lint - Build the project:
yarn build - Commit using conventional commits
- Push to your fork
- Open a Pull Request with a clear description
- Tests pass locally
- Code is linted
- TypeScript builds successfully
- Commit messages follow Conventional Commits
- Documentation updated (if needed)
- Docker tests pass (if Docker-related changes)
docs-to-pdf/
βββ src/ # TypeScript source code
βββ lib/ # Compiled JavaScript (generated)
βββ tests/ # Test files
βββ docker/ # Docker configuration and E2E tests
βββ .github/ # GitHub Actions workflows
βββ mise.toml # mise configuration for Node.js version
βββ package.json # Project dependencies and scripts
- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
- Be respectful and constructive in discussions
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).