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

Using Environment Variables In VitePress - issue#4516 #4517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KareimGazer
Copy link

@KareimGazer KareimGazer commented Jan 24, 2025

Description

I've created a page in VitePress reference for how to use environment variables in VitePress

Linked Issues

closes #4516


## Basic Workflow

Using environment variables in VitePress is essential for managing sensitive data such as API keys and service URLs.
Copy link
Contributor

@skirtles-code skirtles-code Jan 25, 2025

Choose a reason for hiding this comment

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

I think this could be misleading.

While it depends on the specifics of the use case, using environment variables won't protect sensitive data in most cases. Usually the values of the variables end up in the built JS files, where anyone can access them.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, that's true
I used the API keys as GitHub secrets in my CI/CD pipeline but still these values need to be read from the environment even if they are not written in the .env file.

Could you think of a better, more specific example?

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.

Using Environment Variables In VitePress
2 participants