mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
docs: Add support for including markdown files in others.
This uses a third-party dependency, python-markdown-include. The example use for settings is intended primarily as a demonstration.
This commit is contained in:
@@ -73,6 +73,9 @@ jwt==0.3.2
|
|||||||
# Needed for USING_MANDRILL option for outgoing email
|
# Needed for USING_MANDRILL option for outgoing email
|
||||||
mandrill==1.0.57
|
mandrill==1.0.57
|
||||||
|
|
||||||
|
# Needed for including other markdown files for user docs
|
||||||
|
markdown-include==0.5.1
|
||||||
|
|
||||||
# Needed for mock objects in decorators
|
# Needed for mock objects in decorators
|
||||||
mock==2.0.0
|
mock==2.0.0
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ Zulip is written primarily in English, but it includes feature support for a var
|
|||||||
|
|
||||||
## Summary:
|
## Summary:
|
||||||
|
|
||||||
- Click the gear icon () in the upper right-hand corner of Zulip and select **Settings**.
|
- {!settings.md!}
|
||||||
<br><br>
|
|
||||||
|
|
||||||
- Scroll down to the **Display Settings**.
|
- Scroll down to the **Display Settings**.
|
||||||
|
|
||||||
|
|||||||
3
templates/zerver/help/include/settings.md
Normal file
3
templates/zerver/help/include/settings.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Click the gear icon () in the
|
||||||
|
upper right-hand corner of Zulip and select **Settings**.
|
||||||
|
<br><br>
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
ZULIP_VERSION = "1.4.1+git"
|
ZULIP_VERSION = "1.4.1+git"
|
||||||
PROVISION_VERSION = '3.1'
|
PROVISION_VERSION = '3.2'
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import markdown
|
|||||||
import markdown.extensions.admonition
|
import markdown.extensions.admonition
|
||||||
import markdown.extensions.codehilite
|
import markdown.extensions.codehilite
|
||||||
import markdown.extensions.toc
|
import markdown.extensions.toc
|
||||||
|
import markdown_include.include
|
||||||
|
|
||||||
register = Library()
|
register = Library()
|
||||||
|
|
||||||
@@ -72,6 +72,7 @@ def render_markdown_path(markdown_file_path):
|
|||||||
guess_lang=False
|
guess_lang=False
|
||||||
),
|
),
|
||||||
zerver.lib.bugdown.fenced_code.makeExtension(),
|
zerver.lib.bugdown.fenced_code.makeExtension(),
|
||||||
|
markdown_include.include.makeExtension(base_path='templates/zerver/help/include/'),
|
||||||
]
|
]
|
||||||
md_engine = markdown.Markdown(extensions=md_extensions)
|
md_engine = markdown.Markdown(extensions=md_extensions)
|
||||||
md_engine.reset()
|
md_engine.reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user