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:
@@ -11,11 +11,11 @@
|
||||
<ul class="archive-list">
|
||||
@foreach($months as $month => $monthPosts)
|
||||
<li>
|
||||
<a href="{{ route('archives.month', [$year, $month]) }}">{{ (int) $month }} 月</a>
|
||||
<a href="{{ route('archives.month', $year.$month) }}">{{ (int) $month }} 月</a>
|
||||
<span class="count">({{ $monthPosts->count() }} 篇)</span>
|
||||
<ul class="archive-posts">
|
||||
@foreach($monthPosts as $post)
|
||||
<li><a href="{{ route('posts.show', $post->slug ?: $post->id) }}">{{ $post->title }}</a> <time>{{ $post->published_at->format(blog_setting('listtime', 'm-d')) }}</time></li>
|
||||
<li><a href="{{ route('posts.show', $post->id) }}">{{ $post->title }}</a> <time>{{ $post->published_at->format(blog_setting('listtime', 'm-d')) }}</time></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user