Aiven-Open / klaw-docs

Documentation site for Klaw, our Open Source Apache Kafka® governance toolkit.
https://www.klaw-project.io
Apache License 2.0
5 stars 8 forks source link
apache-kafka governance kafka kafka-connect

Klaw documentation

About

This is the Klaw documentation repository. Welcome 👋 🎉 You can find source code and all content for our (Klaw documentation site here.

We're using Docusaurus to build our documentation, an optimized site generator in React.

Installation and usage

Requirements

This is the setup you need every time. You can find the different ways how to run the local development process below.

Optional

To use Vale locally, please make sure you install it:

While we check for errors in the pipeline, we also have "warning" and "suggestion" level rules. We recommend running those checks locally, too.

Local development

First, make sure you hare the required technology set up:

The, install all needed dependencies and setup the needed githooks:

pnpm install

To start the local development server, run:

pnpm start

🦖 the website will now run on http://localhost:3000/

Scripts used and their actions

ℹ️ You can see all our scripts in the package.json. You can also run pnpm run in your console to get a list of all available scripts.

Please note that you have to set up your local development to use the scripts.

Here are the important ones you're likely to use:

For these scripts, you need to have Vale installed (see Requirements):

ℹ️ We are using a custom hook path for enabling pre-commit hooks. This path is set in the local git configuration when running pnpm install.

Linting and code formatting

How we keep our app's codebase looking consistent and nice 💅🏼

Fine-grained scripts for linting and formatting

We provide pnpm lint as well as pnpm reformat to check or mutate your changes. We also offer more specific scripts you can use:

Scripts with lint do not mutate your code in any way:

To apply findings from lint and mutate your files:

ℹ️ It's convenient to let Prettier and ESlint automatically format your code "on save" by your IDE or editor. For markdownlint you can find plugins for some IDE/editors, too.