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

Minor issue in the documentation related to port customization #3532

Closed
kossidts opened this issue Jun 20, 2023 · 3 comments
Closed

Minor issue in the documentation related to port customization #3532

kossidts opened this issue Jun 20, 2023 · 3 comments

Comments

@kossidts
Copy link
Contributor

In the configuration reference section, there is an example provided for customizing the port based on the command. However, I believe there's a small error in the code snippet provided.

Currently, the documentation states:

{
  // Example: Use the function syntax to customize based on command
  server: (command) => ({ port: command === 'dev' ? 3000 : 4000 })
}

I believe it should be the following, which works for me:

{
  // Example: Use the function syntax to customize based on command
  server: ({command}) => ({ port: command === 'dev' ? 3000 : 4000 })
}

It' s a small detail, but I believe it's worth addressing to ensure clarity and accuracy in the documentation.

@yanthomasdev
Copy link
Member

Thanks @kossidts, I believe you're right. Would you like to make a PR changing this? The Configuration Reference docs are generated from our types page, here's the exact line you need to change:
https://github.com/withastro/astro/blob/main/packages/astro/src/%40types/astro.ts#L846

@kossidts
Copy link
Contributor Author

Thank you for asking @Yan-Thomas. I have addressed the issue and created a PR withastro/astro#7436. However some tests have failed. I have also encounter test failure immediately after forking and cloning the repo locally.

I would appreciate your guidance on how to proceed to ensure the tests pass successfully. Please let me know if there are any additional steps or adjustments I can make to resolve the test failures and ensure the smooth integration of the fix.

@sarah11918
Copy link
Member

Yay! This was fixed and merged in the core repo docs, so I'm closing this issue. Thank you, @kossidts! 🥳

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

No branches or pull requests

3 participants