My version of CodiMD is: 1.7.1
(Docker)
What I expected to happen:
The target is to create custom url for page.
Tried to use http://x.x.x.x:3000/new/ to create a custom page id (i.e. page-id= welcome => http://x.x.x.x:3000/welcome)
What actually happened:
Got page not found 404
I already tried:
/new works as expected but creates random page-id
Hi
First of all, you might want to upgrade to 1.7.2 which was released yesterday.
Besides that, there are two ways to achieve your goal. One way would be to create note when free url mode is enabled, using CMD_ALLOW_FREEURL
and set it to true
for the moment you are doing that. Not this will allow any user (and if enabled, even guests) to create any page name they want. Therefore it’s definitely not recommended for public instances. But for a moment where you prepare some pages, it might be a good way to go.
Alternatively, you can write a markdownfile and place it in the /hedgedoc/public/docs/
directory, the same way described in the docs for “terms of service” and alike: https://docs.hedgedoc.org/guides/providing-terms/
This document will be read-only but can be updated by changing the mounted file.
I hope that answers your question.
Hi,
Thank you for your response.
I upgrade to 1.7.2 as suggested and configure the CMD_ALLOW_FREEURL.
It works as described.
I think it would be better if it wasp possible to use /new api since it will limit creating new pages unintentionally.
Do you want to use the /new api endpoint (which btw. is not meant for public use, as we don‘t guarantee it‘s stability)?
If so, you‘ll be happy to hear that 2.0 will include a public api, that supports this feature.
yes, I think it would be a useful feature
Thank you for the update