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

Add OpenSearch support #5198

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

maximilian-walter
Copy link

Add XML-file and HTML meta-tag so browsers can autodiscover the search of BookStack instances. See:

https://developer.mozilla.org/en-US/docs/Web/OpenSearch

Closes #5122

@ssddanbrown
Copy link
Member

Thanks for offering this @maximilian-walter!

Here's my feedback from a quick review (have not actually pulled down and tested yet):

Are you happy to take on these changes? Just let me know if you need further help/guidance, or if you're not able to perform further work for any reason.

@maximilian-walter
Copy link
Author

Thanks @ssddanbrown for your feedback!

Can the images be reduced down to just the 32 & 64? Can't see evidence of large images being used here, and I'd prefer to keep things to what's required/used where possible.

I don't know if higher resolutions would be used. I would expect that, but I did not validate it. Because we have them already I would keep them, but I am also fine if you wish to reduce the number of links.

The URL has a method attribute, but I can't see this as part of the spec?

You are right, I removed the attribute. We don't need it anyway.

The ShortName must be limited to 16 characters or less.

The hardlimit of 16 characters is now enforced.

The Description is lacking translation support.

I moved the description to the language file. I hope this was the correct way of doing it in regards of Crowdin.

We'd want to have some tests to cover this, (Simple example of tests for licenses endpoint).

I added some basic test based on your HtmlTest-class. Because the Symfony Crawler is used, I assumed it is fine to feed XML to it. :)

A proper XML schema validation would be much better, but I did not find any DTD file for this standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add OpenSearch support
2 participants