Skip to content

fix(astro): link generation

jon r requested to merge fix/64-invalid-links into dev
  • Defaults to controlled, absolute URLs wherever possible.
  • Keeps the default Astro trailingSlash configuration of 'ignore'.
  • Assumes --base parameters or BASE_URL environment variables are always provided with trailing slash. This is reasonable, since base-path-based hosting will only work within actual sub-paths, which must end with a /. Else they would be resources or documents. It's their literal definition.
  • For items in content collections this generates absolute URLs for hrefs with using the url () supply function at time of loading.
  • Does not make assumptions about where in the path the root or the sitemap are found.
  • Adds the option to build URLs with index.html suffix.
  • Converges on the idea of being able to call the root slug / by its name, even though it is not part of slug-space.

prose of the day

closes #64 (closed)

Edited by jon r

Merge request reports