api-docs: Move include markdown macro files for API documentation.

Moves files in `templates/zerver/help/include` that are used
specifically for API documentation pages to be in a new directory:
`templates/zerver/api/include`.

Adds a boolean parameter to `render_markdown_path` to be used
for help center documentation articles.

Also moves the test file `empty.md` to the new directory since
this is the default directory for these special include macros
that are used in documentation pages.
This commit is contained in:
Lauryn Menard
2022-12-07 19:41:17 +01:00
committed by Tim Abbott
parent 5f9dc76d54
commit 6759767b14
7 changed files with 13 additions and 4 deletions

View File

@@ -39,7 +39,7 @@ def test_generated_curl_examples_for_success(client: Client) -> None:
# should try to either avoid ordering dependencies or make them
# very explicit.
rest_endpoints_path = os.path.join(
settings.DEPLOY_ROOT, "templates/zerver/help/include/rest-endpoints.md"
settings.DEPLOY_ROOT, "templates/zerver/api/include/rest-endpoints.md"
)
rest_endpoints_raw = open(rest_endpoints_path).read()
ENDPOINT_REGEXP = re.compile(r"/api/\s*(.*?)\)")