Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
- uses: cachix/cachix-action@v12
with:
name: appsys
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix flake check
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'static_content'
path: "static_content"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Flake-parts module, and Docker image.

## Key Features

* **Pre-Bundled and Easy to Use:** Get started with MkDocs quickly.
* **MkDocs Material Design:** Beautiful and modern documentation.
* **Markdown-Integrated PlantUML:** Create diagrams directly in your documentation.
* **Enhanced Code Blocks:** Highlighting and annotations for your code samples.
* **Nix Flake:** Seamless integration with Nix.
* **Flake-parts Module:** Easily incorporate into your Nix projects.
* **Docker Image:** Convenient deployment and usage.
- **Pre-Bundled and Easy to Use:** Get started with MkDocs quickly.
- **MkDocs Material Design:** Beautiful and modern documentation.
- **Markdown-Integrated PlantUML:** Create diagrams directly in your documentation.
- **Enhanced Code Blocks:** Highlighting and annotations for your code samples.
- **Nix Flake:** Seamless integration with Nix.
- **Flake-parts Module:** Easily incorporate into your Nix projects.
- **Docker Image:** Convenient deployment and usage.

## Try it

Expand All @@ -41,10 +41,10 @@ A Docker image is also available.

### Diagrams

* **Mermaid:** Supported out of the box.
* **PlantUML:** Provides more sophisticated diagramming capabilities,
including a standard library with numerous icons and styles.
The [C4 standard library](https://plantuml.com/c4-context) is particularly noteworthy.
- **Mermaid:** Supported out of the box.
- **PlantUML:** Provides more sophisticated diagramming capabilities,
including a standard library with numerous icons and styles.
The [C4 standard library](https://plantuml.com/c4-context) is particularly noteworthy.

## Documentation

Expand All @@ -54,21 +54,21 @@ Visit the full documentation site at [https://applicative.systems/mkdocs-flake](

We offer commercial support to help you succeed with `mkdocs-flake`:

* **Custom Development:** Tailored features for your needs
* **Integration Support:** Help with your deployment workflows
* **Training:** Expert guidance for your team
* **Consulting:** Infrastructure optimization
- **Custom Development:** Tailored features for your needs
- **Integration Support:** Help with your deployment workflows
- **Training:** Expert guidance for your team
- **Consulting:** Infrastructure optimization

Contact us:

* 📧 [hello@applicative.systems](mailto:hello@applicative.systems)
* 🤝 [Schedule a meeting](https://nixcademy.com/meet)
- 📧 [hello@applicative.systems](mailto:hello@applicative.systems)
- 🤝 [Schedule a meeting](https://nixcademy.com/meet)

## Community

* Join our [Matrix channel](https://matrix.to/#/#applicative.systems:matrix.org)
* Report issues on [GitHub](https://github.com/applicative-systems/mkdocs-flake/issues)
* Contribute via [Pull Requests](https://github.com/applicative-systems/mkdocs-flake/pulls)
- Join our [Matrix channel](https://matrix.to/#/#applicative.systems:matrix.org)
- Report issues on [GitHub](https://github.com/applicative-systems/mkdocs-flake/issues)
- Contribute via [Pull Requests](https://github.com/applicative-systems/mkdocs-flake/pulls)

## License

Expand Down
14 changes: 7 additions & 7 deletions documentation/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ The best way to use this project is via [Nix](https://nixos.org).

1. [Install Nix](https://nixos.org/download/)
2. Run this command inside your mkdocs project:
```console
nix run github:applicative-systems/mkdocs-flake
```

```console
nix run github:applicative-systems/mkdocs-flake
```

That's it, you can live-edit your documentation.

Expand Down Expand Up @@ -176,23 +177,22 @@ Rel_U(systemAlias, extSystemAlias, "Label", "Optional Technology")
@enduml
```


### Code

The code blocks with annotation support as
[documented by mkdocs-material](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/)
work out of the box:

``` py title="bubble_sort.py"
```py title="bubble_sort.py"
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i): # (1)
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```

1. :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted
text__, images, ... basically anything that can be written in Markdown.
1. :man_raising_hand: I'm a code annotation! I can contain `code`, **formatted
text**, images, ... basically anything that can be written in Markdown.

### Math

Expand Down
1 change: 0 additions & 1 deletion documentation/docs/integration/flake-parts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

If you already use [flake.parts](https://flake.parts) in your project, then
integrating mkdocs-flake is done with 3 steps:

Expand Down
15 changes: 7 additions & 8 deletions documentation/docs/reference/code.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

We do not provide more code features than mkdocs-material does out of the box
at this point.
For more information, please refer to the
Expand Down Expand Up @@ -31,28 +30,28 @@ Click here to see the [list of supported programming languages for code highligh

This code creates a code snippet with line numbers and annotations:

```` markdown title="Code Example with Line Numbers and Annotation"
``` py title="bubble_sort.py" linenums="1"
````markdown title="Code Example with Line Numbers and Annotation"
```py title="bubble_sort.py" linenums="1"
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i): # (1)
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```

1. :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted
text__, images, ... basically anything that can be written in Markdown.
1. :man_raising_hand: I'm a code annotation! I can contain `code`, **formatted
text**, images, ... basically anything that can be written in Markdown.
````

Result:

``` py title="bubble_sort.py" linenums="1"
```py title="bubble_sort.py" linenums="1"
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i): # (1)
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```

1. :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted
text__, images, ... basically anything that can be written in Markdown.
1. :man_raising_hand: I'm a code annotation! I can contain `code`, **formatted
text**, images, ... basically anything that can be written in Markdown.
17 changes: 8 additions & 9 deletions documentation/docs/reference/diagrams.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

This mkdocs distribution provides two ways to provide diagrams that are
calculated from semantic text input:

Expand All @@ -13,7 +12,7 @@ descriptions to PNG format at build time.

### Examples

```` markdown title="PlantUML chart"
````markdown title="PlantUML chart"
```plantuml
@startuml
!include <edgy/edgy>
Expand Down Expand Up @@ -89,7 +88,7 @@ $flowLeft(product, brand, "embodies")

Worth mentioning is especially the [C4](https://c4model.com/) standard library:

```` markdown title="PlantUML chart"
````markdown title="PlantUML chart"
```plantuml
@startuml
!include <C4/C4_Container>
Expand Down Expand Up @@ -131,8 +130,8 @@ for more infos.

### Examples

```` markdown title="Mermaid Graph Example"
``` mermaid
````markdown title="Mermaid Graph Example"
```mermaid
graph LR
A[Start] --> B{Error?};
B -->|Yes| C[Hmm...];
Expand All @@ -142,7 +141,7 @@ graph LR
```
````

``` mermaid
```mermaid
graph LR
A[Start] --> B{Error?};
B -->|Yes| C[Hmm...];
Expand All @@ -151,8 +150,8 @@ graph LR
B ---->|No| E[Yay!];
```

```` markdown title="Mermaid Sequence Example"
``` mermaid
````markdown title="Mermaid Sequence Example"
```mermaid
sequenceDiagram
autonumber
Alice->>John: Hello John, how are you?
Expand All @@ -166,7 +165,7 @@ sequenceDiagram
```
````

``` mermaid
```mermaid
sequenceDiagram
autonumber
Alice->>John: Hello John, how are you?
Expand Down
20 changes: 7 additions & 13 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ copyright: Copyright &copy; 2024 Applicative Systems GmbH
nav:
- Home: index.md
- Reference:
- reference/index.md
- Diagrams: reference/diagrams.md
- Code: reference/code.md
- reference/index.md
- Diagrams: reference/diagrams.md
- Code: reference/code.md
- Integration:
- integration/index.md
- No Integration: integration/simple-usage.md
- Plain Nix Flakes: integration/flake.md
- flake.parts: integration/flake-parts.md

- integration/index.md
- No Integration: integration/simple-usage.md
- Plain Nix Flakes: integration/flake.md
- flake.parts: integration/flake-parts.md

plugins:
- glightbox
Expand All @@ -27,7 +26,6 @@ plugins:
#- social # does not work within sandboxed builds: tries fonts.google.com
- tags


theme:
font: false

Expand Down Expand Up @@ -92,10 +90,6 @@ theme:
icon: material/weather-night
name: Switch to system preference


icon:
logo: logo

markdown_extensions:
- abbr
- admonition
Expand Down
25 changes: 15 additions & 10 deletions flake-module.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
mkdocs-flake: { self, flake-parts-lib, lib, ... }: {
options.perSystem = flake-parts-lib.mkPerSystemOption ({ config, ... }: {
imports = [
./modules/documentation.nix
];
mkdocs-flake:
{ self, flake-parts-lib, ... }:
{
options.perSystem = flake-parts-lib.mkPerSystemOption (
{ ... }:
{
imports = [
./modules/documentation.nix
];

config = {
_module.args.mkdocs-flake = mkdocs-flake;
_module.args.flakeSelf = self;
};
});
config = {
_module.args.mkdocs-flake = mkdocs-flake;
_module.args.flakeSelf = self;
};
}
);

_file = __curPos.file;
}
Loading
Loading