Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Board documentation for new format docs #398

Merged
merged 7 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title: Flight Controller Documentation Example
---

{/* TODO: COPY OVER TO NEW fc DOCUMENTATION DIRECTORY STRUCTURE WHEN READY, AS THIS DOC SHOULD BE BASICALLY READY */}

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
title: Flight Controller Documentation Template
---

{/* The metadata at the top of the file is used to modify the page title only on this template page. REMOVE THEM AFTER COPYING THIS FILE */}
{/* If title metadata is not present, the first-level header at the beginning of the file is used as the title. This is the recommended approach */}

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# How to Create Board Documentation

The newly created board documentation format is made to take full advantage of the features available with the documentation platform in use - Docusaurus. It is extended with features not present in the default markdown format, and may be more complex to work with.

It is not necessary to modify the additional components in the documentation file, all of the necessary info can be added using the default [markdown syntax](https://www.markdownguide.org/basic-syntax/). The additional components are there to provide a more visually appealing and interactive experience for the reader.

## Local Development

The documentation website can be run locally to preview changes before submitting a pull request. To do this, follow the steps below:

1. Fork the repository, and clone it to your local machine
2. Create a new branch for your changes with `git checkout -b <branch-name>`
3. Run `npm install` in the root directory
4. Run `npm run start` to start the development server

When the server starts, a `localhost:3000` address will be opened in your default browser. If not, you can open it manually. The website will automatically update when changes are made to the documentation files, any errors will be displayed in the terminal.

## Adding a New board

New board documentation files should be added to the `docs/wiki/boards/current/<TARGETNAME>` directory. A template can be copied from `docs/development/manufacturer/fc_documentation/fc-doc-template.mdx.template` - this template contains all the necessary layout components, and comments explaining what to fill out and how.

The `docs/wiki/boards/current/<TARGETNAME>` should have the following structure:

```
docs/wiki/boards/current/<TARGETNAME>
├── <TARGETNAME>.mdx
├── <TARGETNAME>-images/
│ ├── <TARGETNAME-top>.png
│ ├── <TARGETNAME-bottom>.png
│ ├── ... (other images/media/diagrams)
```

## Writing Documentation

There are some automated checks in place to ensure that the documentation is formatted correctly. They are run before a commit is made, and will prevent the commit if they fail. The checks are:

- Document Title Case - The level 1 headings of the document should be in [title case](https://titlecaseconverter.com/). If the check fails, the error message will provide the line where the incorrect title is located, and a correct title case version of the title
s
- Document File Name - The file name of the document should not contain any special characters - only letters, numbers, hyphens, and underscores are allowed

Apart from the checks, the documentation can be written freely using the default markdown syntax. The additional `<Tabs>` and `<TabItem>` components should be kept as they are, and only the content inside them should be modified.

### Special Formatting

It's possible to add special formatting to the documentation with warning, info, and tip boxes. These boxes can be added with the following syntax:

:::danger

Danger box content

:::

:::warning

Warning box content

:::

:::info

Info box content

:::

:::tip

Tip box content

:::

:::note

Note box content

:::

For additional formatting options, refer to the [MDX Reference](/docs/development/mdx-reference) - Math formulas, code blocks, and other formatting options are available, but shouldn't be necessary for regular board documentation.

### Adding Images

Images should be added to the `<TARGETNAME>-images` directory, and referenced in the documentation file with the following syntax:

```markdown
![<Board Name>](./<TARGETNAME>-images/<TARGETNAME-top>.png)
```

Top/bottom images should be added for each board, and any additional images or diagrams can be added as needed. The images can be in any web-compatible format, but `.png` is recommended.

## Submitting a Pull Request

When the documentation is ready, it can be committed to your fork if all the checks pass - if not, try to fix the issues and commit again. You can then make a pull request from your fork and branch against the `master` branch of the `betaflight.com` repository.

The pull request will be reviewed by the maintainers, and if everything is in order, it will be merged into the `master` branch. The changes will then be automatically deployed to the live website.

# Additional Information

## Board Samples

As a manufacturer, you can write the documentation yourself without providing a sample, or you can provide the sample and a documentation page will be created for the board.

While sample boards are not required for self-written documentation, it is recommended to send out samples so that the page can be modified if needed, and the developers have boards to provide user support.

## Development Issues

If you encounter an issue during document creation/writing/submission, please contact the development team - as a manufacturer, please do so in the private Discord communication channel if possible. As a non-manufacturer, please get in touch in the `#documentation` channel.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: AIKONF4
---

# Aikon F4

## Description
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: AIRBOTF4
---

# AirBotF4 and FLIP32F4

Flip32F4 and AirBotF4 are essentially the same. Both are based on the OP Revolution design, with some changes and addons.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: APEXF7
---

# ApexF7

### Features
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: ELINF405
---

# Elin F405

## Hardware Features
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: ELINF722
---

# Elin F722

## Hardware Features
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ The Holybro Kakute F4 All-In-One flight controller makes it easy to build your m

•Dimensions: 35x43x6mm (includes USB in height)

•Mounting Holes: Standard 30.5mm square to center of holes
•Mounting Holes: Standard 30.5mm square to center of holes

•Weight: 7g

## Pinout Diagram

![Pinout diagram](https://github.com/jamming/image/blob/master/kakuteF4-size.jpg?raw=true)

```
BUZ- : Piezo buzzer negative leg

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions docs/wiki/boards/archive/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Archive",
"position": 2,
"link": {
"type": "generated-index",
"description": "Archive of board documentation pages that don't follow the current format, aren't up to date, or are no longer supported."
}
}
File renamed without changes
Binary file not shown.
Loading
Loading