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

Updating DocSeach to v3 from v2 #5706

Merged

Conversation

Parsifal-M
Copy link
Contributor

Hey! 👋

This PR is to update from the legacy (now unsupported) Algolia v2 to the new v3 🥳

As its not fully working yet I have marked it as [WIP] and as you can see there are still some debugging stuff in there to help get this over the finish line 😅

Right now I think there is an issue with the {{ apiKey }}, when you check the console after trying to make a search you get some 403s

Thanks! 💪

Thanks!

@netlify
Copy link

netlify bot commented Feb 27, 2023

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 7cfb0c0
🔍 Latest deploy log https://app.netlify.com/sites/openpolicyagent/deploys/63ffa64f19855300085b4c3c
😎 Deploy Preview https://deploy-preview-5706--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

charlieegan3
charlieegan3 previously approved these changes Mar 1, 2023
Copy link
Contributor

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

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

Thanks for this @Parsifal-M 🙏 and for being so patient while we worked out how to get the App ID too. It is appreciated!

These changes look fine to me. They work in the preview and locally. It's nice that updating seems to be a pretty minimal change too 👏

Do you have anything left to do here?

@Parsifal-M Parsifal-M changed the title [WIP] Updating DocSeach to v3 from v2 Updating DocSeach to v3 from v2 Mar 1, 2023
@Parsifal-M Parsifal-M marked this pull request as ready for review March 1, 2023 19:24
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
@charlieegan3 charlieegan3 merged commit 1c40777 into open-policy-agent:main Mar 2, 2023
charlieegan3 added a commit that referenced this pull request Mar 6, 2023
The base URL is used to generate Permalinks in hugo:

https://gohugo.io/content-management/urls/

We then use page permalinks to generate the canonical URL:

https://github.com/open-policy-agent/opa/blob/09f1724270abe9b17a440c035d3837303688e268/docs/website/layouts/partials/meta.html#L47

This causes issues for the algolia crawler since www.openpolicyagent.org
is the domain used in there, and not openpolicyagent.org.

Given that we don't seem to use it either:

```
$ curl -I https://openpolicyagent.org/docs/v0.43.1/policy-language/
HTTP/2 301
location: https://www.openpolicyagent.org/docs/v0.43.1/policy-language/
...
```

I think it makes sense to update this to www. This is being done as
follow on from: #5706

Signed-off-by: Charlie Egan <charlie@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants