From 9f2fb3bda733c32995c008bd0f40365e43c348da Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Sat, 22 Aug 2026 00:18:56 +0900 Subject: feat: Zolaで「たかしの記録」を構築 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specifications.mdとDesign.mdを実装の基準として、個人アーカイブサイトをZola 0.23.3向けに構築する。 - Home、Notes、Software、About、Tagsの情報設計と専用URLを追加 - Notesの年別アーカイブ、タグ分類、目次、脚注、参考文献、更新日表示を実装 - Softwareの一覧・詳細、cgit/GitHub情報、Notesとの明示的な相互参照を実装 - Tera 2 componentによる再帰TOCと共通partialsを追加 - Minimal Editorial ArchiveのSCSS、レスポンシブ表示、アクセシビリティ対応を追加 - OS設定とlocalStorageに対応するLight/Darkテーマ切替を外部JavaScriptで実装 - Atom/RSS、sitemap、robots.txt、404、favicon、syntax highlightingを設定 - メールアドレスをzola.tomlへ一元化し、AboutとFooterから参照 - 表示名・内部ディレクトリ・変数・URLをSoftware/softwareへ統一 - public/をGit管理対象外とし、外部CDNやNode.js依存を導入しない - zola checkおよびzola buildの成功を確認 --- templates/404.html | 17 ++++++++ templates/base.html | 26 +++++++++++++ templates/index.html | 62 ++++++++++++++++++++++++++++++ templates/notes/page.html | 31 +++++++++++++++ templates/notes/section.html | 31 +++++++++++++++ templates/page.html | 15 ++++++++ templates/partials/footer.html | 10 +++++ templates/partials/header.html | 19 +++++++++ templates/partials/note-list-item.html | 14 +++++++ templates/partials/related-notes.html | 11 ++++++ templates/partials/related-software.html | 11 ++++++ templates/partials/software-list-item.html | 4 ++ templates/partials/toc.html | 10 +++++ templates/software/page.html | 27 +++++++++++++ templates/software/section.html | 24 ++++++++++++ templates/tags/list.html | 18 +++++++++ templates/tags/single.html | 20 ++++++++++ 17 files changed, 350 insertions(+) create mode 100644 templates/404.html create mode 100644 templates/base.html create mode 100644 templates/index.html create mode 100644 templates/notes/page.html create mode 100644 templates/notes/section.html create mode 100644 templates/page.html create mode 100644 templates/partials/footer.html create mode 100644 templates/partials/header.html create mode 100644 templates/partials/note-list-item.html create mode 100644 templates/partials/related-notes.html create mode 100644 templates/partials/related-software.html create mode 100644 templates/partials/software-list-item.html create mode 100644 templates/partials/toc.html create mode 100644 templates/software/page.html create mode 100644 templates/software/section.html create mode 100644 templates/tags/list.html create mode 100644 templates/tags/single.html (limited to 'templates') diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..408e222 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %}404 | {{ config.title }}{% endblock title %} +{% block description %}ページが見つかりませんでした。{% endblock description %} + +{% block content %} +
+

404

+

ページが見つかりません。

+

URLが変更されたか、ページが存在しない可能性があります。

+ +
+{% endblock content %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..543259a --- /dev/null +++ b/templates/base.html @@ -0,0 +1,26 @@ + + + + + + + + {% block title %}{{ config.title }}{% endblock title %} + + + + + + + + + + + + {% include "partials/header.html" %} +
+ {% block content %}{% endblock content %} +
+ {% include "partials/footer.html" %} + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..3f0c8c6 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,62 @@ +{% extends "base.html" %} + +{% block title %}{{ config.title }}{% endblock title %} +{% block description %}{{ section.description }}{% endblock description %} + +{% block content %} +{% set about_url = get_url(path='@/about.md') %} +{% set notes_url = get_url(path='@/notes/_index.md') %} +{% set software_url = get_url(path='@/software/_index.md') %} +{% set software = get_section(path='software/_index.md') %} +{% set notes = get_section(path='notes/_index.md') %} +
+

{{ section.title }}

+

{{ section.description }}

+
+ +
+
+
+

最近のNotes

+ すべてのNotes +
+ {% if notes.pages %} +
+ {% for note in notes.pages %} + {% if loop.index <= config.extra.home_notes_limit %} + {% set item = note %} + {% include "partials/note-list-item.html" %} + {% endif %} + {% endfor %} +
+ {% else %} +

ノートは準備中です。新しい記録はここに追加されます。

+ {% endif %} +
+ +
+
+

Software

+ すべてのSoftware +
+ {% if software.pages %} +
+ {% for software_item in software.pages %} + {% if loop.index <= config.extra.home_software_limit %} + {% set item = software_item %} + {% include "partials/software-list-item.html" %} + {% endif %} + {% endfor %} +
+ {% else %} +

Softwareは準備中です。

+ {% endif %} +
+ +
+

このサイトについて

+

考えたこと、読んだこと、調べたことと、作成したソフトウェアを長期的に残すための個人アーカイブです。

+ Aboutを読む +
+
+{% endblock content %} diff --git a/templates/notes/page.html b/templates/notes/page.html new file mode 100644 index 0000000..bcabff8 --- /dev/null +++ b/templates/notes/page.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %} +{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %} + +{% block content %} +
+
+

Notes

+

{{ page.title }}

+ + {% if page.description %}

{{ page.description }}

{% endif %} +
+ + {% if page.toc %} + + {% endif %} + +
+ {{ page.content | safe }} +
+ + {% include "partials/related-software.html" %} +
+{% endblock content %} diff --git a/templates/notes/section.html b/templates/notes/section.html new file mode 100644 index 0000000..4fc2675 --- /dev/null +++ b/templates/notes/section.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block title %}{{ section.title }} | {{ config.title }}{% endblock title %} +{% block description %}{{ section.description }}{% endblock description %} + +{% block content %} +
+ + + {% if section.pages %} +
+ {% for year, pages in section.pages | group_by(attribute="year") %} +
+

{{ year }}

+
+ {% for note in pages %} + {% set item = note %} + {% include "partials/note-list-item.html" %} + {% endfor %} +
+
+ {% endfor %} +
+ {% else %} +

Notesはまだありません。

+ {% endif %} +
+{% endblock content %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..cc0494e --- /dev/null +++ b/templates/page.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %} +{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %} + +{% block content %} +
+ +
+ {{ page.content | safe }} +
+
+{% endblock content %} diff --git a/templates/partials/footer.html b/templates/partials/footer.html new file mode 100644 index 0000000..a04136f --- /dev/null +++ b/templates/partials/footer.html @@ -0,0 +1,10 @@ + diff --git a/templates/partials/header.html b/templates/partials/header.html new file mode 100644 index 0000000..dcd4ea2 --- /dev/null +++ b/templates/partials/header.html @@ -0,0 +1,19 @@ +{% set home_url = get_url(path='@/_index.md') %} +{% set about_url = get_url(path='@/about.md') %} +{% set software_url = get_url(path='@/software/_index.md') %} +{% set notes_url = get_url(path='@/notes/_index.md') %} +{% set active_path = current_path | default(value='') %} + diff --git a/templates/partials/note-list-item.html b/templates/partials/note-list-item.html new file mode 100644 index 0000000..67ca8f7 --- /dev/null +++ b/templates/partials/note-list-item.html @@ -0,0 +1,14 @@ +
+ +
+

{{ item.title }}

+ {% if item.description %}

{{ item.description }}

{% endif %} + {% if item.taxonomies.tags %} +
    + {% for tag in item.taxonomies.tags %} +
  • {{ tag }}
  • + {% endfor %} +
+ {% endif %} +
+
diff --git a/templates/partials/related-notes.html b/templates/partials/related-notes.html new file mode 100644 index 0000000..59cca8b --- /dev/null +++ b/templates/partials/related-notes.html @@ -0,0 +1,11 @@ +{% if page.extra.related_notes %} + +{% endif %} diff --git a/templates/partials/related-software.html b/templates/partials/related-software.html new file mode 100644 index 0000000..a29df4f --- /dev/null +++ b/templates/partials/related-software.html @@ -0,0 +1,11 @@ +{% if page.extra.related_software %} + +{% endif %} diff --git a/templates/partials/software-list-item.html b/templates/partials/software-list-item.html new file mode 100644 index 0000000..e6c970e --- /dev/null +++ b/templates/partials/software-list-item.html @@ -0,0 +1,4 @@ +
+

{{ item.title }}

+ {% if item.description %}

{{ item.description }}

{% endif %} +
diff --git a/templates/partials/toc.html b/templates/partials/toc.html new file mode 100644 index 0000000..2089d15 --- /dev/null +++ b/templates/partials/toc.html @@ -0,0 +1,10 @@ +{% component toc.render(headers: array) %} + +{% endcomponent toc.render %} diff --git a/templates/software/page.html b/templates/software/page.html new file mode 100644 index 0000000..513aee9 --- /dev/null +++ b/templates/software/page.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %} +{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %} + +{% block content %} +
+
+

Software

+

{{ page.title }}

+ {% if page.description %}

{{ page.description }}

{% endif %} +
+ +
+ {% if page.extra.language %}
使用言語
{{ page.extra.language | join(sep=", ") }}
{% endif %} + {% if page.extra.license %}
ライセンス
{{ page.extra.license }}
{% endif %} +
Source
cgit
+ {% if page.extra.github_mirror %}
Mirror
GitHub
{% endif %} +
+ +
+ {{ page.content | safe }} +
+ + {% include "partials/related-notes.html" %} +
+{% endblock content %} diff --git a/templates/software/section.html b/templates/software/section.html new file mode 100644 index 0000000..813f793 --- /dev/null +++ b/templates/software/section.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block title %}{{ section.title }} | {{ config.title }}{% endblock title %} +{% block description %}{{ section.description }}{% endblock description %} + +{% block content %} +
+ + {% if section.pages %} +
+ {% for software_item in section.pages %} + {% set item = software_item %} + {% include "partials/software-list-item.html" %} + {% endfor %} +
+ {% else %} +

Softwareはまだありません。

+ {% endif %} +

ソースコードの正本は各Softwareから自前cgitへ案内します。

+
+{% endblock content %} diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..6567506 --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %}タグ | {{ config.title }}{% endblock title %} +{% block description %}Notesを分類するタグの一覧。{% endblock description %} + +{% block content %} +
+ + +
+{% endblock content %} diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..2ec6fa1 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block title %}{{ term.name }} | タグ | {{ config.title }}{% endblock title %} +{% block description %}タグ「{{ term.name }}」の記事一覧。{% endblock description %} + +{% block content %} +
+ +
+ {% for page in term.pages %} + {% set item = page %} + {% include "partials/note-list-item.html" %} + {% endfor %} +
+
+{% endblock content %} -- cgit v1.2.3