Skip to content

Commit badf204

Browse files
ozakboyclaude
andauthored
修自訂網域 ozalog.ozakboy.life 跑版:baseURL 改為 / (#2)
自訂網域從根目錄提供網站,原本為 GitHub Pages project site 設定的 /OzaLog/ baseURL 導致所有 _nuxt 資產與 logo 404。一併新增 public/CNAME 固定網域、更新 og/canonical/sitemap/robots/JSON-LD 絕對網址。 https://claude.ai/code/session_01PhQ8fXBEt722Qpj6ii1Sbu Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2abfecc commit badf204

5 files changed

Lines changed: 18 additions & 16 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ site/.output/
255255
site/.data/
256256
site/.cache/
257257
site/dist/
258+
site/dist
258259
site/.env
259260
site/.env.*
260261
site/*.log

site/app.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const jsonLd = {
1111
operatingSystem: 'Cross-platform (.NET Standard 2.0+, .NET 8/9/10)',
1212
description:
1313
'Lean .NET local file logging library with the simplest possible static API. HFT-grade async pipeline (ConcurrentQueue + persistent FileStream pool + cached timestamp + drop-oldest backpressure). Zero NuGet dependencies on net8.0/9.0/10.0. Designed for high-throughput multi-threaded scenarios like cryptocurrency tick streams.',
14-
url: 'https://ozakboy.github.io/OzaLog/',
14+
url: 'https://ozalog.ozakboy.life/',
1515
downloadUrl: 'https://www.nuget.org/packages/OzaLog/',
16-
image: 'https://ozakboy.github.io/OzaLog/logo.png',
16+
image: 'https://ozalog.ozakboy.life/logo.png',
1717
author: {
1818
'@type': 'Person',
1919
name: 'ozakboy',

site/nuxt.config.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ export default defineNuxtConfig({
44
devtools: { enabled: true },
55

66
// Nuxt site config (used by sitemap module to prepend absolute URL)
7-
// 注意:url 只能放 domain,baseURL 在 app.baseURL 處理(GitHub Pages project site 規則)
7+
// 已綁定自訂網域 ozalog.ozakboy.life,網站從根目錄 / 提供,故 baseURL 為 '/'
88
site: {
9-
url: 'https://ozakboy.github.io',
9+
url: 'https://ozalog.ozakboy.life',
1010
name: 'OzaLog',
1111
description:
1212
'Lean .NET local file logging library with the simplest possible static API. HFT-grade async pipeline, zero NuGet dependencies on net8+. Designed for high-throughput multi-threaded scenarios like cryptocurrency tick streams.',
1313
},
1414

1515
app: {
16-
baseURL: '/OzaLog/',
16+
baseURL: '/',
1717
head: {
1818
title: 'OzaLog — Lean .NET Local File Logger',
1919
htmlAttrs: { lang: 'zh-TW' },
@@ -48,8 +48,8 @@ export default defineNuxtConfig({
4848
content:
4949
'Simplest possible static API. HFT-grade async pipeline. Zero NuGet deps on net8+. Designed for crypto tick stream scenarios.',
5050
},
51-
{ property: 'og:url', content: 'https://ozakboy.github.io/OzaLog/' },
52-
{ property: 'og:image', content: 'https://ozakboy.github.io/OzaLog/logo.png' },
51+
{ property: 'og:url', content: 'https://ozalog.ozakboy.life/' },
52+
{ property: 'og:image', content: 'https://ozalog.ozakboy.life/logo.png' },
5353
{ property: 'og:image:alt', content: 'OzaLog logo' },
5454
{ property: 'og:locale', content: 'zh_TW' },
5555
{ property: 'og:locale:alternate', content: 'en_US' },
@@ -62,12 +62,12 @@ export default defineNuxtConfig({
6262
content:
6363
'Simplest possible static API. HFT-grade async pipeline. Zero NuGet deps on net8+.',
6464
},
65-
{ name: 'twitter:image', content: 'https://ozakboy.github.io/OzaLog/logo.png' },
65+
{ name: 'twitter:image', content: 'https://ozalog.ozakboy.life/logo.png' },
6666
],
6767
link: [
68-
{ rel: 'icon', type: 'image/png', href: '/OzaLog/logo.png' },
69-
{ rel: 'apple-touch-icon', href: '/OzaLog/logo.png' },
70-
{ rel: 'canonical', href: 'https://ozakboy.github.io/OzaLog/' },
68+
{ rel: 'icon', type: 'image/png', href: '/logo.png' },
69+
{ rel: 'apple-touch-icon', href: '/logo.png' },
70+
{ rel: 'canonical', href: 'https://ozalog.ozakboy.life/' },
7171
],
7272
},
7373
},
@@ -77,7 +77,7 @@ export default defineNuxtConfig({
7777
'@nuxtjs/tailwindcss',
7878
'@nuxt/content',
7979
'@nuxtjs/sitemap',
80-
// @nuxtjs/robots 不適用(Project Pages baseURL 與 robots.txt root 衝突),
80+
// @nuxtjs/robots 不適用(baseURL 與 robots.txt root 衝突),
8181
// 改用 site/public/robots.txt 靜態檔
8282
],
8383

@@ -94,7 +94,7 @@ export default defineNuxtConfig({
9494
},
9595

9696
i18n: {
97-
baseUrl: 'https://ozakboy.github.io',
97+
baseUrl: 'https://ozalog.ozakboy.life',
9898
locales: [
9999
{ code: 'zh-TW', name: '繁體中文', file: 'zh-TW.json' },
100100
{ code: 'en', name: 'English', file: 'en.json' },
@@ -109,7 +109,7 @@ export default defineNuxtConfig({
109109
},
110110
},
111111

112-
// Sitemap: 自動產 sitemap.xml,部署後位於 https://ozakboy.github.io/OzaLog/sitemap.xml
112+
// Sitemap: 自動產 sitemap.xml,部署後位於 https://ozalog.ozakboy.life/sitemap.xml
113113
// 自動掃描 pages/ 內路由 + i18n locale 變體
114114
sitemap: {
115115
autoLastmod: true,

site/public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ozalog.ozakboy.life

site/public/robots.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# OzaLog — robots.txt
2-
# https://ozakboy.github.io/OzaLog/
2+
# https://ozalog.ozakboy.life/
33

44
User-agent: *
55
Allow: /
66

77
# Sitemap (auto-generated by @nuxtjs/sitemap on each build)
8-
Sitemap: https://ozakboy.github.io/OzaLog/sitemap.xml
8+
Sitemap: https://ozalog.ozakboy.life/sitemap.xml

0 commit comments

Comments
 (0)