Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Flisar authored and Michael Flisar committed Jan 15, 2025
1 parent d490887 commit fd207fa
Show file tree
Hide file tree
Showing 27 changed files with 860 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build-mkdocs
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 \
mkdocs-minify-plugin \
"mkdocs-material[imaging]" \
mkdocs-macros-plugin \
mkdocs-glightbox \
mkdocs-badges
- name: Deploy
run: mkdocs gh-deploy --force
working-directory: documentation
59 changes: 59 additions & 0 deletions documentation/_data/other-projects.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
libraries:
Utilities:
- name: CacheFileProvider
link: https://mflisar.github.io/CacheFileProvider
maven: io.github.mflisar.cachefileprovider/library
description: This is a minimal library with a <b>few lines of code</b> and without dependencies that offers a simple file provider (simple read only access for sharing files with other apps).
- name: FeedbackManager
link: https://mflisar.github.io/FeedbackManager
maven: io.github.mflisar.feedbackmanager/library
description: This is a very small library that allows you to <b>send feedback</b> from an app <b>without internet permission</b> via email, either directly or via an unintrusive notification.
- name: Toolbox
link: https://github.com/MFlisar/Toolbox
maven: io.github.mflisar.toolbox/core
description: My personal toolbox library
Libraries:
- name: KotBilling
link: https://mflisar.github.io/KotBilling
maven: io.github.mflisar.kotbilling/library
description: A kotlin coroutine based solution for handling in app purchases for <b>billing library version 7</b>.
- name: KotPreferences
link: https://mflisar.github.io/KotPreferences
maven: io.github.mflisar.kotpreferences/core
description: With this library you can declare preferences via <b>kotlin delegates</b> and observe and update them via <b>kotlin flows</b>. This works with any storage implementation, an implementation for JetPack DataStore is provided already.
- name: Lumberjack
link: https://mflisar.github.io/Lumberjack
#image: https://raw.githubusercontent.com/MFlisar/Lumberjack/master/screenshots/compose-viewer1.jpg
maven: io.github.mflisar.lumberjack/core
description: This is a <b>full logging library</b> with a build in way to log to <b>console</b>, <b>file</b> or any <b>custom</b> place as well as optional extensions to send a log file via mail or show it on the device.
Compose:
- name: ComposeChangelog
link: https://mflisar.github.io/ComposeChangelog
image: https://raw.githubusercontent.com/MFlisar/ComposeChangelog/main/documentation/docs/screenshots/overview.jpg
maven: io.github.mflisar.composechangelog/core
description: This library offers you a a <b>changelog dialog</b> for compose including the ability to show new logs on app start only as well as filtering and customisation.
- name: ComposeColors
link: https://mflisar.github.io/ComposeColors
image: https://raw.githubusercontent.com/MFlisar/ComposeColors/main/documentation/docs/screenshots/material.png
maven: io.github.mflisar.composecolors/core
description: A simple collection of colors that can be used inside any KMP compose project.
- name: ComposeDebugDrawer
link: https://mflisar.github.io/ComposeDebugDrawer
image: https://raw.githubusercontent.com/MFlisar/ComposeDebugDrawer/main/documentation/docs/screenshots/demo2.jpg
maven: io.github.mflisar.composedebugdrawer/core
description: This library offers you a <b>simple</b> and easily extendable <b>debug drawer</b>.
- name: ComposeDialogs
link: https://mflisar.github.io/ComposeDialogs
image: https://raw.githubusercontent.com/MFlisar/ComposeDialogs/main/documentation/docs/screenshots/overview.jpg
maven: io.github.mflisar.composedialogs/core
description: A compose framework for <b>modal dialogs</b>.
- name: ComposePreferences
link: https://mflisar.github.io/ComposePreferences
image: https://raw.githubusercontent.com/MFlisar/ComposePreferences/main/documentation/docs/screenshots/overview.jpg
maven: io.github.mflisar.composepreferences/core
description: This library offers you <b>preference screens</b> for compose including the ability of endless nesting subscreens as well as simple integration of custom preferences.
- name: ComposeThemer
link: https://mflisar.github.io/ComposeThemer
image: https://raw.githubusercontent.com/MFlisar/ComposeThemer/main/documentation/docs/screenshots/demo.gif
maven: io.github.mflisar.composethemer/core
description: This is a <b>full compose theme engine</b> that handles applying a theme as well as updating the system ui elements. Extendible and allows to simply apply user selected themes inside your app.
80 changes: 80 additions & 0 deletions documentation/_data/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# -------
# Library
# -------

library:
name: ComposeChangelog
api: 21
github: MFlisar/ComposeChangelog
maven: io.github.mflisar.composechangelog
maven-main-library: core
multiplatform: true
screenshots:
- name: Changelog
images:
- ./screenshots/overview.jpg
branch: main
demo: true

# ------------
# Dependencies
# ------------

# optional
dependencies:
compose:
cmp: 1.7.1
compose: 1.7.1
material3: 1.3.1
experimental: true

# -------------
# Module
# -------------

# GRUPPEN - optional: nur bei mehreren Modulen benötigt!
groups:
- name: core
label: Core
gradle-comment: core
- name: modules
label: Modules
gradle-comment: dialog modules
- name: plugins
label: Plugins
gradle-comment: gradle plugins

modules:
- name: core
group: core
description: the core module to show a changelog
optional: false
platforms:
android: true
ios: true
jvm: false
info:
dependencies: []
- name: statesaver-kotpreferences
group: modules
description: a statesaver implementation for kotpreferences
optional: true
platforms:
android: true
ios: true
jvm: false
info:
dependencies:
- name: KotPreferences
link: https://github.com/MFlisar/KotPreferences
version: 0.7.2
- name: statesaver-preferences
group: modules
description: a statesaver implementation for jetpack preferences
optional: true
platforms:
android: true
ios: true
jvm: false
info:
dependencies: []
7 changes: 7 additions & 0 deletions documentation/_include/demo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if project["library"]["demo"] %}

## :dna: Demo

A full [demo](https://github.com/{{ project["library"]["github"] }}/tree/{{ project["library"]["branch"] }}/demo){:target="_blank"} is included inside the demo module, it shows nearly every usage with working examples.

{% endif %}
97 changes: 97 additions & 0 deletions documentation/_include/dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{% if project["dependencies"] is defined and project["dependencies"]["compose"] is defined %}

## Compose

| Dependency | Version | Infos |
|:---------------------:|:-------:|:----------------------------------------------:|
| Compose Multiplatform | `{{ project["dependencies"]["compose"]["cmp"] }}` | Uses compose `{{ project["dependencies"]["compose"]["compose"] }}` and material3 `{{ project["dependencies"]["compose"]["material3"] }}` |

{% if project["dependencies"]["compose"]["experimental"] %}

!!! warning

I try to use as few experimental APIs as possible, but this library does use a few experimental APIs which are still marked as experimental in material3 `{{ project["dependencies"]["compose"]["material3"] }}`. I will provide new versions as soon as possible if experimental APIs change or become stable.

{% endif %}

{% endif %}

{% macro row_dependencies(dependencies) %}
{% if dependencies|length > 0 %}
<td>
{% for d in dependencies %}
<a href={{ d["link"] }} target="_blank">{{ d["name"] }}</a><br>
{% endfor %}
</td>
<td>
{% for d in dependencies %}
<code>{{ d["version"] }}</code><br>
{% endfor %}
</td>
{% else %}
<td>-</td>
<td></td>
{% endif %}
{% endmacro %}

{% if project["modules"] is not defined or project["modules"] | length == 1 %}
{% if project["modules"] is not defined or project["modules"][0]["dependencies"] | length == 0 %}
This library does not have any dependencies!
{% else %}
This library does have following dependencies.
<table>
<tr>
<th>Dependency</th>
<th>Version</th>
</tr>
{% for dependency in project["modules"][0]["dependencies"] -%}
{{ row_dependencies([dependency]) }}
{% endfor %}
</table>
{% endif %}
{% else %}

## Modules

<table>
<tr>
<th>Module</th>
<th>Dependency</th>
<th>Version</th>
</tr>

{% for group in project["groups"] %}

<tr><td colspan="3" style="background-color:var(--md-primary-fg-color--light);">{{ group["label"] }}</td></tr>

{% for module in project["modules"] %}
{% if module["group"] == group["name"] %}
<tr>
<td><code>{{ module["name"] }}</code></td>

{% if module["dependencies"]|length > 0 %}
<td>
{% for d in module["dependencies"] %}
<a href={{ d["link"] }} target="_blank">{{ d["name"] }}</a><br>
{% endfor %}
</td>
<td>
{% for d in module["dependencies"] %}
<code>{{ d["version"] }}</code><br>
{% endfor %}
</td>
{% else %}
<td>-</td>
<td></td>
{% endif %}
</tr>
{% endif %}
{% endfor %}

{% endfor %}

</table>

{% endif %}
7 changes: 7 additions & 0 deletions documentation/_include/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% for key, value in other_projects["libraries"].items() %}
{% for prj in value %}
{% if prj["name"] == project["library"]["name"] %}
{{ prj["description"] }}
{% endif %}
{% endfor %}
{% endfor %}
6 changes: 6 additions & 0 deletions documentation/_include/gradle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This library is distributed via [maven central](https://central.sonatype.com/){:target="_blank"}.

Add dependencies like following to use this library inside your project.

{% include 'parts/gradle-single.md' %}
{% include 'parts/gradle-multi.md' %}
10 changes: 10 additions & 0 deletions documentation/_include/header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[![Maven](https://img.shields.io/maven-central/v/{{ project["library"]["maven"] }}/{{ project["library"]["maven-main-library"] }}?style=for-the-badge&color=blue)](https://central.sonatype.com/namespace/{{ project["library"]["maven"] }}){:target="_blank"}
![API](https://img.shields.io/badge/api-{{ project["library"]["api"] }}%2B-brightgreen.svg?style=for-the-badge)
![Kotlin](https://img.shields.io/github/languages/top/{{ project["library"]["github"] }}.svg?style=for-the-badge&color=blueviolet)
{% if page.meta.multiplatform -%}
![KMP](https://img.shields.io/badge/Kotlin_Multiplatform-blue?style=for-the-badge&label=Kotlin)
{%- endif -%}
[![License](https://img.shields.io/github/license/{{ project["library"]["github"] }}?style=for-the-badge)](https://github.com/{{ project["library"]["github"] }}/blob/{{ project["library"]["branch"] }}/LICENSE){:target="_blank"}

<h1 align="center"><b>{{ project["library"]["name"] }}</b></h1>

5 changes: 5 additions & 0 deletions documentation/_include/me.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# About Me

Check out my main homepage to get an impression of what I do and my *open source libraries*, *android apps* and *garmin watchfaces* that I've developed.

[https://mflisar.github.io/](https://mflisar.github.io/){:target="_blank" .md-button }
40 changes: 40 additions & 0 deletions documentation/_include/modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% if project["library"]["multimodule"] %}

## :material-puzzle: Modules

<table>
<tr>
<td>Module</td>
<td>Info</td>
<td>Description</td>
</tr>

{% for group in project["groups"] %}

<tr><td colspan="3" style="background-color:var(--md-primary-fg-color--light);">{{ group["label"] }}</td></tr>

{% for module in project["modules"] %}
{% if module["name"] is in group["modules"] %}
<tr>
<td><code>{{ module["name"] }}</code></td>
<td>
{% if module["optional"] %}
Optional
{% else %}
{% endif %}
</td>
<td>
{{ module["description"] }}
</td>
</tr>
{% endif %}
{% endfor %}

{% endfor %}

</table>

{% endif %}
Loading

0 comments on commit fd207fa

Please sign in to comment.