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

Fix support for baseURL override through plugin options #11

Conversation

AurorahHarmony
Copy link

Summary

Adds the ability to override the baseUrl through the module options. Closes #4

What are the specific steps to test this change?

  1. Set the APOS_BASE_URL environment variable -OR - baseUrl configuration value
  2. Run node app @apostrophecms/sitemap:print and see that the sitemap includes the baseUrl in page URLs
  3. Add a different baseUrl value in the module options object
  4. Run node app @apostrophecms/sitemap:print again, and see that the module's config option is used instead

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:
This feature is helpful when running Apostrophe in docker or behind a proxy, where the baseUrl may internally be localhost.

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.

baseUrl is omitted from generated URLs when it's is defined as a extension option instead of root config
1 participant