tachiyomi-website/CONTRIBUTING.md

82 lines
2.5 KiB
Markdown
Raw Permalink Normal View History

2023-07-18 14:36:36 +02:00
# Tachiyomi Website Contributing Guide
Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
- [Code of Conduct](../CODE_OF_CONDUCT.md)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)
## Development Setup
2023-10-29 03:19:25 +01:00
You will need [Node.js](http://nodejs.org) **version 20+**, and [pnpm](https://pnpm.io/installation) **version 8+**.
2023-07-18 14:36:36 +02:00
After cloning the repo and entering the the directory, go to the `/website` folder and run:
2023-07-18 14:36:36 +02:00
``` bash
# Installs any dependencies needed.
2023-08-08 20:39:38 +02:00
$ pnpm install
2023-07-18 14:36:36 +02:00
```
To run the project now, run:
``` bash
# This command start a local server you can access and edit live.
2023-08-08 20:39:38 +02:00
$ pnpm dev
2023-07-18 14:36:36 +02:00
```
2023-08-08 20:39:38 +02:00
### Commonly used PNPM scripts
2023-07-18 14:36:36 +02:00
``` bash
# This command will generate a static site inside a dist directory in your project.
2023-08-08 20:39:38 +02:00
$ pnpm build
2023-07-18 14:36:36 +02:00
# Run this command to preview the built files in a local server.
2023-08-08 20:39:38 +02:00
$ pnpm preview
2023-07-18 14:36:36 +02:00
```
2023-08-08 20:39:38 +02:00
**Please make sure to have `pnpm test` pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally.
2023-07-18 14:36:36 +02:00
It is also recommended you lint your files before the PR.
## Project Structure
- **`website`**: contains all the website related files.
- **`src`**: contains all the markdown files used for the website.
- **`.vitepress`**:
- **`theme`**: contains custom theme files.
- `config.ts`: main configuration file for VitePress.
- **`public`**: files to be exposed publicly without any processing.
2023-09-10 21:36:00 +02:00
- **[`dist`](https://vitepress.dev/guide/deploy)**: contains built files for distribution.
Note this directory is only updated when a release happens or when you run the build command.
Changes to this folder will not carry over with Git.
- `package.json`: contains information about which plugins are installed in the project.
2023-07-18 14:36:36 +02:00
## Images and Videos guidelines
### Common
- Use the Android Emulator
- Use the default white theme
- Preferably use local source or a self-hosted extension if your media contains series
2023-07-18 14:36:36 +02:00
- Resize to have a width of 648px
### Images
- Use `.webp`
2023-07-18 14:36:36 +02:00
### Videos
- Use `.webm` format
2023-09-11 00:51:08 +02:00
- Encode it with our [HandBrake profile](./.github/assets/tachiyomi-handbrake-profile.json)
2023-07-18 14:36:36 +02:00
- Remove audio track
## Credits
Thank you to all the people who have already contributed!
2023-07-18 20:56:45 +02:00
[![List of Contributors](https://contrib.rocks/image?repo=tachiyomiorg/website 'List of Contributors')](https://github.com/tachiyomiorg/website/graphs/contributors)