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

trailingSlash option #212

Open
rosalynpoort opened this issue Mar 23, 2024 · 2 comments
Open

trailingSlash option #212

rosalynpoort opened this issue Mar 23, 2024 · 2 comments

Comments

@rosalynpoort
Copy link

Provide environment information

"next": "^14.1.4",
"outstatic": "^1.4.4",
"react": "^18.2.0",

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Is it possible to add support for the 'trailingSlash' option in nextjs config? I have an existing site that uses trailingSlash and would like to add Outstatic to it. When I tried, the outstatic add/edit pages don't populate content or save, and the edit pages redirect to add new.

Expected Behavior

The url becomes "outstatic/posts//posts/new" instead of "outstatic/posts/new/" or "outstatic/posts/[slug]/" (I really only need trailingSlash on the frontend, as long as it works to edit content in the outstatic dashboard)

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

--

To Reproduce

Same as example but with next.config.js

const nextConfig = {   
    trailingSlash: true, 
};
@avitorio
Copy link
Owner

Hey @rosalynpoort,
Thanks for reaching out. I'll take a look at this as soon as I have some time.
But until then... would you want to give this a shot?

  • fork the outstatic repo
  • run pnpm install
  • run pnpm dev at the root level
  • set the /apps/dev env vars to yours

I think we'd need to add a new env var like the OST_BASE_PATH one.
Something like OST_TRAILING_SLASH.
Then we'd pass that env var along and you could probably just make some changes to the packages/outstatic/src/client/pages/list.tsx file.

When/if you get it working, create a PR and I'll review it. Cheers!

@dominicdev
Copy link

any fixed for this?

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