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

[Next.js][RAV][node-headless-ssr] Add Sitecore prefix to SITE_NAME environment variable and config #1672

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

ambrauer
Copy link
Contributor

@ambrauer ambrauer commented Nov 21, 2023

Description / Motivation

This is a follow-up to #1640 and #1647 which adds a Sitecore prefix to the new SITE_NAME environment variable and corresponding JSS config (so, SITECORE_SITE_NAME and config.sitecoreSiteName). This allows us to avoid environment variable name conflicts on deployment platforms (e.g. SITE_NAME is a reserved env variable on Netlify).

Also, re-introduces SITECORE_JSS_APP_NAME to the node-headless-ssr templates as this is still necessary (used differently than site name) in these apps.

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@ambrauer ambrauer requested a review from a team November 21, 2023 23:48
@ambrauer ambrauer changed the title [Next.js][RAV][node-ssr] Add Sitecore prefix to SITE_NAME environment variable and config [Next.js][RAV][node-headless-ssr] Add Sitecore prefix to SITE_NAME environment variable and config Nov 21, 2023
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Looks good to me! 👍
Approved, see few suggestions below

@ambrauer ambrauer merged commit 9431b28 into dev Nov 22, 2023
1 check was pending
@ambrauer ambrauer deleted the fix/JSS-1216-site-name-conflict branch November 22, 2023 17:04
ambrauer added a commit that referenced this pull request Nov 22, 2023
…vironment variable and config (#1672)

* Add "sitecore" prefix to SITE_NAME environment variable and config

* updated CHANGELOG and one missed file

* remove unnecessary config.jssAppName from Angular and Vue to avoid confusion
# Conflicts:
#	packages/create-sitecore-jss/src/templates/angular/.env
#	packages/create-sitecore-jss/src/templates/nextjs/.env
#	packages/create-sitecore-jss/src/templates/react/.env
#	packages/create-sitecore-jss/src/templates/vue/.env
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