feat: Markdown 正文自动 TOC(锚点+折叠目录)+ 社交账号扩充国内平台(B站/小红书/抖音/视频号/公众号/其他)+ 侧边栏社交展示 + JSON-LD sameAs 全平台聚合 + 首页 h1(SEO 语义)

This commit is contained in:
ak
2026-08-11 23:49:19 +08:00
parent 489a145259
commit 56735804a1
26 changed files with 249 additions and 13 deletions
+1
View File
@@ -3,6 +3,7 @@
@include('partials.header')
<div id="page">
<main id="content">
<h1 class="sr-only">{{ $siteName }}</h1>
@if(session('success'))
<div class="alert alert-success">{{ session('success') }}</div>
@endif
@@ -62,6 +62,19 @@
</ul>
</section>
<section class="widget">
<h3>社交账号</h3>
<ul class="social-links">
@foreach($socialLinks as $social)
@if($social['url'])
<li><a href="{{ $social['url'] }}" target="_blank" rel="noopener nofollow">{{ $social['platform'] }}</a></li>
@else
<li>{{ $social['platform'] }}{{ $social['value'] }}</li>
@endif
@endforeach
</ul>
</section>
<section class="widget">
<h3>统计</h3>
<ul>
+14
View File
@@ -16,6 +16,20 @@
@endif
<article class="post-full">
@if(! empty($toc))
<nav class="toc" aria-label="文章目录">
<details open>
<summary>目录</summary>
<ol class="toc-list">
@foreach($toc as $item)
<li class="toc-level-{{ $item['level'] }}">
<a href="#{{ $item['id'] }}">{{ $item['text'] }}</a>
</li>
@endforeach
</ol>
</details>
</nav>
@endif
@if($cover = $post->getFirstMedia('cover'))
<div class="post-cover"><img src="{{ $cover->getUrl('card') ?: $cover->getUrl() }}" alt="{{ $post->title }}"></div>
@endif