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
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy docs

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Install docs dependencies
run: uv sync --extra docs

- name: Build docs
run: uv run zensical build

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion docs/usage/adding-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The `add_view()` method accepts several parameters to configure your model's adm
| `select_schema` | Pydantic Schema | ❌ | Schema for read operations - excludes problematic fields |
| `update_internal_schema` | Pydantic Schema | ❌ | Internal schema for system updates |
| `delete_schema` | Pydantic Schema | ❌ | Schema for deletion operations |
| `allowed_actions` | Set[str] | ❌ | Controls available operations ("view", "create", "update", "delete") |
| `allowed_actions` | `Set[str]` | ❌ | Controls available operations ("view", "create", "update", "delete") |
| `include_in_models` | bool | ❌ | Whether to show in admin navigation (default: True) |
| `password_transformer` | PasswordTransformer | ❌ | For handling password fields |
| `display_field` | str | ❌ | Column used as this model's label when it appears as a related record from another model (e.g. `"name"`). Falls back to the primary key when unset. |
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The left sidebar contains collapsible sections:

#### Step 1: Access Create Form

- Click **"+ Add [ModelName]"** button on any model list page
- Click **"+ Add \[ModelName\]"** button on any model list page
- Form opens with fields based on your Pydantic schema

#### Step 2: Fill Required Fields
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ After completing the Usage section, you'll have a solid foundation for building

Need to jump to a specific topic? Here are the most commonly accessed sections:

- **[Quick setup example](configuration.md#basic-example)** - Get running in 5 minutes
- **[Quick setup example](configuration.md#minimal-setup)** - Get running in 5 minutes
- **[Session backends](session-backends.md#redis-sessions)** - Configure Redis for production
- **[Adding your first model](adding-models.md#basic-model-registration)** - Register a model and start managing data
- **[Search and filtering](interface.md#search-and-filtering)** - Find records quickly
Expand Down
95 changes: 0 additions & 95 deletions mkdocs.yml

This file was deleted.

7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ dev = [
]

docs = [
"mkdocs>=1.6.1",
"mkdocs-meta-descriptions-plugin>=4.0.0",
"mkdocs-material>=9.6.1",
"mkdocstrings[python]>=0.27.0"
"zensical>=0.0.15",
"mkdocstrings[python]>=1.0,<2",
"mkdocs-autorefs>=1.0,<2"
]

all = [
Expand Down
129 changes: 129 additions & 0 deletions zensical.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
[project]
site_name = "CRUDAdmin"
site_description = "Modern admin interface for FastAPI with built-in authentication, event tracking, and security features."
site_author = "Igor Benav"
site_url = "https://benavlabs.github.io/crudadmin"
docs_dir = "docs"
site_dir = "site"

copyright = "&copy; 2026 Benav Labs"

extra_css = ["stylesheets/extra.css"]

repo_name = "benavlabs/crudadmin"
repo_url = "https://github.com/benavlabs/crudadmin"
edit_uri = "edit/main/docs/"

# ==============================================================================
# Theme
# ==============================================================================

[project.theme]
variant = "modern"

logo = "assets/logo.png"
favicon = "assets/logo.png"

font.text = "Ubuntu"

features = [
"navigation.instant",
"navigation.instant.prefetch",
"navigation.tabs",
"navigation.indexes",
"search.suggest",
"content.code.copy",
]

[[project.theme.palette]]
scheme = "default"
primary = "custom"
accent = "custom"
toggle.icon = "lucide/sun"
toggle.name = "Switch to dark mode"

[[project.theme.palette]]
scheme = "slate"
primary = "custom"
accent = "custom"
toggle.icon = "lucide/moon"
toggle.name = "Switch to light mode"

# ==============================================================================
# Navigation
# ==============================================================================

[[project.nav]]
"CRUDAdmin" = "index.md"

[[project.nav]]
"Quick-Start" = "quick-start.md"

[[project.nav]]
"Usage" = [
{ "Overview" = "usage/overview.md" },
{ "Basic Configuration" = "usage/configuration.md" },
{ "Session Backends" = "usage/session-backends.md" },
{ "Adding Models" = "usage/adding-models.md" },
{ "Managing Admin Users" = "usage/admin-users.md" },
{ "Using the Interface" = "usage/interface.md" },
{ "Common Patterns" = "usage/common-patterns.md" },
]

[[project.nav]]
"Advanced" = [
{ "Overview" = "advanced/overview.md" },
]

[[project.nav]]
"API Reference" = [
{ "Overview" = "api/overview.md" },
{ "CRUDAdmin" = "api/crud_admin.md" },
{ "ModelView" = "api/model_view.md" },
{ "AdminSite" = "api/admin_site.md" },
{ "Session Management" = "api/session.md" },
{ "Event System" = "api/events.md" },
]

[[project.nav]]
"Community" = [
{ "Overview" = "community/overview.md" },
{ "Contributing" = "community/CONTRIBUTING.md" },
{ "Code of Conduct" = "community/CODE_OF_CONDUCT.md" },
{ "License" = "community/LICENSE.md" },
]

# ==============================================================================
# Markdown extensions
# ==============================================================================

[[project.markdown_extensions]]
admonition = {}

[[project.markdown_extensions]]
"codehilite" = {}

[[project.markdown_extensions]]
"toc" = { permalink = true }

[[project.markdown_extensions]]
"pymdownx.details" = {}

[[project.markdown_extensions]]
"pymdownx.highlight" = { anchor_linenums = true, line_spans = "__span", pygments_lang_class = true }

[[project.markdown_extensions]]
"pymdownx.inlinehilite" = {}

[[project.markdown_extensions]]
"pymdownx.snippets" = {}

[[project.markdown_extensions]]
"pymdownx.superfences" = {}

# ==============================================================================
# Plugins
# ==============================================================================

[[project.plugins]]
"mkdocstrings" = { config = { handlers = { python = { options = { show_source = true } } } } }
Loading