A reusable Django app that serves a markdown folder as a documentation site at /docs
Project description
django-md-docs
A reusable Django app that renders a folder of Markdown files as a documentation site at /docs.
Installation
pip install django-md-docs
Setup
1. settings.py
INSTALLED_APPS = [
...
"md_docs",
]
# Optional settings (all have defaults):
MD_DOCS_DIR = BASE_DIR / "md-docs" # default: BASE_DIR / "md-docs"
MD_DOCS_LOGIN_REQUIRED = True # default: True
MD_DOCS_BRAND = "My Project" # default: "Documentation"
MD_DOCS_LOGOUT_URL = "/accounts/logout/" # default: None (hides the logout button)
2. urls.py
from django.urls import include, path
urlpatterns = [
...
path("docs/", include("md_docs.urls")),
]
3. Create your markdown files
md-docs/
├── index.md → /docs/
├── guide/
│ ├── index.md → /docs/guide/
│ └── setup.md → /docs/guide/setup
└── api/
├── index.md → /docs/api/
└── endpoints.md → /docs/api/endpoints
The navigation sidebar is built automatically from the directory structure. The first heading in each file is used as its nav label.
Settings reference
| Setting | Default | Description |
|---|---|---|
MD_DOCS_DIR |
BASE_DIR / "md-docs" |
Path to the folder containing .md files |
MD_DOCS_LOGIN_REQUIRED |
True |
Redirect unauthenticated users to LOGIN_URL |
MD_DOCS_BRAND |
"Documentation" |
Brand name displayed in the sidebar header |
MD_DOCS_LOGOUT_URL |
None |
URL for the logout POST action. When None, the logout button is hidden |
Supported Markdown extensions
tablesfenced_codetoc(table of contents, shown in the right sidebar)attr_list
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_md_docs-0.1.0.tar.gz.
File metadata
- Download URL: django_md_docs-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d8e7df8d7ed13745432890a1fd2777f3062d29d392dc710fe41f17134a3f718
|
|
| MD5 |
2616ed9f72d9bf67ed6f4c7191ef123a
|
|
| BLAKE2b-256 |
20a535e2a2596a1ec50feb86d7163db12b09f1b11f7afba7501fe4a51120ae58
|
Provenance
The following attestation bundles were made for django_md_docs-0.1.0.tar.gz:
Publisher:
release.yml on gabrielbchaves/django-md-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_md_docs-0.1.0.tar.gz -
Subject digest:
6d8e7df8d7ed13745432890a1fd2777f3062d29d392dc710fe41f17134a3f718 - Sigstore transparency entry: 1117003220
- Sigstore integration time:
-
Permalink:
gabrielbchaves/django-md-docs@c608f54a65bc42eb8dd85e74095cf587a52315b9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/gabrielbchaves
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c608f54a65bc42eb8dd85e74095cf587a52315b9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_md_docs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_md_docs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d09d767248df98c8c5a24a0dbe10d5a5eabdbffbae9737e09e709916b50f7ae
|
|
| MD5 |
a5db6005b9f2383d37885e8a2aab0f3b
|
|
| BLAKE2b-256 |
e43c79e1bacd8d3b69bd3a4af2882bf3597c731f20b7964ac225c18c7676abbf
|
Provenance
The following attestation bundles were made for django_md_docs-0.1.0-py3-none-any.whl:
Publisher:
release.yml on gabrielbchaves/django-md-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_md_docs-0.1.0-py3-none-any.whl -
Subject digest:
7d09d767248df98c8c5a24a0dbe10d5a5eabdbffbae9737e09e709916b50f7ae - Sigstore transparency entry: 1117003230
- Sigstore integration time:
-
Permalink:
gabrielbchaves/django-md-docs@c608f54a65bc42eb8dd85e74095cf587a52315b9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/gabrielbchaves
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c608f54a65bc42eb8dd85e74095cf587a52315b9 -
Trigger Event:
push
-
Statement type: