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 Algolia search #1607

Merged
merged 1 commit into from
Apr 10, 2021
Merged

Add Algolia search #1607

merged 1 commit into from
Apr 10, 2021

Conversation

KyrietS
Copy link
Member

@KyrietS KyrietS commented Apr 2, 2021

Sorry that it's taken me so long to make this little change πŸ˜…

What does this PR do?

Added great instant search-box. Search is demonstrated on my demo website. The only change I need to do in order for this search to actually show our docs (currently search results are from Algolia Search) is to replace apiKey and indexName.

How does this PR change Premake's behavior?

only website is affected

Anything else we should know?

  • Search index is updated once a day.
  • We need to apply for API key to DocSearch. Only @starkos can do it. See Instructions below.

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits

Refers to #1547

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

Applying for apiKey

Algolia is free for open source projects that need search functionality for their documentation websites. It means that Premake is fully legitimate for using Algolia Search for free.

Preconditions:

  • Only owner of the website/project can apply for DocSearch. (@starkos) βœ”οΈ
  • Your website must be publicly available. βœ”οΈ
  • Your website must be a documentation website. βœ”οΈ
  • Your website must have some final content (no lorem ipsum allowed). βœ”οΈ

Additionaly they say:

Your request will get priority:

  • If your project is open source. βœ”
  • If you're using official integration. βœ”οΈ

So it's time to apply! I kindly ask you @starkos to do this here: https://docsearch.algolia.com/apply/ πŸ™ƒ

After they validate your request, you'll get a public apiKey and indexName. You can then send it here. It's public anyway πŸ‘

@KyrietS KyrietS requested a review from starkos April 2, 2021 23:21
@KyrietS KyrietS marked this pull request as draft April 2, 2021 23:42
@starkos
Copy link
Member

starkos commented Apr 4, 2021

Request made. Would it make sense to put the API key in GitHub secrets? I guess it still might be accessible via a View Source… in the browser but at least it won't be hanging out in the sources?

@KyrietS
Copy link
Member Author

KyrietS commented Apr 4, 2021

Would it make sense to put the API key in GitHub secrets?

GitHub secrets can be accessed only in workflow (yaml) files.

@starkos
Copy link
Member

starkos commented Apr 10, 2021

Response received:

apiKey: '7440a29a5d611582272899683f54f54e', 
indexName: 'premake', 

Could you also add a quick blurb to the website README that mentions Algolia?

@KyrietS
Copy link
Member Author

KyrietS commented Apr 10, 2021

Works like a charm πŸ˜€

@KyrietS KyrietS marked this pull request as ready for review April 10, 2021 14:52
Copy link
Member

@starkos starkos left a comment

Choose a reason for hiding this comment

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

Thanks!

@starkos starkos merged commit 9878dde into premake:master Apr 10, 2021
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.

None yet

2 participants