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 environment variables documentation #2200

Merged
merged 5 commits into from
May 26, 2024
Merged

Conversation

stretch07
Copy link
Contributor

What kind of changes does this PR include?

  • New or updated content

Description

  • What does this PR change? Give us a brief description.
    Completes the Stub environment variables page located here

@stretch07 stretch07 requested a review from a team as a code owner May 24, 2024 17:30
Copy link

netlify bot commented May 24, 2024

Deploy Preview for tauri-v2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2055835
🔍 Latest deploy log https://app.netlify.com/sites/tauri-v2/deploys/6652b904208a8a0008ff1ff2
😎 Deploy Preview https://deploy-preview-2200--tauri-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@stretch07
Copy link
Contributor Author

darn, I have no clue why the build is failing, it seems like something more should be escaped in the markdown but i cant figure out what it is

@vasfvitor
Copy link
Contributor

hey thanks very much for this, very much needed!

is it possible that you could provide the source for these env var? Or are they a compilation found in multiple places?

I'll take a quick look as why it's failing to build

Copy link
Contributor

@vasfvitor vasfvitor left a comment

Choose a reason for hiding this comment

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

Could you change the formatting to this pattern or something that is easier to navigate?

ENV_VAR : description
ENV_VAR : description
ENV_VAR : description

For instance, this page https://deploy-preview-2200--tauri-v2.netlify.app/start/migrate/from-tauri-1/#environment-variables-changes lists as this:

  • ENV_VAR : description
  • ENV_VAR : description
  • ENV_VAR : description

I'm open to ideas, if you have anything in mind...

Some visual references:
https://vitejs.dev/guide/env-and-mode#env-variables
https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime
https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables

@simonhyll simonhyll added this to the Version 2.x milestone May 24, 2024
@simonhyll simonhyll added the enhancement Does it add or improve content? label May 24, 2024
@stretch07 stretch07 requested a review from vasfvitor May 26, 2024 04:13
@stretch07
Copy link
Contributor Author

hey thanks very much for this, very much needed!

is it possible that you could provide the source for these env var? Or are they a compilation found in multiple places?

I'll take a quick look as why it's failing to build

they're practically directly copied from here:
https://github.com/tauri-apps/tauri/blob/dev/tooling/cli/ENVIRONMENT_VARIABLES.md

I'm not aware of v2 adding more environment variables but if so let me know

@vasfvitor
Copy link
Contributor

they're practically directly copied from here

so for now I think this is good, but for the future a improvement could be made to import this file contents into the documentation as a component, so we get the benefit of having always up to date content. Eventually could add extra information, if needed.

If you're feeling you want to tackle this, let me know, if not, I'll just check the preview and merge this.

@vasfvitor
Copy link
Contributor

vasfvitor commented May 26, 2024

but now looking at it, the rendered content will be different, have to figure a way to place this tip card nicely. I'll merge this alright

@vasfvitor
Copy link
Contributor

thanks again

@vasfvitor vasfvitor merged commit 8c150f4 into tauri-apps:v2 May 26, 2024
8 checks passed

Integrate https://github.com/tauri-apps/tauri/blob/dev/tooling/cli/ENVIRONMENT_VARIABLES.md into this page.
Copy link
Contributor

Choose a reason for hiding this comment

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

-_-

just saw this lol

@stretch07
Copy link
Contributor Author

they're practically directly copied from here

so for now I think this is good, but for the future a improvement could be made to import this file contents into the documentation as a component, so we get the benefit of having always up to date content. Eventually could add extra information, if needed.

If you're feeling you want to tackle this, let me know, if not, I'll just check the preview and merge this.

that's actually a great idea, I'll get familiar with astro and look into how to do this. thanks!

@vasfvitor
Copy link
Contributor

we have a few pages that does this, here you can see one that is in progress but mostly done, https://github.com/tauri-apps/tauri-docs/blob/137bb35ed873efb0536368ba751ae085a60ad12f/src/components/Permissions.astro, just need to fix something upstream.

other than that you can take a look at the dir /packages that has config-generator, js-api-generator, releases-generator that mix data importing and handling

overall everything that can be done this way, should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Does it add or improve content?
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants