diff --git a/knowledge_repo/app/config_defaults.py b/knowledge_repo/app/config_defaults.py index 4daf8e67a..63eea7b9e 100644 --- a/knowledge_repo/app/config_defaults.py +++ b/knowledge_repo/app/config_defaults.py @@ -314,3 +314,9 @@ def prepare_repo(repo): # Posts with certain tags can be excluded from showing up # in the app. This can be useful for security purposes EXCLUDED_TAGS = ['private'] + + +# ------------- +# Collapse Code as Default Display Option +# ------------- +COLLAPSE_CODE_DEFAULT = False diff --git a/knowledge_repo/app/routes/posts.py b/knowledge_repo/app/routes/posts.py index 0b6f43b55..d61a384c9 100755 --- a/knowledge_repo/app/routes/posts.py +++ b/knowledge_repo/app/routes/posts.py @@ -112,7 +112,8 @@ def render(path): is_private=(post.private == 1), is_author=is_author, can_download=permissions.post_download.can(), - downloads=post.kp.src_paths) + downloads=post.kp.src_paths, + collapse_code=current_app.config['COLLAPSE_CODE_DEFAULT']) return rendered diff --git a/knowledge_repo/app/templates/markdown-rendered.html b/knowledge_repo/app/templates/markdown-rendered.html index f6737ac2a..4ed4b6b14 100644 --- a/knowledge_repo/app/templates/markdown-rendered.html +++ b/knowledge_repo/app/templates/markdown-rendered.html @@ -177,7 +177,7 @@