test ai-blog

This commit is contained in:
2025-07-15 17:32:20 +09:00
parent 75f108e7b8
commit 0110773592
73 changed files with 9000 additions and 30 deletions

View File

@@ -27,25 +27,43 @@
</div>
</header>
{% if not post.extra or not post.extra.type or post.extra.type != "ai" %}
<nav class="toc">
<h3>Contents</h3>
<div id="toc-content">
<!-- TOC will be generated by JavaScript -->
</div>
</nav>
{% endif %}
<div class="article-body">
{{ post.content | safe }}
{% if post.extra and post.extra.type == "ai" %}
<!-- AI Conversation Content (Markdown first) -->
{{ post.content | safe }}
{% elif not post.extra or not post.extra.type or post.extra.type != "ai" %}
{{ post.content | safe }}
{% endif %}
</div>
{% if not post.extra or not post.extra.type or post.extra.type != "ai" %}
<div id="comment-atproto"></div>
{% endif %}
</article>
</div>
{% if post.extra and post.extra.type == "ai" %}
<div id="ai-conversation-atproto"></div>
{% endif %}
<script>
// Generate table of contents
function generateTableOfContents() {
const tocContainer = document.getElementById('toc-content');
if (!tocContainer) {
// TOC container doesn't exist (e.g., AI conversation type posts)
return;
}
const headings = document.querySelectorAll('.article-body h1, .article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6');
if (headings.length === 0) {