Skip to content

Commit 101662e

Browse files
committed
add mkdocs
1 parent 8b71b19 commit 101662e

11 files changed

Lines changed: 1280 additions & 4 deletions

File tree

.github/workflows/markdownlint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
on: [push, pull_request]
2+
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-24.04
6+
steps:
7+
- uses: actions/checkout@v6
8+
- uses: DavidAnson/markdownlint-cli2-action@v22
9+
with:
10+
fix: true
11+
globs: |
12+
*.md
13+
!test/*.md

.markdownlint.yaml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
default: false
2+
3+
# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md001.md
4+
MD001: true
5+
6+
# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md003.md
7+
MD003:
8+
style: "consistent"
9+
10+
# MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md004.md
11+
MD004:
12+
style: "consistent"
13+
14+
# MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md005.md
15+
MD005: true
16+
17+
# MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md007.md
18+
MD007:
19+
indent: 4
20+
21+
# MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md009.md
22+
MD009: true
23+
24+
# MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md010.md
25+
MD010: true
26+
27+
# MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md011.md
28+
MD011: true
29+
30+
# MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md012.md
31+
MD012: true
32+
33+
# MD013/line-length Line length https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md013.md
34+
MD013: false
35+
36+
# MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md014.md
37+
MD014: true
38+
39+
# MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md018.md
40+
MD018: true
41+
42+
# MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md019.md
43+
MD019: true
44+
45+
# MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md020.md
46+
MD020: true
47+
48+
# MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md021.md
49+
MD021: true
50+
51+
# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md022.md
52+
MD022: true
53+
54+
# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md023.md
55+
MD023: true
56+
57+
# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md024.md
58+
MD024:
59+
siblings_only: true
60+
61+
# MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md025.md
62+
MD025: true
63+
64+
# MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md026.md
65+
MD026: true
66+
67+
# MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md027.md
68+
MD027: true
69+
70+
# MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md028.md
71+
MD028: true
72+
73+
# MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md029.md
74+
MD029:
75+
style: "ordered"
76+
77+
# MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md030.md
78+
MD030:
79+
ul_single: 1
80+
ol_single: 1
81+
ul_multi: 3
82+
ol_multi: 2
83+
84+
# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md031.md
85+
MD031: true
86+
87+
# MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md032.md
88+
MD032: true
89+
90+
# MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md034.md
91+
MD034: true
92+
93+
# MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md035.md
94+
MD035: true
95+
96+
# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md036.md
97+
MD036: true
98+
99+
# MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md037.md
100+
MD037: true
101+
102+
# MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md038.md
103+
MD038: true
104+
105+
# MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md039.md
106+
MD039: true
107+
108+
# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md040.md
109+
MD040: true
110+
111+
# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md042.md
112+
MD042: true
113+
114+
# MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md045.md
115+
MD045: true
116+
117+
# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md046.md
118+
MD046:
119+
style: "fenced"
120+
121+
# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md047.md
122+
MD047: true
123+
124+
# MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md048.md
125+
MD048:
126+
style: "backtick"
127+
128+
# MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md049.md
129+
MD049:
130+
style: "asterisk"
131+
132+
# MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md050.md
133+
MD050:
134+
style: "consistent"
135+
136+
# MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md051.md
137+
MD051: true
138+
139+
# MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md053.md
140+
MD053: true
141+
142+
# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md054.md
143+
MD054: true
144+
145+
# MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md055.md
146+
MD055:
147+
style: "no_leading_or_trailing"
148+
149+
# MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md056.md
150+
MD056: true

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,3 @@ Contributing to the project is highly appreciated! However, some rules should be
9090
- Changes should include not only new functionality or bug fixes, but also tests for the new code.
9191
- After the changes are completed and **tested**, a Pull Request should be created with a clear description of the new functionality. And add one of the project maintainers as a reviewer.
9292
- Changes can be merged only after receiving an approve from one of the project maintainers.
93-

docs/.gitkeep

Whitespace-only changes.

docs/faq.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: FAQ
3+
---
4+
5+
# FAQ

docs/index.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Genesis Core
3+
---
4+
5+
Welcome to Genesis Core!
6+
7+
The Genesis Core is an open source software that offers a one turnkey solution to deal with infrastructure at all levels - from bare metal and virtual machines to applications and services.
8+
9+
Refer to the [wiki](https://github.com/infraguys/genesis_core/wiki) for more detailed information.
10+
11+
12+
# 📦 Installation
13+
14+
There are several ways to install Genesis Core and depend on your purpose you can choose one of them.
15+
16+
## Try it out
17+
**NOTE: Under development**
18+
19+
If you want to try Genesis Core in a few minutes, download the `all-in-one` [stand](https://github.com/infraguys/gci_dev_all_in_one). It's a ready-to-go virtual machine image with preinstalled Genesis Core and ability to get full functionality such as creating inner(nested) virtual machines, installation elements and many others.
20+
This stand may be used for development purposes as well if you are focusing on a new element development.
21+
22+
## Basic usage
23+
24+
In a case you would like to run Genesis Core on your own infrastructure, you can use the [basic guide](https://github.com/infraguys/genesis_core/wiki/BasicUsage) for more details.
25+
26+
# 🚀 Development
27+
28+
**Ubuntu:**
29+
```bash
30+
sudo apt-get install build-essential python3.12-dev python3.12-venv \
31+
tox libev-dev libvirt-dev
32+
```
33+
34+
**Fedora:**
35+
```bash
36+
sudo dnf install tox gcc libev-devel libvirt-devel
37+
```
38+
39+
Initialize virtual environment:
40+
41+
```bash
42+
tox -e develop
43+
source .tox/develop/bin/activate
44+
```
45+
46+
Follow the development guide [here](https://github.com/infraguys/genesis_core/wiki/DevelopmentGuide) for more details.
47+
48+
# ⚙️ Tests
49+
**NOTE:** Python version 3.12 is supposed to be used, but you can use other versions
50+
51+
```bash
52+
# Unit tests
53+
tox -e py312
54+
55+
# Functional tests
56+
tox -e py312-functional
57+
```
58+
59+
## Functional tests environment
60+
61+
To run functional tests, export the following environment variables:
62+
63+
```bash
64+
export DATABASE_URI="postgresql://genesis_core:genesis_core@127.0.0.1:5432/genesis_core"
65+
export ADMIN_PASSWORD="admin"
66+
export DEFAULT_CLIENT_SECRET="GenesisCoreSecret"
67+
export GLOBAL_SALT="FOy/2kwwdn0ig1QOq7cestqe"
68+
export HS256_KEY="secret"
69+
```
70+
71+
# 🔗 Related projects
72+
73+
- Genesis SDK is a set of tools for developing Genesis elements. You can find it [here](https://github.com/infraguys/gcl_sdk).
74+
- Genesis DevTools it's a set oftools to manager life cycle of genesis projects. You can find it [here](https://github.com/infraguys/genesis_devtools).
75+
76+
77+
# 💡 Contributing
78+
79+
Contributing to the project is highly appreciated! However, some rules should be followed for successful inclusion of new changes in the project:
80+
- All changes should be done in a separate branch.
81+
- Changes should include not only new functionality or bug fixes, but also tests for the new code.
82+
- After the changes are completed and **tested**, a Pull Request should be created with a clear description of the new functionality. And add one of the project maintainers as a reviewer.
83+
- Changes can be merged only after receiving an approve from one of the project maintainers.

docs/onepager.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 🧩 Genesis Core
3+
---
4+

mkdocs.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
site_name: genesis_core
2+
site_url: https://github.com/infraguys/
3+
repo_name: genesis_core
4+
repo_url: https://github.com/infraguys/genesis_core
5+
edit_uri: browse/docs/
6+
7+
theme:
8+
name: material
9+
language: ru
10+
features:
11+
- search.suggest
12+
- search.highlight
13+
- navigation.tabs
14+
- toc.integrate
15+
palette:
16+
- scheme: default
17+
toggle:
18+
icon: material/lightbulb-outline
19+
name: Switch to dark mode
20+
- scheme: slate
21+
toggle:
22+
icon: material/lightbulb
23+
name: Switch to light mode
24+
25+
plugins:
26+
- search:
27+
lang:
28+
- en
29+
- ru
30+
- glightbox
31+
32+
extra:
33+
repo_icon: github
34+
35+
markdown_extensions:
36+
- meta
37+
- admonition
38+
- footnotes
39+
- attr_list
40+
- codehilite:
41+
guess_lang: false
42+
- toc:
43+
slugify: !!python/name:pymdownx.slugs.uslugify
44+
permalink: '#'
45+
- pymdownx.arithmatex
46+
- pymdownx.betterem:
47+
smart_enable: all
48+
- pymdownx.keys
49+
- pymdownx.emoji:
50+
emoji_index: !!python/name:pymdownx.emoji.gemoji
51+
emoji_generator: !!python/name:pymdownx.emoji.to_svg
52+
- pymdownx.caret
53+
- pymdownx.critic
54+
- pymdownx.details
55+
- pymdownx.inlinehilite
56+
- pymdownx.magiclink
57+
- pymdownx.mark
58+
- pymdownx.smartsymbols
59+
- pymdownx.superfences:
60+
preserve_tabs: true
61+
custom_fences:
62+
- name: mermaid
63+
class: mermaid
64+
format: !!python/name:pymdownx.superfences.fence_code_format
65+
- pymdownx.tasklist:
66+
custom_checkbox: true
67+
- pymdownx.tilde
68+
- pymdownx.tabbed:
69+
alternate_style: true
70+
71+
nav:
72+
- Software:
73+
- Общее: index.md
74+
- Лендинг: onepager.md
75+
- Network:
76+
- Load Balancer as a Service API: network/load_balancer.md
77+
- Service:
78+
- Service as a Service API: element_manager/service.md
79+
- FAQ: faq.md

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ ruff = [
7676
shellcheck = [
7777
"shellcheck-py",
7878
]
79+
docs = [
80+
"mkdocs-material==9.1.0",
81+
"mkdocs-glightbox",
82+
]
7983

8084
[tool.ruff]
8185
exclude = [

tox.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,22 @@ commands = ruff check .
4343
extras =
4444
ruff
4545
runner = uv-venv-lock-runner
46-
commands = ruff format
46+
commands =
47+
ruff format
48+
ruff check .
4749

4850
[testenv:mypy]
4951
extras =
5052
mypy
5153
runner = uv-venv-lock-runner
5254
commands = mypy -p genesis_core
5355

56+
[testenv:docs]
57+
extras =
58+
docs
59+
runner = uv-venv-lock-runner
60+
commands = mkdocs serve --dev-addr 0.0.0.0:8181 --livereload
61+
5462
[testenv:develop]
5563
runner = uv-venv-lock-runner
5664
extras =

0 commit comments

Comments
 (0)