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

configuration option for trailing forward slash #1176

Open
thescientist13 opened this issue Nov 3, 2023 · 0 comments
Open

configuration option for trailing forward slash #1176

thescientist13 opened this issue Nov 3, 2023 · 0 comments
Labels
CLI Content as Data documentation Greenwood specific docs feature New feature or request Plugins Greenwood Plugins
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

Coming out of #1116 , one thing that will be useful to have a configuration option for is the trailing forward slash in a URL, e.g.

  • http://www.example.com/about
  • http://www.example.com/about/

Different web hosts / servers threat this differently, and not sure if there is also a "canonical" way of instrumenting this, or if it's mostly just for convenience / vanity?

Currently Greenwood assumes / sets a trailing forward slash automatically.

Summary

So the need here would be to enable a configuration option, e.g.

// greenwood.config.js
export default {
  trailingForwardSlash: true|false // default is true
}

At the very least it should be supported in all instances basePath were supported in

  1. The graph
  2. Pages (static and SSR routing)
  3. API Routes
  4. Adapters
  5. GraphQL / Content as data
@thescientist13 thescientist13 added documentation Greenwood specific docs Plugins Greenwood Plugins CLI Content as Data feature New feature or request labels Nov 3, 2023
@thescientist13 thescientist13 added this to the 1.0 milestone Nov 3, 2023
@thescientist13 thescientist13 changed the title have configuration option for trailing forward slash configuration option for trailing forward slash Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Content as Data documentation Greenwood specific docs feature New feature or request Plugins Greenwood Plugins
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant