refactor(routes): canonical URLs now match sablog format exactly
- /show-{id}.shtml (comments page: /show-{id}-{page}.shtml)
- /category-{cid}.shtml / /category-{cid}-{page}.shtml
- /archives-{YYYYMM}.shtml / /archives-{YYYYMM}-{page}.shtml
- /tag/{name}, /tagslist.shtml, /index-{page}.shtml
- slug 时代的 /posts/{slug} 等旧格式全部 301 到 sablog 格式
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
<time datetime="{{ $post->published_at->toIso8601String() }}">{{ $post->published_at->format(blog_setting('normaltime', 'Y-m-d H:i')) }}</time>
|
||||
@if($post->author)<span>· {{ $post->author->name }}</span>@endif
|
||||
@if($post->category)
|
||||
<span>· <a href="{{ route('category.show', $post->category->slug ?: $post->category->id) }}">{{ $post->category->name }}</a></span>
|
||||
<span>· <a href="{{ route('category.show', $post->category->id) }}">{{ $post->category->name }}</a></span>
|
||||
@endif
|
||||
<span>· 阅读 {{ $post->views }}</span>
|
||||
</div>
|
||||
@@ -53,7 +53,7 @@
|
||||
@if($post->tags->isNotEmpty())
|
||||
<div class="post-tags">
|
||||
@foreach($post->tags as $tag)
|
||||
<a href="{{ route('tags.show', $tag->slug ?: $tag->name) }}" class="tag-link">#{{ $tag->name }}</a>
|
||||
<a href="{{ route('tags.show', $tag->name) }}" class="tag-link">#{{ $tag->name }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user