diff --git a/Cargo.toml b/Cargo.toml
index 19ce3b7..01296d2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ailog"
-version = "0.3.1"
+version = "0.3.2"
edition = "2021"
authors = ["syui"]
description = "A static blog generator with AI features"
diff --git a/my-blog/layouts/at-browser-assets.html b/my-blog/layouts/at-browser-assets.html
new file mode 100644
index 0000000..3dbd52f
--- /dev/null
+++ b/my-blog/layouts/at-browser-assets.html
@@ -0,0 +1,61 @@
+
+
+
+
\ No newline at end of file
diff --git a/my-blog/layouts/base.html b/my-blog/layouts/base.html
new file mode 100644
index 0000000..82b8523
--- /dev/null
+++ b/my-blog/layouts/base.html
@@ -0,0 +1,152 @@
+
+
+
+
+
+ {% block title %}{{ config.title }}{% endblock %}
+
+
+
+
+
+
+
+
+
+
+
+
+ {% block head %}{% endblock %}
+
+
+
+
+
+
+
+
+
+
+ {% include "pds-header.html" %}
+
+ {% block content %}{% endblock %}
+
+
+ {% block sidebar %}{% endblock %}
+
+
+
+
+ © {{ config.author }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {% include "oauth-assets.html" %}
+ {% include "at-browser-assets.html" %}
+
+
diff --git a/my-blog/layouts/game.html b/my-blog/layouts/game.html
new file mode 100644
index 0000000..69d04f8
--- /dev/null
+++ b/my-blog/layouts/game.html
@@ -0,0 +1,135 @@
+{% extends "base.html" %}
+
+{% block title %}Game - {{ config.title }}{% endblock %}
+
+{% block content %}
+
+
+
Login to Play
+
Please authenticate with your AT Protocol account to access the game.
+
+
+
+
+
+
+
+
+
+
+
+
+{% include "oauth-assets.html" %}
+{% endblock %}
\ No newline at end of file
diff --git a/my-blog/layouts/index.html b/my-blog/layouts/index.html
new file mode 100644
index 0000000..b5370ce
--- /dev/null
+++ b/my-blog/layouts/index.html
@@ -0,0 +1,45 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+
+
+ {% for post in posts %}
+
+
+
+
+
+ {% endfor %}
+
+
+
+
+
+ {% if posts|length == 0 %}
+
+
No posts yet. Start writing!
+
+ {% endif %}
+
+{% endblock %}
diff --git a/my-blog/layouts/oauth-assets.html b/my-blog/layouts/oauth-assets.html
new file mode 100644
index 0000000..e9cf8c1
--- /dev/null
+++ b/my-blog/layouts/oauth-assets.html
@@ -0,0 +1,3 @@
+
+
+
diff --git a/my-blog/layouts/partials/oauth-widget.html b/my-blog/layouts/partials/oauth-widget.html
new file mode 100644
index 0000000..ccf30d6
--- /dev/null
+++ b/my-blog/layouts/partials/oauth-widget.html
@@ -0,0 +1,71 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/my-blog/layouts/pds-header.html b/my-blog/layouts/pds-header.html
new file mode 100644
index 0000000..df001a0
--- /dev/null
+++ b/my-blog/layouts/pds-header.html
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+ PDS:
+
+
+ Handle:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/my-blog/layouts/pds.html b/my-blog/layouts/pds.html
new file mode 100644
index 0000000..0e06f69
--- /dev/null
+++ b/my-blog/layouts/pds.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+
+{% block title %}at-uri browser - {{ config.title }}{% endblock %}
+
+{% block content %}
+{% endblock %}
diff --git a/my-blog/layouts/post-complex.html b/my-blog/layouts/post-complex.html
new file mode 100644
index 0000000..90e3624
--- /dev/null
+++ b/my-blog/layouts/post-complex.html
@@ -0,0 +1,373 @@
+{% extends "base.html" %}
+
+{% block title %}{{ post.title }} - {{ config.title }}{% endblock %}
+
+{% block content %}
+
+
+
+ {{ post.title }}
+
+ {{ post.date }}
+ {% if post.language %}
+ {{ post.language }}
+ {% endif %}
+
+
+ {% if post.markdown_url %}
+
+ .md
+
+ {% endif %}
+ {% if post.translation_url %}
+
+ 🌐 {% if post.language == 'ja' %}English{% else %}日本語{% endif %}
+
+ {% endif %}
+
+
+
+
+ {{ post.content | safe }}
+
+
+
+
+
+
+
+
+{% endblock %}
+
+{% block sidebar %}
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/my-blog/layouts/post-simple.html b/my-blog/layouts/post-simple.html
new file mode 100644
index 0000000..b2f29c4
--- /dev/null
+++ b/my-blog/layouts/post-simple.html
@@ -0,0 +1,196 @@
+{% extends "base.html" %}
+
+{% block title %}{{ post.title }} - {{ config.title }}{% endblock %}
+
+{% block content %}
+
+
+
+ {{ post.title }}
+
+ {{ post.date }}
+ {% if post.language %}
+ {{ post.language }}
+ {% endif %}
+
+
+ {% if post.markdown_url %}
+
+ .md
+
+ {% endif %}
+ {% if post.translation_url %}
+
+ 🌐 {% if post.language == 'ja' %}English{% else %}日本語{% endif %}
+
+ {% endif %}
+
+
+
+
+ {{ post.content | safe }}
+
+
+
+
+
+
+
+
+{% endblock %}
+
+{% block sidebar %}
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/my-blog/layouts/post.html b/my-blog/layouts/post.html
new file mode 100644
index 0000000..fd25a5a
--- /dev/null
+++ b/my-blog/layouts/post.html
@@ -0,0 +1,106 @@
+{% extends "base.html" %}
+
+{% block title %}{{ post.title }} - {{ config.title }}{% endblock %}
+
+{% block content %}
+
+
+
+ {{ post.title }}
+
+ {{ post.date }}
+ {% if post.language %}
+ {{ post.language }}
+ {% endif %}
+ {% if post.extra.type == "ai" %}
+
+
+ ai
+
+ {% endif %}
+
+ {% if not post.extra.type or post.extra.type != "ai" %}
+
+ {% if post.markdown_url %}
+
+ .md
+
+ {% endif %}
+ {% if post.translation_url %}
+
+ 🌐 {% if post.language == 'ja' %}English{% else %}日本語{% endif %}
+
+ {% endif %}
+
+ {% endif %}
+
+
+ {% if not post.extra.type or post.extra.type != "ai" %}
+
+ Contents
+
+
+
+
+
+
+ {{ post.content | safe }}
+
+ {% endif %}
+
+
+
+
+
+
+
+{% endblock %}
+
+{% block sidebar %}
+{% endblock %}
\ No newline at end of file
diff --git a/my-blog/templates/index.html b/my-blog/templates/index.html
index 2ba6f82..370ae40 100644
--- a/my-blog/templates/index.html
+++ b/my-blog/templates/index.html
@@ -12,6 +12,12 @@
{% if post.language %}
{{ post.language }}
{% endif %}
+ {% if post.extra and post.extra.type == "ai" %}
+
+
+ ai
+
+ {% endif %}
diff --git a/my-blog/templates/post.html b/my-blog/templates/post.html
index b1298d1..fd25a5a 100644
--- a/my-blog/templates/post.html
+++ b/my-blog/templates/post.html
@@ -12,6 +12,12 @@
{% if post.language %}
{{ post.language }}
{% endif %}
+ {% if post.extra.type == "ai" %}
+
+
+ ai
+
+ {% endif %}
{% if not post.extra.type or post.extra.type != "ai" %}
diff --git a/oauth/package.json b/oauth/package.json
index 37c9a52..a6507b9 100644
--- a/oauth/package.json
+++ b/oauth/package.json
@@ -1,6 +1,6 @@
{
"name": "ailog-oauth",
- "version": "0.3.1",
+ "version": "0.3.2",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/pds/package.json b/pds/package.json
index 16a04be..199adbc 100644
--- a/pds/package.json
+++ b/pds/package.json
@@ -1,6 +1,6 @@
{
"name": "pds-browser",
- "version": "0.3.1",
+ "version": "0.3.2",
"description": "AT Protocol browser for ai.log",
"main": "index.js",
"type": "module",
diff --git a/src/generator.rs b/src/generator.rs
index d2006c6..fdb2b35 100644
--- a/src/generator.rs
+++ b/src/generator.rs
@@ -302,7 +302,8 @@ impl Generator {
"excerpt": excerpt,
"markdown_url": markdown_url,
"translation_url": translation_url,
- "language": self.config.site.language
+ "language": self.config.site.language,
+ "extra": post.extra
})
}).collect();