Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/vendor/
**/.DS_Store
__pycache__/*
hooks/__pycache__/*
/site/
**/.idea/
.php-cs-fixer.cache
Expand Down
12 changes: 12 additions & 0 deletions hooks/edit_uri.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os

def on_config(config, **kwargs):
if os.environ.get("READTHEDOCS_VERSION_TYPE") == "external":
ref = os.environ.get("READTHEDOCS_GIT_COMMIT_HASH")
else:
ref = os.environ.get("GITHUB_HEAD_REF")

if ref:
config["edit_uri"] = f"edit/{ref}/docs/"

return config
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ site_name: Developer Documentation
repo_url: https://github.com/ibexa/documentation-developer
edit_uri: edit/5.0/docs
site_url: https://doc.ibexa.co/en/latest/
hooks:
- hooks/edit_uri.py
copyright: "Copyright 1999-2026 Ibexa AS and others"
validation:
omitted_files: warn
Expand Down
Loading