wiki pages: use names instead of ids in urls.
Switching to using wiki names in URLs instead of IDs: * https://danbooru.donami.us/wiki_pages/vocaloid * https://danbooru.donami.us/wiki_pages/hatsune_miku ID numbers can still be used, but they redirect to the name instead: * https://danbooru.donami.us/wiki_pages/11 (redirects to /wiki_pages/touhou). Numeric tags are prefixed with '~' to distinguish them from IDs: * https://danbooru.donami.us/wiki_pages/2019 (the wiki with id 2019) * https://danbooru.donami.us/wiki_pages/~2019 (the wiki for the tag named 2019) The tag names 'new' and 'search' are disallowed to prevent conflicts with existing routes: * https://danbooru.donami.us/wiki_pages/new * https://danbooru.donami.us/wiki_pages/search
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<% if dtext_link.external_link? %>
|
||||
<%= external_link_to(dtext_link.link_target) %>
|
||||
<% elsif dtext_link.wiki_link? %>
|
||||
<%= link_to(dtext_link.link_target, show_or_new_wiki_pages_path(title: dtext_link.link_target), class: "tag-type-#{Tag.category_for(dtext_link.link_target)}") %>
|
||||
<%= link_to_wiki dtext_link.link_target, class: "tag-type-#{Tag.category_for(dtext_link.link_target)}" %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to("»", dtext_links_path(search: { link_target: dtext_link.link_target })) %>
|
||||
|
||||
Reference in New Issue
Block a user