Skip to content

Latest commit

 

History

History
113 lines (69 loc) · 6.98 KB

CONTRIBUTING.md

File metadata and controls

113 lines (69 loc) · 6.98 KB

Contributing

Welcome to Tauri Docs! We're excited to have you 🥳

Open in Gitpod Open in GitHub Codespaces

There are a number of ways to get involved:

Reach out to us on Discord on the #docs channel if you have any questions!

Getting Started

  1. Clone this repo
  2. Run pnpm i
  3. Run pnpm dev to start the local server

Gitpod

Allow Gitpod to open new tabs so you immediately when the environment is done loading get a new tab popping up with the documentation.

Write Documentation

We have the following types of documents that roughly follow the types defined by Diátaxis:

Use this chart to help you figure out where the right place for your content is:

If the content describes… …and serves the user's… …then it must belong to…
practical steps study a guide
practical steps work a recipe
theoretical knowledge work a reference
theoretical knowledge study a blog post

Writing for Prerelease

While Tauri 2.0 is still in the prerelease stage people follow these guidelines for writing documentation:

  • Refer to Tauri 2.0 as if it's released now (so that copy doesn't need to be updated upon release)
  • Write any code so that it works now but...
  • Annotate 2.0 code with {/* FIXME: 2.0 */} (.mdx files) or <!-- FIXME: 2.0 --> (.md files) so that we can easily find and fix any of those upon release (feel free to add in what the code should be upon release in additional comments)

Writing Style

Dictionary

Word Description
app A Tauri app, prefer over application
web view Where the UI is rendered
  • Use an oxford comma in paragraphs, but not in headings and titles
  • Use title case for headings and titles
  • Make headings as succinct as possible to help the reader quickly find the content they need
  • Use simple present tense for verbs

Guide

Located in /src/content/docs/2/guide/

Guides are learning-oriented and take the reader through a specific journey such as starting a new project, and overview of a specific feature, or how to follow a specific flow such as building and bundling their app. They follow a similar philosophy to tutorials in Diátaxis.

The reader should be familiar with the concepts covered by the end of the guide and should set them up with the knowledge required to being experimenting with that topic themselves.

Recipe

Located in /src/content/docs/2/recipe/

Recipes are designed to guide the reader through a specific task similar and have a clear outcome and objective. This could be something like setting up authentication using Firebase, adding a Python binary using sidecar, or requesting admin access on a user's machine. They are similar to how-to guides in Diátaxis (not to be confused with our own guides mentioned above).

The prerequisites for a recipe should be clearly stated. If there are a lot of steps required before getting into the relevant information about the recipe then you may want to link out to another guide, recipe, or external resource and state those as a prerequisite at the top of the recipe.

Reference

Located in /src/content/docs/2/reference/, although they should be auto-generated when possible.

References are where all the nuts and bolts of Tauri's API are documented. These should be generated from upstream repos when possible and written following the best practices described by references in Diátaxix.

These should be as succinct and to the point as possible so that the reader can quickly find the relevant information.

If you'd like to view the API references locally then you must run pnpm dev:setup before pnpm dev to initialize all of the submodules. Now the http://localhost:3000/2/reference/ routes are available to preview.

Blog Post

Not yet created, will be added in the future.

Topics that are around understanding something can be written as a blog post (we welcome submissions to the Tauri blog from anyone). Blog posts are a good option because they help the reader understand that information is accurate at the time of writing (and of course can always be updated later if it becomes stale). Blog posts follow the goals of explanation in Diátaxis, but not all blog posts necessarily fit this specific format.

Diagrams

We use Astro D2 to generate diagrams. Because Netlify does not support compiling the diagrams in its end we have to push the prebuilt images manually. This is annoying, but not the end of the world seeing as we've previously been pushing the images manually anyway.

If you make an update to a diagram you'll need to install D2 on your system, then when you run either the build or dev commands you'll need to enable building the diagrams by setting the environment variable CONTEXT=d2.

# Adapt the command as relevant for your system to define the variable
CONTEXT=d2 pnpm dev

Translations (i18n)

Thanks for your interest in helping to translate the documentation! Visit the translation status page to see which docs are ready for translation, need updated, or need reviewed.

Read the Translating Guide for more information.