Skip to content

feat: change coveo key based on build environment #12

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

Merged
merged 5 commits into from
Jun 13, 2023
Merged

Conversation

JTorreG
Copy link
Collaborator

@JTorreG JTorreG commented Jun 8, 2023

Proposed changes

Logic added to create the coveo.js file with a different coveo key (prod and test) depending on the Hugo build environment.

Production uses the "production" key
Staging uses the "staging" key
Every other environment uses the "development" key

Tested locally, -e production -e development and -e staging , developer console shows a different key in the minified coveo.js

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • I have updated any relevant documentation (README.md and CHANGELOG.md)

@JTorreG JTorreG requested a review from jputrino June 8, 2023 15:28
@JTorreG JTorreG self-assigned this Jun 8, 2023
@jputrino
Copy link
Collaborator

The only reservation I have with this approach is that we would need to make any code change to 3 different files. Is there a less duplicative way to solve the problem?

Copy link
Collaborator

@jputrino jputrino left a comment

Choose a reason for hiding this comment

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

Nice work! LGTM

@JTorreG JTorreG merged commit 2611af6 into main Jun 13, 2023
@JTorreG JTorreG deleted the dev-coveo branch June 13, 2023 16:16
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.

4 participants