How to remove "Website Name" links shared in a topic/post?

When I add an internal link on my Discourse instance like…
https://MyWebsite.com/t/MyCategory

It will resolve to a more user friendly link that looks like…

My Category - My Website Name

  • Notice how it includes - My Website Name

But when I post an internal link from Meta.Discourse.org in the Meta Discourse instance, It does not include - Meta Discourse as shown below.

About the Feature category

How can I achieve this on my own Discourse instance? I dont want - Meta Discourse or - My Website Name from showing in these resolved links.

Thanks!

UPDATE

  • I have changed the links above to better represent my question.

SOLVED

The reason why the Meta Discourse link does not show - Meta Discourse and my website link does, is because my website link is for a category, while the meta.discourse link is for a topic as @supermathie has pointed out.

To combat this issue on my own website, I will simply use
[My Category](https://MyWebsite.com/t/MyCategory) markdown to avoid it adding the - My Website Name to the end of it. as @Heliosurge has pointed out.

Thanks both for your helpful input!

Intra-site topic links to the same site don’t include the category or site name:

same site, topic: About the Feature category

same site, category: Feature - Discourse Meta

different site, topic: Category definition for Gaming - gaming - Discourse Demo

different site, category: gaming - Discourse Demo

vs. the same on Try:

(as to how you can change that, I’m not sure where that is, but that’s why it’s different)

Is the link being used internal use?

There is also an option to Wrap Text in [Text]followed by the link wraped in “(link)”

ie
This topic post#1

[This topic post#1](https://meta.discourse.org/t/how-to-remove-website-name-links-shared-in-a-topic-post/257646?u=heliosurge)

You can also do this to the link

[This topic post#1](https://meta.discourse.org/t/
/257646)

If internal you can shortner it to this.

[This topic post#1](/t/
/257646)

Thank you both for your helpful replies. It was hard to mark which is the solution.

@supermathie Shared the logic, root cause of the issue and in a way solve the issue by avoiding using Categories as links.

@Heliosurge Provided the solution to resolve the issue as a whole.

Ah! Thought you already were aware since you used this method in your OP:

It will resolve to a more user friendly link that looks like...

 [My Category - My Website Name](https://MyWebsite.com/t/MyCategory)

네, 여러 루트가 값을 가질 때 어려울 수 있습니다.

외부에서 링크로 콘텐츠를 공유할 때 유용할 수 있는 #customization:theme-component가 있습니다. 바로 Share Link Shortener입니다.

I think he was looking to strip the link down if not mistaken to bare minimum. My final shortened link is handy as it also prevents an issue if the client changes domain name breaking the links.

Your right. I did know how to use…

In a perfect world, I was hoping for a checkbox to untick
[ ] Exclude Website Name from Internal Category links

This perfect world solution would prevent other users who post https://MyWebsite.com/t/MyCategory (without markdown - [Text](link)) and having it resolve to Category - My Website Name

So although @heilyatsitepoint solution does not solve the issue for other users posting category links without markdown, it will at least solve the issue for when I make posts (since I will always use the markdown).

For the remaining of other users posts…I may just have to turn a blind eye…or edit their post and add the markdown for them. - Yes, I have a little bit of OCD lol.

제가 궁금했던 부분이 바로 이거예요… 사이트 내 토픽 링크에서 사이트 이름을 제외하고 있으므로, 사이트 내 카테고리 링크에서도 사이트 이름을 제외하는 것이 좋을 수도 있겠네요.

참고로, 여러분에게 더 적합할 수 있는 다른 방법도 있습니다: Contribute > Feature (#contribute:feature)를 사용하면 해당 카테고리로 바로 연결되는 링크를 얻을 수 있습니다.

This will be of interest for you and other users

Share link shortener

Excellent suggestion for both Category link and tags.

Negative. No matter how long or short the URL is, its resolved to a friendly name
MyCategory/Topic - MyWebsiteName

Regarding the shortened link…

I love that feature! I was worried that if someone was to right click and copy the link it would copy /t/ /257646 but it will actually still copy the entire URL which is great for those who right click and share outside of the forum. Win-Win :).

Thanks for the tip!

You don’t need that newline; you can do e.g.:

[This Topic](/t/257646)

This Topic

This handy if your also considering a domain change as all links that use site domain in the l8nk will break. A client decided to change from “.ai” to “.com” had to fix some important links manually and any post with images still requored using the wrench to rebuild html o fix image displays in posts.

They should have used the discourse remap script - that’s what we do transparently when we have customers change their hostname.

동의합니다. 같은 사이트 내부에서 사이트 이름을 표시하는 것은 관련이 없다고 생각합니다.
구글 검색 결과 제목 끝에 전부 - Google이 붙는다고 상상해 보세요. lol

다만 외부 링크의 경우 사이트 이름을 유지하는 것은 유용합니다.

정말 멋진 기능입니다 (제 웹사이트에 게시하는 다른 사람들에게 교육이 필요하다는 점은 여전히 남아있지만, 개인 사용에는 훌륭하고… 실제로 문서를 읽는 사람들에게도 좋습니다 lol).

제 웹사이트에서 시도해 봤는데, 단순히 볼드체로 된 #Category만 생성되었고, 멋진 폴더 아이콘은 포함되지 않았습니다. 이것은 테마의 구성 요소인가요?

Well that would fall to me to complete. Thanks Now I know for future. What is the exact commandline or was that it? Still learning a lot. lol

I’m not sure? Maybe it is?

I’d recommend this guide:

Oh, I switched my domains, but just did a remap function in the console which is basically Find & Replace all URL instances to the new domain to fix broken links.

This was the guide I followed: Change the domain name or rename your Discourse

Announcements at times can help with tops and tricks for users. I often do it the harder way before learning a new easier method. lol