Skip to main content

Render Markdown documentation in the Django Admin.

Project description

django-actual-admin-docs

Render Markdown documentation directly in the Django admin /admin/.

  • Support for nested subfolders
  • Comprehensive Markdown format
  • Provides default styles for Markdown rendering

See this screenshot of an example page.

Installation

  1. pip install django-actual-admin-docs.

  2. Add actual_admin_docs to your INSTALLED_APPS setting.

  3. Add the documentation urlpattern, above your admin urls:

    from django.contrib import admin
    from django.urls import include, path
    
    urlpatterns = [
        path("admin/docs/", include("actual_admin_docs.urls")),
        path("admin/", admin.site.urls),
    ]
    
  4. Add a DOCS_ROOT setting which should be a pathlib.Path pointing to the docs directory:

    DOCS_ROOT = BASE_DIR / "docs"
    

Documentation folder structure

You can use regular folders, subfolders, images, files, etc. You can use regular Markdown files and markup to write your documentation and link between documents.

๐Ÿ—‚ docs/
โ”‚
โ”œโ”€โ”€ ๐Ÿ—‚ subfolder           
โ”‚   โ”œโ”€โ”€ ๐Ÿ—‚ subfolder_in_a_subfolder
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ฆ download.zip
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“ index.md
โ”‚   โ”‚ 
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ another_file.md
โ”‚   โ””โ”€โ”€ ๐Ÿ“ index.md
โ”‚
โ”œโ”€โ”€ ๐Ÿ—‚ assets    
โ”‚   โ”œโ”€โ”€ ๐ŸŒ image.jpg
โ”‚   โ””โ”€โ”€ ๐ŸŒ other-image.jpg
โ”‚
โ””โ”€โ”€ ๐Ÿ“ index.md

Markup

A link to another document [is a regular link](markdown-sample.md).
Documents in subdirectories [are supported too](./subdirectory/index.md).

For images, downloads etc. use regular markdown markup too:

![a red bird](./assets/image.jpg)

[Click to download](./subfolder/subfolder_in_a_subfolder/download.zip)

Custom CSS

Overwrite the actual-admin-docs.css file to set your custom styles.

Changelog

v0.2 2024-11-05

  • Added syntax highlighting for fenced code blocks
  • Added Pygments as a dependency

v0.1 2024-11-05

  • Initial version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_actual_admin_docs-0.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

django_actual_admin_docs-0.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file django_actual_admin_docs-0.2.tar.gz.

File metadata

  • Download URL: django_actual_admin_docs-0.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for django_actual_admin_docs-0.2.tar.gz
Algorithm Hash digest
SHA256 5fe5518e157873902b71ea2c1e09629463ec92755b41e8e3ea19f64a478b5c08
MD5 14aa738defaa7d651eb33484341770c5
BLAKE2b-256 a289900c9916fdac9b064e35308d6a2dc77d530a1b0de8be7b861241cf698fe8

See more details on using hashes here.

File details

Details for the file django_actual_admin_docs-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_actual_admin_docs-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2751ae6a86b7cb70797a7a1d154a3630b8abbd764b403322a3785e15fe73afa9
MD5 db80b7e9a1ee8d4946049601db22a8ff
BLAKE2b-256 80eaff09af5f3b2fae5862ba846f1c91c608a8fcd95957cf67f677eb2ede72f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page