feat: opt. white-label#255
Closed
kaffolder7 wants to merge 2 commits intorajnandan1:mainfrom
Closed
Conversation
Surfaces a `WHITE_LABEL` environment variable that can be defined in the `.env` environment file and/or passed via Docker/Docker Compose to: * Hide various footer links * Prevent db from seeding with a few user-specific pieces of data Not intending to draw credit away from you @rajnandan1 by any means, however, as an open-source project, it is common to add ‘white-labeling’ functionality, especially considering the project is licensed under MIT. The default is set to NOT include this environment variable so that attribution, by default, remains. However, it’d be great to get this merged as sometimes due to regulatory/compliance policies, some of these things need disabled from the get-go for specific users.
rajnandan1
reviewed
Feb 8, 2025
Owner
There was a problem hiding this comment.
better way would be do to do it in src/lib/server/db/seedSiteData.js
rajnandan1
reviewed
Feb 8, 2025
| } | ||
|
|
||
| // Remove Documentation & Github nav links from initial db seeding (if white-labeled) | ||
| if (key === "nav" && data_type === "object" && Array.isArray(value) && isWhiteLabeled) { |
Owner
There was a problem hiding this comment.
we should keep github and documentation as it will help people after they do 1 click deploy
rajnandan1
reviewed
Feb 8, 2025
Owner
There was a problem hiding this comment.
why are we not doing for non-docker deployment?
should it be just .env variable
rajnandan1
reviewed
Feb 8, 2025
Owner
There was a problem hiding this comment.
instead of doing {env} in everyfile we can do it in src/routes/(docs)/+layout.server.js
then you can use variable like data.isWhiteLabeled
rajnandan1
reviewed
Feb 8, 2025
Owner
There was a problem hiding this comment.
we should keep the documentation urls for easy access to what this page is about
Collaborator
Author
|
I'll try and get to your feedback tomorrow. I'm calling it a night. 😴 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surfaces an (optional)
WHITE_LABELenvironment variable that can be defined in the.envenvironment file and/or passed via Docker/Docker Compose to:Not intending to draw credit away from you @rajnandan1 by any means, however, being that it as an open-source project, it is common to add ‘white-labeling’ functionality, especially considering the project is licensed under MIT. The default is set to NOT include this environment variable so that attribution, by default, remains. However, it’d be great to get this merged as sometimes due to regulatory/compliance policies, some of these things need disabled from the get-go for specific users. I also don't think we need to necessarily (thoroughly) document this variable, as most users will never have a need for this.