From 80f67126785de288f9c3d69f759d757fd60641d3 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 1 Jul 2024 19:40:07 +0000 Subject: Link to global search syntax document as markdown on github --- gn2/wqflask/__init__.py | 2 ++ gn2/wqflask/api/markdown.py | 8 ++++++++ gn2/wqflask/templates/base.html | 2 +- gn2/wqflask/templates/search-syntax.html | 24 ++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gn2/wqflask/templates/search-syntax.html diff --git a/gn2/wqflask/__init__.py b/gn2/wqflask/__init__.py index e3708b0b..d651005a 100644 --- a/gn2/wqflask/__init__.py +++ b/gn2/wqflask/__init__.py @@ -33,6 +33,7 @@ from gn2.wqflask.api.markdown import environments_blueprint from gn2.wqflask.api.markdown import facilities_blueprint from gn2.wqflask.api.markdown import blogs_blueprint from gn2.wqflask.api.markdown import news_blueprint +from gn2.wqflask.api.markdown import xapian_syntax_blueprint from gn2.wqflask.api.jobs import jobs as jobs_bp from gn2.wqflask.oauth2.routes import oauth2 from gn2.wqflask.oauth2.client import user_logged_in @@ -127,6 +128,7 @@ app.register_blueprint(environments_blueprint, url_prefix="/environments") app.register_blueprint(facilities_blueprint, url_prefix="/facilities") app.register_blueprint(blogs_blueprint, url_prefix="/blogs") app.register_blueprint(news_blueprint, url_prefix="/news") +app.register_blueprint(xapian_syntax_blueprint, url_prefix="/search-syntax") app.register_blueprint(jupyter_notebooks, url_prefix="/jupyter_notebooks") app.register_blueprint(resource_management, url_prefix="/resource-management") diff --git a/gn2/wqflask/api/markdown.py b/gn2/wqflask/api/markdown.py index 580b9ac0..aa7dd3c4 100644 --- a/gn2/wqflask/api/markdown.py +++ b/gn2/wqflask/api/markdown.py @@ -24,6 +24,7 @@ links_blueprint = Blueprint("links_blueprint", __name__) policies_blueprint = Blueprint("policies_blueprint", __name__) facilities_blueprint = Blueprint("facilities_blueprint", __name__) news_blueprint = Blueprint("news_blueprint", __name__) +xapian_syntax_blueprint = Blueprint("xapian_syntax_blueprint", __name__) blogs_blueprint = Blueprint("blogs_blueprint", __name__) @@ -117,6 +118,13 @@ def news(): rendered_markdown=render_markdown("general/news/news.md")), 200 +@xapian_syntax_blueprint.route('/') +def xapian(): + return render_template( + "search-syntax.html", + rendered_markdown=render_markdown("general/search/xapian_syntax.md")), 200 + + @environments_blueprint.route("/") def environments(): diff --git a/gn2/wqflask/templates/base.html b/gn2/wqflask/templates/base.html index 26b75230..6c545646 100644 --- a/gn2/wqflask/templates/base.html +++ b/gn2/wqflask/templates/base.html @@ -188,7 +188,7 @@ - + diff --git a/gn2/wqflask/templates/search-syntax.html b/gn2/wqflask/templates/search-syntax.html new file mode 100644 index 00000000..52538826 --- /dev/null +++ b/gn2/wqflask/templates/search-syntax.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block title %}Global Search Syntax{% endblock %} + +{% block css %} + +{% endblock %} + +{% block content %} + +