Pi66

git.pi66.xyz
A web interface for the pi66.xyz Git server
git clone https://git.pi66.xyz/git.pi66.xyz

← back to log

add: page_title and metadata_content to all pages

author: pi66
date: 2026-07-21 21:50
hash: 27fa6d2b5f3e0264c83a28b5525faa4b72daca4a

Diffstat:

M

build/plugins/file_builder.py
4 ++++++++++++++++++++++++++++++

M

build/plugins/license_builder.py
2 +++++++++++++++

M

build/plugins/log_builder.py
4 ++++++++++++++++++++++++++++++

M

build/plugins/readme_builder.py
2 +++++++++++++++

M

build/plugins/ref_builder.py
2 +++++++++++++++

M

build/templates/partials/head.html
4 +++++++++++++++---------------

M

md/404.md
2 +++++++++++++++

M

md/index.md
1 ++++++++
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
diff --git a/build/plugins/file_builder.py b/build/plugins/file_builder.py
index e561dee..1efcf4b 100644
--- a/build/plugins/file_builder.py
+++ b/build/plugins/file_builder.py
@@ -33,6 +33,8 @@ def _create_file_preview_page(api, repo_name, repo_desc, git_path, file):
     html = api.jinja_handler(api.config, '{% extends "File-preview.html" %}', plugins={
         "repo_name": repo_name,
         "repo_desc": repo_desc,
+        "page_title": f"Pi66 - {repo_name} - {file.path}",
+        "metadata_content": repo_desc or "A web interface for the pi66.xyz Git server",
         "file_name": file.path,
         "file_content": content,
     })
@@ -52,6 +54,8 @@ def create_file_pages(api, repos: list[Repo], git_dir):
             html = api.jinja_handler(api.config, '{% extends "Files.html" %}', plugins={
                 "repo_name": repo.name,
                 "repo_desc": repo.desc,
+                "page_title": f"Pi66 - {repo.name} - Files",
+                "metadata_content": repo.desc or "A web interface for the pi66.xyz Git server",
                 "files": repo.files,
             })

diff --git a/build/plugins/license_builder.py b/build/plugins/license_builder.py
index 2f1a5ac..47c6f25 100644
--- a/build/plugins/license_builder.py
+++ b/build/plugins/license_builder.py
@@ -11,6 +11,8 @@ def create_license_pages(api, repos: list[Repo]):
             html = api.jinja_handler(api.config, '{% extends "License.html" %}', plugins={
                 "repo_name": repo.name,
                 "repo_desc": repo.desc,
+                "page_title": f"Pi66 - {repo.name} - License",
+                "metadata_content": repo.desc or "A web interface for the pi66.xyz Git server",
                 "license_content": repo.license if repo.license else "No license file found.",
             })

diff --git a/build/plugins/log_builder.py b/build/plugins/log_builder.py
index ad12a96..5136413 100644
--- a/build/plugins/log_builder.py
+++ b/build/plugins/log_builder.py
@@ -29,6 +29,8 @@ def _create_commit_page(api, repo_name, repo_desc, commit):
     html = api.jinja_handler(api.config, '{% extends "Log-commit.html" %}', plugins={
         "repo_name": repo_name,
         "repo_desc": repo_desc,
+        "page_title": f"Pi66 - {repo_name} - {commit.message}",
+        "metadata_content": repo_desc or "A web interface for the pi66.xyz Git server",
         "commit_date": commit.date,
         "commit_hash": commit.commit_hash,
         "commit_message": commit.message,
@@ -51,6 +53,8 @@ def create_log_pages(api, repos: list[Repo]):
             html = api.jinja_handler(api.config, '{% extends "Log.html" %}', plugins={
                 "repo_name": repo.name,
                 "repo_desc": repo.desc,
+                "page_title": f"Pi66 - {repo.name} - Log",
+                "metadata_content": repo.desc or "A web interface for the pi66.xyz Git server",
                 "commits": repo.commits,
                 "total_added": _total_added_lines,
                 "total_removed": _total_removed_lines,
diff --git a/build/plugins/readme_builder.py b/build/plugins/readme_builder.py
index 4f3399f..fbe4db5 100644
--- a/build/plugins/readme_builder.py
+++ b/build/plugins/readme_builder.py
@@ -13,6 +13,8 @@ def create_readme_pages(api, repos: list[Repo]):
             html = api.jinja_handler(api.config, '{% extends "Readme.html" %}', plugins={
                 "repo_name": repo.name,
                 "repo_desc": repo.desc,
+                "page_title": f"Pi66 - {repo.name} - Readme",
+                "metadata_content": repo.desc or "A web interface for the pi66.xyz Git server",
                 "readme_content": content,
             })

diff --git a/build/plugins/ref_builder.py b/build/plugins/ref_builder.py
index e746030..3c94576 100644
--- a/build/plugins/ref_builder.py
+++ b/build/plugins/ref_builder.py
@@ -11,6 +11,8 @@ def create_ref_pages(api, repos: list[Repo]):
             html = api.jinja_handler(api.config, '{% extends "Refs.html" %}', plugins={
                 "repo_name": repo.name,
                 "repo_desc": repo.desc,
+                "page_title": f"Pi66 - {repo.name} - Refs",
+                "metadata_content": repo.desc or "A web interface for the pi66.xyz Git server",
                 "refs": repo.refs,
             })

diff --git a/build/templates/partials/head.html b/build/templates/partials/head.html
index 51a7ab3..08ee04f 100644
--- a/build/templates/partials/head.html
+++ b/build/templates/partials/head.html
@@ -3,10 +3,10 @@
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
-       <meta name="description" content="  Pixel's personal site showcasing Rust-based Linux tools, retro aesthetics, and open-source projects. ">
+       <meta name="description" content="{{ metadata_content | default('A web interface for the pi66.xyz Git server') }}">
        <meta name="author" content="Pi66">
        <meta name="theme-color" content="#000000">
-       <title>Pixel - Home</title>
+       <title>{{page_title | default('Pixel - Git')}}</title>
        <link rel="icon" href="/static/favicon.ico">
        <link rel="stylesheet" href="/static/css/style.css"/>
        <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser"></script>
diff --git a/md/404.md b/md/404.md
index 8b70cd1..49cc594 100644
--- a/md/404.md
+++ b/md/404.md
@@ -1,3 +1,5 @@
+{% set page_title = "Pi66 - 404" %}
+{% set metadata_content = "Page not found" %}
 {% set page_content %}

 <center markdown=1 class="my-20">
diff --git a/md/index.md b/md/index.md
index 445e371..2257b99 100644
--- a/md/index.md
+++ b/md/index.md
@@ -1,3 +1,4 @@
+{% set page_title = "Pixel - Git" %}
 {% set page_content %}

 #  **Repositories** [.!text-center .!text-2xl]