test ai-blog
This commit is contained in:
3
my-blog/templates/ai-conversation-assets.html
Normal file
3
my-blog/templates/ai-conversation-assets.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<!-- AI Conversation Display System -->
|
||||
<script type="module" crossorigin src="/ai-assets/comment-atproto-COOgkuRz.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/ai-assets/comment-atproto-CRtMnSCT.css">
|
@@ -116,6 +116,24 @@
|
||||
<script src="/js/theme.js"></script>
|
||||
<script src="/js/image-comparison.js"></script>
|
||||
|
||||
<!-- Mermaid support -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
|
||||
<script>
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: 'neutral',
|
||||
securityLevel: 'loose',
|
||||
themeVariables: {
|
||||
fontFamily: 'system-ui, -apple-system, sans-serif',
|
||||
fontSize: '14px'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{% include "oauth-assets.html" %}
|
||||
|
||||
{% if post.extra and post.extra.type == "ai" %}
|
||||
{% include "ai-conversation-assets.html" %}
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user