From 5489aeb3bdcda8cc2c9b1965dc182d431d11c23e Mon Sep 17 00:00:00 2001 From: hedy Date: Sat, 29 Oct 2022 10:43:26 +0800 Subject: Improve docstring for page_src_url template filter --- pydis_site/apps/content/templatetags/page_src.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pydis_site') diff --git a/pydis_site/apps/content/templatetags/page_src.py b/pydis_site/apps/content/templatetags/page_src.py index 261abbdf..143c420c 100644 --- a/pydis_site/apps/content/templatetags/page_src.py +++ b/pydis_site/apps/content/templatetags/page_src.py @@ -12,6 +12,11 @@ def page_src_url(request_path: str) -> str: request_path is the relative path of an article, as returned by `request.path` in templates. + GitHub source URL is set in settings.py as CONTENT_SRC_URL, prefix for the + url which the request path would be appended to. + + Assumes '.md' file extension for the page source files. + For example: /pages/rules/ would return: https://github.com/python-discord/site/tree/main/pydis_site/apps/content/resources/rules.md """ -- cgit v1.2.3