Skip to content

Commit

Permalink
Switch from docsify to mkdocs (#98)
Browse files Browse the repository at this point in the history
* Initial commit

* Update docs and config

* Update mkdocs.yml

* Update README.md

* Fix links

* Fix admonitions

* Add GH deploy  action

* Update mkdocs.yml
  • Loading branch information
mar10 committed Aug 3, 2024
1 parent b56eb77 commit e1dbc90
Show file tree
Hide file tree
Showing 26 changed files with 864 additions and 265 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: mkdocs
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/build
/test/triage
/node_modules
/site/
*.log
sauce_connect.*
.pyftpsync-meta.json
Expand Down
4 changes: 3 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name = "pypi"
[packages]
fabulist = "*"
nutree = "*"
mkdocs = "*"
mkdocs-material = "*"

[dev-packages]
black = "*"
Expand All @@ -14,4 +16,4 @@ black = "*"
python_version = "3.12"

[pipenv]
allow_prereleases = true
# allow_prereleases = true
549 changes: 541 additions & 8 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

[![Demo](docs/assets/teaser_2.png?raw=true)](https://mar10.github.io/wunderbaum/demo/)

- Supports drag and drop, editing, filtering, and multi-selection.
- Supports drag and drop, editing, filtering, sorting, and multi-selection.
- Written in TypeScript, transpiled to ES6 (esm & umd).
- Performant handling of big data structures.
- Provide an object oriented API.
Expand Down
28 changes: 0 additions & 28 deletions docs/_coverpage.md

This file was deleted.

27 changes: 0 additions & 27 deletions docs/_sidebar.md

This file was deleted.

97 changes: 0 additions & 97 deletions docs/index.html

This file was deleted.

23 changes: 23 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ![logo](assets/tree_logo_32.png) Wunderbaum [![GitHub version](https://img.shields.io/github/v/release/mar10/wunderbaum?display_name=tag&sort=semver)](https://github.com/mar10/wunderbaum/releases/latest)

> A modern JavaScript tree/treegrid control.
!!! info

Wunderbaum has beta status:
API, Markup, Stylesheet, etc. are still subject to change.

- [Quick Start](tutorial/quick_start.md)
- [API Reference](https://mar10.github.io/wunderbaum/api/index.html){:target="\_blank"}
- [Online Demo](https://mar10.github.io/wunderbaum/demo/){:target="\_blank"}
- [Source Code on GitHub](https://github.com/mar10/wunderbaum){:target="\_blank"}

![logo](assets/teaser_1.png)

- Supports drag and drop, editing, filtering, sorting, and multi-selection.
- Written in TypeScript, transpiled to ES6 (esm & umd).
- Performant handling of _big_ data structures.
- Provide an object oriented API.
- Framework agnostic.
- Zero dependencies.
- Keyboard support.
10 changes: 5 additions & 5 deletions docs/tutorial/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ This document describes some general concepts of Wunderbaum.
- Robust, consistent handling of parallel, asynchronous behavior.
- Built-in support for
<!-- [aria](https://www.w3.org/TR/wai-aria-1.1/), -->
[drag and drop](/tutorial/tutorial_dnd.md),
[editing](/tutorial/tutorial_edit.md),
[filtering](/tutorial/tutorial_filter.md),
[multi-selection](/tutorial/tutorial_select.md).
- Fully [controllable using the keyboard](/tutorial/tutorial_keyboard.md).
[drag and drop](tutorial_dnd.md),
[editing](tutorial_edit.md),
[filtering](tutorial_filter.md),
[multi-selection](tutorial_select.md).
- Fully [controllable using the keyboard](tutorial_keyboard.md).
- Framework agnostic.
- Good documentation.
<!-- - Decent test coverage. -->
Expand Down
18 changes: 11 additions & 7 deletions docs/tutorial/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ There are many ways how you can help:

Issues can be reported in the [bug tracker](https://github.com/mar10/wunderbaum/issues).

?> Try your best to make fixing as easy as possible.
Do not assume that bugs are fixed, just because they are reported:
Please understand that issues are likely to be closed, if they are hard to
reproduce.
!!! info

Try your best to make fixing as easy as possible.
Do not assume that bugs are fixed, just because they are reported:
Please understand that issues are likely to be closed, if they are hard to
reproduce.

A bug report should contain:

Expand All @@ -46,9 +48,11 @@ Do not forget to add an entry to the `CHANGELOG.md`.
Features can be requested and discussed in the [bug tracker](https://github.com/mar10/wunderbaum/issues),
or - often more adequate - in the [discussion forum](https://github.com/mar10/wunderbaum/discussions).

?> Please understand that feature requests sometimes are rejected due to the lack
of resources, or because they do not fit into the _greater plan_ or paradigm.<br>
This does not mean that the proposal is bad, so do not feel offended.
!!! info

Please understand that feature requests sometimes are rejected due to the lack
of resources, or because they do not fit into the _greater plan_ or paradigm.<br>
This does not mean that the proposal is bad, so do not feel offended.

If you plan to contribute a feature via a
[pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
Expand Down
40 changes: 23 additions & 17 deletions docs/tutorial/quick_start.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Quick Start

!> Wunderbaum has beta status:<br>
API, Markup, Stylesheet, etc. are still subject to change.
!!! note

Wunderbaum has beta status:<br>
API, Markup, Stylesheet, etc. are still subject to change.

A Wunderbaum control is added to a web page by defining a `<div>` tag and
then create a new _Wunderbaum_ class instance, passing the tag and configuration
Expand Down Expand Up @@ -29,21 +31,21 @@ options.
<script>
data = [
{
"title": "Node 1",
"expanded": true,
"children": [
title: "Node 1",
expanded: true,
children: [
{
"title": "Node 1.1"
title: "Node 1.1",
},
{
"title": "Node 1.2"
}
]
title: "Node 1.2",
},
],
},
{
"title": "Node 2",
}
]
title: "Node 2",
},
];
document.addEventListener("DOMContentLoaded", (event) => {
const tree = new mar10.Wunderbaum({
Expand Down Expand Up @@ -71,7 +73,6 @@ options.
</html>
```


ESM modules are also supported:

```html
Expand All @@ -80,8 +81,13 @@ ESM modules are also supported:
</script>
```

?> Wunderbaum is a refactored version of [Fancytree](https://github.com/mar10/fancytree).
Read [migrate](/tutorial/migrate.md) for details and migration hints.
!!! info

Wunderbaum is a refactored version of [Fancytree](https://github.com/mar10/fancytree).

Read [migrate](migrate.md) for details and migration hints.

!!! info

?> See also the [API Documentation](https://mar10.github.io/wunderbaum/api/)
and the [live demo](https://mar10.github.io/wunderbaum/demo/).
See also the [API Documentation](https://mar10.github.io/wunderbaum/api/)
and the [live demo](https://mar10.github.io/wunderbaum/demo/).
10 changes: 6 additions & 4 deletions docs/tutorial/tutorial_api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Tree API

!> This chapter is still under construction.
!!! note

This chapter is still under construction.

This chapter describes different ways to modify the tree model using
the API.
Expand Down Expand Up @@ -56,15 +58,15 @@ parentNode.visit((node) => {

## Searching

See [Search and Filter Nodes](/tutorial/tutorial_filter.md).
See [Search and Filter Nodes](tutorial_filter.md).

## Selection

See [Search and Filter Nodes](/tutorial/tutorial_filter.md).
See [Search and Filter Nodes](tutorial_filter.md).

## Sorting

See [Search and Filter Nodes](/tutorial/tutorial_filter.md).
See [Search and Filter Nodes](tutorial_filter.md).

## Mutation

Expand Down
Loading

0 comments on commit e1dbc90

Please sign in to comment.