feat(v1.2.6): 合并审核整改、确认完全原创并完善可选 API 披露

版本升至 1.2.6(1.2.5 审核被拒未发布,整改内容并入本版);README 新增原创声明(4.2.1/4.2.2 不适用);Hero 描述来源默认 none,选一言自动填入官方接口、清空回退本地句子库;文档列出两个 IP 定位候选接口与访客 IP 披露文案;含上一轮 4.4.2 内容渲染安全与 5.2 字体许可证修复。
This commit is contained in:
nxxy335 committed 2026-11-11 16:09:31 +08:00
1 parent dda86294b0
commit c92429d139
18 files changed
+485 -63

No files matched your search

+2 -1
View File
@@ -20,7 +20,8 @@ const pageConfig = findPageBySlug("moments");
th:each="moment : ${momentsResult.items}"
>
<div class="wi-moments-section__dot" th:if="${theme.config?.moments?.moments_style != 'cards'}"></div>
<div class="wi-moments-section__content" th:utext="${moment.spec?.content?.html ?: moment.spec?.content?.raw ?: moment.spec?.content}"></div>
<div class="wi-moments-section__content" th:if="${moment.spec?.content?.html}" th:utext="${moment.spec.content.html}"></div>
<div class="wi-moments-section__content" th:unless="${moment.spec?.content?.html}" th:text="${moment.spec?.content?.raw ?: ''}"></div>
<time
class="wi-moments-section__date"
th:text="${#dates.format(moment.spec?.releaseTime ?: moment.metadata?.creationTimestamp, 'yyyy-MM-dd HH:mm')}"
+2 -1
View File
@@ -59,7 +59,8 @@ import LightGallery from "../components/LightGallery.astro";
></time>
</div>
<div class="wi-moment-detail__text" th:utext="${detailContent?.html ?: detailContent?.raw ?: ''}"></div>
<div class="wi-moment-detail__text" th:if="${detailContent?.html}" th:utext="${detailContent.html}"></div>
<div class="wi-moment-detail__text" th:unless="${detailContent?.html}" th:text="${detailContent?.raw ?: ''}"></div>
<div
class="wi-moment-detail__media wi-moments-page__card-media"
+4 -2
View File
@@ -53,7 +53,8 @@ import LightGallery from "../components/LightGallery.astro";
class="wi-moments-page__name"
th:text="${moment.owner != null and !#strings.isEmpty(moment.owner.displayName) ? moment.owner.displayName : site.title}"
></div>
<div class="wi-moments-page__card-text" th:utext="${moment.spec?.content?.html ?: moment.spec?.content?.raw ?: moment.spec?.content}"></div>
<div class="wi-moments-page__card-text" th:if="${moment.spec?.content?.html}" th:utext="${moment.spec.content.html}"></div>
<div class="wi-moments-page__card-text" th:unless="${moment.spec?.content?.html}" th:text="${moment.spec?.content?.raw ?: ''}"></div>
<div class="wi-moments-page__card-media" th:if="${moment.spec.content.medium != null and !#lists.isEmpty(moment.spec.content.medium)}">
<th:block th:each="media : ${moment.spec.content.medium}">
<img
@@ -111,7 +112,8 @@ import LightGallery from "../components/LightGallery.astro";
<div class="wi-moments-page__masonry" th:if="${theme.config?.moments?.moments_style == 'masonry'}">
<th:block th:if="${momentsResult != null and not #lists.isEmpty(momentsResult.items)}">
<div class="wi-moments-page__masonry-item" th:each="moment : ${momentsResult.items}">
<div class="wi-moments-page__masonry-text" th:utext="${moment.spec?.content?.html ?: moment.spec?.content?.raw ?: moment.spec?.content}"></div>
<div class="wi-moments-page__masonry-text" th:if="${moment.spec?.content?.html}" th:utext="${moment.spec.content.html}"></div>
<div class="wi-moments-page__masonry-text" th:unless="${moment.spec?.content?.html}" th:text="${moment.spec?.content?.raw ?: ''}"></div>
<div class="wi-moments-page__masonry-media" th:if="${moment.spec.content.medium != null and !#lists.isEmpty(moment.spec.content.medium)}">
<th:block th:each="media : ${moment.spec.content.medium}">
<img
+31 -10
View File
@@ -18,22 +18,43 @@ import LightGallery from "../components/LightGallery.astro";
<meta th:if="${post.spec.cover}" name="twitter:image" th:content="${post.spec.cover}" />
<meta th:if="${post.status.excerpt}" name="twitter:description" th:content="${post.status.excerpt}" />
<meta property="article:published_time" th:content="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}" />
<meta name="author" th:content="${post.contributors != null and !post.contributors.isEmpty() ? post.contributors[0].displayName : site.title}" />
<th:block th:if="${post.categories != null and !post.categories.isEmpty()}">
<meta property="article:section" th:content="${post.categories[0].spec.displayName}" />
</th:block>
<th:block th:if="${post.tags != null and !post.tags.isEmpty()}">
<meta th:each="tag : ${post.tags}" property="article:tag" th:content="${tag.spec.displayName}" />
</th:block>
<script type="application/ld+json" th:utext="${'{
&quot;@context&quot;: &quot;https://schema.org&quot;,
&quot;@type&quot;: &quot;Article&quot;,
&quot;headline&quot;: &quot;' + post.spec.title + '&quot;,
&quot;datePublished&quot;: &quot;' + #dates.format(post.spec.publishTime, &quot;yyyy-MM-dd&quot;) + '&quot;,
&quot;author&quot;: {
&quot;@type&quot;: &quot;Person&quot;,
&quot;name&quot;: &quot;' + (post.contributors != null and !post.contributors.isEmpty() ? post.contributors[0].displayName : site.title) + '&quot;
}' + (!#strings.isEmpty(post.spec.cover) ? ', &quot;image&quot;: &quot;' + post.spec.cover + '&quot;' : '') + (!#strings.isEmpty(post.status.excerpt) ? ', &quot;description&quot;: &quot;' + #strings.replace(post.status.excerpt, '&quot;', '\\&quot;') + '&quot;' : '') + '
}'}"></script>
<!-- 4.4.2:结构化数据不再由模板拼接站点内容后以 th:utext 写进脚本文本。
文章标题、摘要、作者、封面等字段先由 Thymeleaf 转义输出到 <meta>,
再由 JSON.stringify + textContent 生成合法 JSON-LD;即使内容里含有
脚本闭合标签,也只会被当作普通文本,不会被浏览器解析执行。 -->
<script type="application/ld+json" id="wi-article-jsonld"></script>
<script is:inline th:inline="none">
(function () {
function meta(selector) {
var el = document.querySelector(selector);
return el ? el.getAttribute("content") : null;
}
var data = {
"@context": "https://schema.org",
"@type": "Article",
headline: meta('meta[property="og:title"]') || document.title,
datePublished: meta('meta[property="article:published_time"]'),
author: {
"@type": "Person",
name: meta('meta[name="author"]') || meta('meta[property="og:site_name"]') || ""
},
mainEntityOfPage: meta('meta[property="og:url"]')
};
var image = meta('meta[property="og:image"]');
var description = meta('meta[property="og:description"]');
if (image) data.image = image;
if (description) data.description = description;
var target = document.getElementById("wi-article-jsonld");
if (target) target.textContent = JSON.stringify(data);
})();
</script>
</Fragment>
<div class="wi-reading-progress" id="wi-reading-progress"></div>