Skip to content

Commit

Permalink
docs: structure, add custom admonition
Browse files Browse the repository at this point in the history
  • Loading branch information
sujuka99 committed Oct 25, 2023
1 parent f6ff99e commit 7e7d5e8
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 17 deletions.
8 changes: 8 additions & 0 deletions docs/docs/developer/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Getting started

**Welcome!** We are glad to have you visit our developer guide! If you find any bugs or have suggestions for improvements, please open an [issue](https://github.com/bakdata/kpops/issues/new) and optionally a [pull request (PR)](https://github.com/bakdata/kpops/compare). In the case of a PR, we would appreciate it if you preface it with an issue outlining your goal and means of achieving it.

Find more about our code-style or insights into KPOps' code base here in our developer guide.

!!! wip "WIP"
The developer guide is still under construction. If you have a question left unanswered here, feel free to ask it by opening an issue.
10 changes: 10 additions & 0 deletions docs/docs/developer/style/markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Markdown

To ensure a consistent markdown style, we use [dprint](https://dprint.dev) to check and reformat.

```shell
dprint fmt
```

Use the [official documentation](https://dprint.dev/setup/) to setup dprint.
The configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json).
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
# Style

## Python
# Python

To ensure a consistent Python code style, we use [Ruff](https://docs.astral.sh/ruff/) for both linting and formatting.

### Configuration
## Configuration

Our configuration can be found in [KPOps](https://github.com/bakdata/kpops)' top-level `pyproject.toml`.

### Editor integration
## Editor integration

Below are listed existing Ruff plugins/extensions for some of the most popular python IDEs. If you cannot find your Editor of choices or you want something more custom, [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) enables Ruff to be used in any editor that supports the LSP

- [VSCode](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
- [PyCharm](https://plugins.jetbrains.com/plugin/20574-ruff)

## Markdown

To ensure a consistent markdown style, we use [dprint](https://dprint.dev) to check and reformat.

```shell
dprint fmt
```

Use the [official documentation](https://dprint.dev/setup/) to set up dprint.
The configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json).
18 changes: 18 additions & 0 deletions docs/docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/* Color the links with the primary color */
--md-typeset-a-color: var(--md-primary-fg-color);

--md-admonition-icon--wip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m13.78 15.3 6 6 2.11-2.16-6-6-2.11 2.16m3.72-5.2c-.39 0-.81-.05-1.14-.19L4.97 21.25l-2.11-2.11 7.41-7.4L8.5 9.96l-.72.7-1.45-1.41v2.86l-.7.7-3.52-3.56.7-.7h2.81l-1.4-1.41 3.56-3.56a2.976 2.976 0 0 1 4.22 0L9.89 5.74l1.41 1.4-.71.71 1.79 1.78 1.82-1.88c-.14-.33-.2-.75-.2-1.12a3.49 3.49 0 0 1 3.5-3.52c.59 0 1.11.14 1.58.42L16.41 6.2l1.5 1.5 2.67-2.67c.28.47.42.97.42 1.6 0 1.92-1.55 3.47-3.5 3.47Z"/></svg>')
}

.md-typeset .md-button, .md-button--primary {
Expand All @@ -22,3 +24,19 @@
.md-typeset .md-button:hover, .md-button--primary:hover {
border-color: white;
}

.md-typeset .admonition.wip,
.md-typeset details.wip {
border-color: rgb(160, 45, 0);
}
.md-typeset .wip > .admonition-title,
.md-typeset .wip > summary {
background-color: rgb(255, 195, 172);
}
.md-typeset .wip > .admonition-title::before,
.md-typeset .wip > summary::before {
background-color: rgb(255, 77, 6);
-webkit-mask-image: var(--md-admonition-icon--wip);
mask-image: var(--md-admonition-icon--wip);
}

6 changes: 5 additions & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,9 @@ nav:
- CI integration:
- GitHub Actions: user/references/ci-integration/github-actions.md
- Developer Guide:
- Getting Started: developer/getting-started.md
- Style:
- Python: developer/style/python.md
- Markdown: developer/style/markdown.md
- Code base:
- Auto generation: developer/auto-generation.md
- Style: developer/style.md

0 comments on commit 7e7d5e8

Please sign in to comment.