Form Actions not Relativized

All URLs are being relativized correctly except for form actions.

Example,

<form action="/search.html">

does not work, but

<a href="/search.html">

does.

Any help? Thanks in advance!

Give us more context. Are you setting relativeURLs in your config file? Or are you piping URLs to relURL? Or something else?

relative/uglyURLs = true.

I have also tried piping the URL to relURLs in the action property with no success.

I see – You’ll need to share your code for us to help more

I’ve uploaded the theme to GitHub. You can find it here https://github.com/cmjdev/hugo-docs

Here is a gist of the config.toml https://gist.github.com/cmjdev/73f27aa6586d65a2dc0a08b93d0d066e

The search input is in the partials/header file.

Yep I can reproduce this. I’d recommend creating an issue for it https://github.com/gohugoio/hugo/issues

I’ve submitted an issue. In your experience do you know of a way around this? I just need to post simple data to a local page (relatively)

Thanks. And sorry, I don’t. Perhaps others can chime in and help you

1 Like