Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
J
jiayun
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuchentao
jiayun
Commits
c467d7b8
Commit
c467d7b8
authored
Aug 07, 2026
by
xuchentao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: use company logo for favicon
parent
b6426fcf
Pipeline
#464
passed with stage
in 20 seconds
Changes
4
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
53 deletions
+60
-53
favicon.svg
public/favicon.svg
+58
-0
site.webmanifest
public/site.webmanifest
+1
-1
Base.astro
src/layouts/Base.astro
+1
-2
favicon.ico.ts
src/pages/favicon.ico.ts
+0
-50
No files found.
public/favicon.svg
0 → 100644
View file @
c467d7b8
This diff is collapsed.
Click to expand it.
public/site.webmanifest
View file @
c467d7b8
...
@@ -8,6 +8,6 @@
...
@@ -8,6 +8,6 @@
"theme_color": "#ff7d41",
"theme_color": "#ff7d41",
"lang": "zh-CN",
"lang": "zh-CN",
"icons": [
"icons": [
{ "src": "/favicon.
ico", "sizes": "32x32", "type": "image/x-icon
" }
{ "src": "/favicon.
svg", "sizes": "any", "type": "image/svg+xml
" }
]
]
}
}
src/layouts/Base.astro
View file @
c467d7b8
...
@@ -77,8 +77,7 @@ const allLd = [organizationLd, websiteLd, webpageLd, ...pageLd.filter((item) =>
...
@@ -77,8 +77,7 @@ const allLd = [organizationLd, websiteLd, webpageLd, ...pageLd.filter((item) =>
<meta
name=
"description"
content=
{description}
/>
<meta
name=
"description"
content=
{description}
/>
<meta
name=
"robots"
content=
{noindex
?
"
noindex
,
nofollow
"
:
"
index
,
follow
,
max-image-preview:large
,
max-snippet:-1
,
max-video-preview:-1
"}
/>
<meta
name=
"robots"
content=
{noindex
?
"
noindex
,
nofollow
"
:
"
index
,
follow
,
max-image-preview:large
,
max-snippet:-1
,
max-video-preview:-1
"}
/>
<link
rel=
"canonical"
href=
{canonical}
/>
<link
rel=
"canonical"
href=
{canonical}
/>
<link
rel=
"icon"
href=
"/favicon.ico"
sizes=
"32x32"
/>
<link
rel=
"icon"
href=
"/favicon.svg"
type=
"image/svg+xml"
/>
<link
rel=
"icon"
href=
{logo.src}
type=
"image/svg+xml"
/>
<link
rel=
"manifest"
href=
"/site.webmanifest"
/>
<link
rel=
"manifest"
href=
"/site.webmanifest"
/>
<link
rel=
"alternate"
hreflang=
"zh-CN"
href=
{canonical}
/>
<link
rel=
"alternate"
hreflang=
"zh-CN"
href=
{canonical}
/>
<link
rel=
"alternate"
hreflang=
"x-default"
href=
{canonical}
/>
<link
rel=
"alternate"
hreflang=
"x-default"
href=
{canonical}
/>
...
...
src/pages/favicon.ico.ts
deleted
100644 → 0
View file @
b6426fcf
import
type
{
APIRoute
}
from
"astro"
;
function
makeFavicon
():
Uint8Array
{
const
size
=
32
;
const
pixelBytes
=
size
*
size
*
4
;
const
maskBytes
=
size
*
4
;
const
imageBytes
=
40
+
pixelBytes
+
maskBytes
;
const
bytes
=
new
Uint8Array
(
22
+
imageBytes
);
const
view
=
new
DataView
(
bytes
.
buffer
);
view
.
setUint16
(
2
,
1
,
true
);
// ICO type
view
.
setUint16
(
4
,
1
,
true
);
// image count
bytes
[
6
]
=
size
;
bytes
[
7
]
=
size
;
view
.
setUint16
(
10
,
1
,
true
);
view
.
setUint16
(
12
,
32
,
true
);
view
.
setUint32
(
14
,
imageBytes
,
true
);
view
.
setUint32
(
18
,
22
,
true
);
view
.
setUint32
(
22
,
40
,
true
);
// BITMAPINFOHEADER
view
.
setInt32
(
26
,
size
,
true
);
view
.
setInt32
(
30
,
size
*
2
,
true
);
// XOR + AND mask heights
view
.
setUint16
(
34
,
1
,
true
);
view
.
setUint16
(
36
,
32
,
true
);
view
.
setUint32
(
42
,
pixelBytes
,
true
);
const
pixelOffset
=
62
;
for
(
let
y
=
0
;
y
<
size
;
y
++
)
{
for
(
let
x
=
0
;
x
<
size
;
x
++
)
{
const
offset
=
pixelOffset
+
((
size
-
1
-
y
)
*
size
+
x
)
*
4
;
const
roundedCorner
=
(
x
<
3
||
x
>
28
)
&&
(
y
<
3
||
y
>
28
);
const
jMark
=
(
x
>=
18
&&
x
<=
22
&&
y
>=
7
&&
y
<=
22
)
||
(
x
>=
10
&&
x
<=
22
&&
y
>=
7
&&
y
<=
11
)
||
(
x
>=
9
&&
x
<=
18
&&
y
>=
20
&&
y
<=
24
);
bytes
[
offset
]
=
jMark
?
255
:
0
;
bytes
[
offset
+
1
]
=
jMark
?
255
:
183
;
bytes
[
offset
+
2
]
=
jMark
?
255
:
0
;
bytes
[
offset
+
3
]
=
roundedCorner
?
0
:
255
;
}
}
return
bytes
;
}
const
favicon
=
makeFavicon
();
export
const
prerender
=
true
;
export
const
GET
:
APIRoute
=
()
=>
new
Response
(
favicon
.
buffer
as
ArrayBuffer
,
{
headers
:
{
"Content-Type"
:
"image/x-icon"
,
"Cache-Control"
:
"public, max-age=31536000, immutable"
,
},
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment