Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

views: optional index page registration #2952

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion invenio_app_rdm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _(x):
"""Footer base template."""

THEME_FRONTPAGE = False
"""Use default frontpage."""
"""Use default theme frontpage."""

THEME_FRONTPAGE_TITLE = _("The turn-key research data management repository")
"""Frontpage title."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,15 @@ const handleAuthButtonClick = () => {

$authButton.on({ click: handleAuthButtonClick });

const invenioConfig = JSON.parse(document.body.dataset.invenioConfig);
const isMathJaxEnabled = invenioConfig?.isMathJaxEnabled;
if (window.invenio) {
window.invenio.onSearchResultsRendered = () => {
if (isMathJaxEnabled) {
// Re-render mathematical content on the page using MathJax.
return window.MathJax?.typeset();
}
};
if (document.body.dataset.invenioConfig) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should always be there. @anikachurilova worked on this.
What was the issue?

Copy link
Contributor Author

@kpsherva kpsherva Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not there in the frontpage and throwing error in the console

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it should be fixed. @anikachurilova can you please check?

const invenioConfig = JSON.parse(document.body.dataset.invenioConfig);
const isMathJaxEnabled = invenioConfig?.isMathJaxEnabled;
if (window.invenio) {
window.invenio.onSearchResultsRendered = () => {
if (isMathJaxEnabled) {
// Re-render mathematical content on the page using MathJax.
return window.MathJax?.typeset();
}
};
}
}
1 change: 0 additions & 1 deletion invenio_app_rdm/theme/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def create_blueprint(app):
template_folder="templates",
static_folder="static",
)

blueprint.add_url_rule(**create_url_rule(routes["index"], default_view_func=index))
blueprint.add_url_rule(
**create_url_rule(routes["robots"], default_view_func=robots)
Expand Down