Answer the question
In order to leave comments, you need to log in
How are links to blog pages made?
For example on the history page. Links to read the story look like this samesite/histories/i-am-in-child etc. i.e. they take the story title in the link. Of course, for each story, they don’t create a page, but take an ID and load info from the database. But how others make a link as if there is a page for everyone. Using pure js, I took data from a query request, for example, samesite/histories/history?1, i.e. there was one html for everyone.
There is an example on the site https://meduza.io/ . See links for stories.
Answer the question
In order to leave comments, you need to log in
Well, it's usually done like this:
There is a link samesite/histories/i-am-in-child
. The server or client takes the fragment i-am-in-child
and searches the database for it. There is a post and it is displayed.
If a post is not found on such a link, display 404.
This is if in general terms. For different sites and stacks, implementation methods are different.
Specific to Vue
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question