Start a new topic

let me pick the url slug for a page

because 12345-div-span isn't always the best url


5 people like this idea

if you'd like to do this manually an HTML comment at the very start of the post


<!--like so-->

 

will be invisible in the post itself but show up in the slug

i did not figure this out on my own, my apologies that i didn't save the post where i saw it


6 people like this

I have an observation and a suggestion.


Observation:

If you're primarily concerned about your ability to link a post with a good looking slug, good news: the slug is completely irrelevant! I can link to https://cohost.org/cathoderaydude/post/1434178-h3-title-bobby-hil, or I can link to https://cohost.org/cathoderaydude/post/1434178-bobby, or i can link to https://cohost.org/cathoderaydude/post/1434178-bee-movie, and all of them pull up the same post.


This doesn't mean that it wouldn't be better to have control over the slugs that are automatically generated, but I did want to point out that there is a workaround.


Suggestion:

One minor complaint is that you can't link a post with no slug at all. I would like to be able to just send https://cohost.org/cathoderaydude/post/1434178 to someone, but that doesn't work - and I imagine this is simply because Cohost's URL routing uses a regex that assumes there will always be some kind of slug.


I imagine it would be pretty low-effort to make the slug optional, and this would further mitigate the issue because you wouldn't need to come up with a new slug, you could just quickly delete everything after the number and have an opaque, but undistracting URL.


2 people like this

I've started using cohost for long-form blogging, and I would really like a way to control the URL slug. I noticed that it gets set automatically once from the original headline when saving a draft, and it can't be changed later. I just tried creating a new draft with "Add Trusted Root CA certificate on Ubuntu" as the headline and <!--ubuntu-root-ca--> as the body, expecting "ubuntu-root-ca" to be used in the URL slug, but instead I got "442009-add-trusted-root-ca".


If URL slugs could be longer, and editable, then cohost becomes a really nice long-format blogging platform I could see using a lot more in the future. I've already blogged twice here, and never had a personal blog.


1 person likes this

oh that's very useful to know! thank you! I tried it out and it looks like there's a 15-character limit on what will get pulled into the slug.

Login or Signup to post a comment