Skip to content

Commit 181137d

Browse files
authored
Add zensical.toml configuration (#2697)
* Add Zensical.toml configuration * Remove mkdocs.yaml * Fix Zensical.toml format per official docs * Rename to lowercase zensical.toml * Update gtag to G-0QSKK66WX4 * Add uv tool install as recommended installation method
1 parent a158041 commit 181137d

4 files changed

Lines changed: 138 additions & 109 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,18 @@
3535
## 📦 Installation
3636

3737
```bash
38-
pip install datamodel-code-generator
38+
uv tool install datamodel-code-generator
3939
```
4040

4141
<details>
4242
<summary>Other installation methods</summary>
4343

44-
**uv:**
44+
**pip:**
45+
```bash
46+
pip install datamodel-code-generator
47+
```
48+
49+
**uv (add to project):**
4550
```bash
4651
uv add datamodel-code-generator
4752
```

docs/index.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,19 @@
1919

2020
## 📦 Installation
2121

22+
=== "uv tool (Recommended)"
23+
24+
```bash
25+
uv tool install datamodel-code-generator
26+
```
27+
2228
=== "pip"
2329

2430
```bash
2531
pip install datamodel-code-generator
2632
```
2733

28-
=== "uv"
34+
=== "uv (project)"
2935

3036
```bash
3137
uv add datamodel-code-generator
@@ -37,13 +43,13 @@
3743
conda install -c conda-forge datamodel-code-generator
3844
```
3945

40-
=== "pipx (global)"
46+
=== "pipx"
4147

4248
```bash
4349
pipx install datamodel-code-generator
4450
```
4551

46-
=== "uvx (global)"
52+
=== "uvx (one-shot)"
4753

4854
```bash
4955
uvx datamodel-codegen --help

mkdocs.yaml

Lines changed: 0 additions & 104 deletions
This file was deleted.

zensical.toml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
[project]
2+
site_name = "datamodel-code-generator"
3+
site_description = "This code generator creates pydantic model from an openapi file and others."
4+
site_url = "https://koxudaxi.github.io/datamodel-code-generator"
5+
repo_name = "koxudaxi/datamodel-code-generator"
6+
repo_url = "https://github.com/koxudaxi/datamodel-code-generator"
7+
8+
nav = [
9+
{ "Overview" = "index.md" },
10+
{ "CLI Reference" = [
11+
{ "Overview" = "cli-reference/index.md" },
12+
{ "Base Options" = "cli-reference/base-options.md" },
13+
{ "Model Customization" = "cli-reference/model-customization.md" },
14+
{ "Field Customization" = "cli-reference/field-customization.md" },
15+
{ "Typing Customization" = "cli-reference/typing-customization.md" },
16+
{ "Template Customization" = "cli-reference/template-customization.md" },
17+
{ "OpenAPI Options" = "cli-reference/openapi-only-options.md" },
18+
{ "General Options" = "cli-reference/general-options.md" },
19+
{ "Utility Options" = "cli-reference/utility-options.md" },
20+
{ "Quick Reference" = "cli-reference/quick-reference.md" }
21+
]},
22+
{ "Support data types" = "supported-data-types.md" },
23+
{ "Usage" = [
24+
{ "Input Formats" = [
25+
{ "OpenAPI" = "openapi.md" },
26+
{ "JSON Schema" = "jsonschema.md" },
27+
{ "JSON Data" = "jsondata.md" },
28+
{ "GraphQL" = "graphql.md" }
29+
]},
30+
{ "Output Customization" = [
31+
{ "Output Model Types" = "what_is_the_difference_between_v1_and_v2.md" },
32+
{ "Model Reuse and Deduplication" = "model-reuse.md" },
33+
{ "Module Structure and Exports" = "module-exports.md" },
34+
{ "Type Mappings and Custom Types" = "type-mappings.md" },
35+
{ "Python Version Compatibility" = "python-version-compatibility.md" },
36+
{ "Root Models and Type Aliases" = "root-model-and-type-alias.md" },
37+
{ "Field Constraints" = "field-constraints.md" },
38+
{ "Field Aliases" = "aliases.md" },
39+
{ "OpenAPI-Specific Options" = "openapi-options.md" }
40+
]},
41+
{ "Templates and Formatting" = [
42+
{ "Custom Templates" = "custom_template.md" },
43+
{ "Custom Formatters" = "custom-formatters.md" },
44+
{ "Code Formatting" = "formatting.md" }
45+
]},
46+
{ "Integration" = [
47+
{ "One-liner Usage" = "oneliner.md" },
48+
{ "Using as Module" = "using_as_module.md" },
49+
{ "pyproject.toml" = "pyproject_toml.md" },
50+
{ "CI/CD Integration" = "ci-cd.md" }
51+
]}
52+
]},
53+
{ "FAQ" = "faq.md" },
54+
{ "Development-Contributing" = "development-contributing.md" },
55+
{ "Changelog" = "changelog.md" }
56+
]
57+
58+
[project.theme]
59+
features = [
60+
"content.code.copy",
61+
"content.code.annotate",
62+
"content.tabs.link",
63+
"navigation.instant",
64+
"navigation.tracking",
65+
"navigation.sections",
66+
"navigation.expand",
67+
"search.highlight",
68+
"search.share",
69+
"toc.follow"
70+
]
71+
72+
[project.theme.icon]
73+
annotation = "material/arrow-right-circle"
74+
75+
[project.theme.analytics]
76+
gtag = "G-0QSKK66WX4"
77+
78+
[[project.theme.palette]]
79+
scheme = "slate"
80+
primary = "light blue"
81+
accent = "light blue"
82+
toggle.icon = "material/brightness-4"
83+
toggle.name = "Switch to light mode"
84+
85+
[[project.theme.palette]]
86+
scheme = "default"
87+
primary = "light blue"
88+
accent = "light blue"
89+
toggle.icon = "material/brightness-7"
90+
toggle.name = "Switch to dark mode"
91+
92+
[project.markdown_extensions.pymdownx.highlight]
93+
anchor_linenums = true
94+
line_spans = "__span"
95+
pygments_lang_class = true
96+
97+
[project.markdown_extensions.pymdownx.inlinehilite]
98+
99+
[project.markdown_extensions.pymdownx.snippets]
100+
base_path = "."
101+
102+
[project.markdown_extensions.pymdownx.superfences]
103+
104+
[project.markdown_extensions.pymdownx.tabbed]
105+
alternate_style = true
106+
107+
[project.markdown_extensions.pymdownx.details]
108+
109+
[project.markdown_extensions.pymdownx.emoji]
110+
emoji_index = "zensical.extensions.emoji.twemoji"
111+
emoji_generator = "zensical.extensions.emoji.to_svg"
112+
113+
[project.markdown_extensions.admonition]
114+
115+
[project.markdown_extensions.attr_list]
116+
117+
[project.markdown_extensions.md_in_html]
118+
119+
[project.markdown_extensions.toc]
120+
permalink = true
121+
122+
[project.plugins.search]

0 commit comments

Comments
 (0)