Sup y'all. One very basic thing that can save you some linking is using relative links. The idea is very simple: If you're browsing, and your current address is https://example.com/, and you click a link that has an href of, say, /home, you will be directed to https://example.com/home. If at that home-page, you click a link with an href equal to your_user_name_here, you will go to https://example.com/home/your_user_name_here. Notice that you don't need to include the whole address every time. This is useful because you're basically telling the browser that you are not leaving the site. This is also useful because you don't need to actually know in which site you are; if a href starts with a slash, it is absolute: /home, /posts, /images, will lead you to https://example.com/home, etc, if you're browsing https://example.com. A relative href will cause you to browse "one level deeper". That's it. Very simple.
You can use this to have the browser respect the user's choice between Civitai .red or .com, for instance. Now, suppose I would like to create a link to my models page. My models page is at https://civitai.com/user/kotojima_junichi/models. Using the editor, I can create a link like this:
Highlight the text you'd like to turn into a link:

Then click the second-last button, with the "chain", highlighted here in yellow.

In this example I will type /user/kotojima_junichi/models, and click "Save" or hit enter.
The resulting link will look like this: link, and it will keep the user in the same site - .com or .red.
You can try it out yourself. Browse to this article on .red or .com, click the above link, and it'll keep you in the site you're in.
Cheers.
Edited to add:
If you create a link with a href of https://example.com/user/johndoe or /user/johndoe, and the user is browsing https://example.com, they'll end up at the exact same address, so how do I test if I linked it correctly?
You can right-click the link, and click inspect:

A new window will show up, showing the HTML mark-up, with the anchor for the link highlighted:

If the text after href does not include https://, then you're good to go.






Comments