Skip to content

Commit ec2eeb0

Browse files
committed
Remove logo rewrites and add SVG logo route for improved asset handling
1 parent 9c28219 commit ec2eeb0

2 files changed

Lines changed: 49 additions & 8 deletions

File tree

app/logo/route.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
const svg = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<svg
3+
width="210mm"
4+
height="297mm"
5+
viewBox="0 0 210 297"
6+
version="1.1"
7+
id="svg1"
8+
xml:space="preserve"
9+
xmlns="http://www.w3.org/2000/svg"
10+
xmlns:svg="http://www.w3.org/2000/svg">
11+
<defs id="defs1">
12+
<mask id="cube-cutout">
13+
<path
14+
style="fill:#ffffff;stroke-width:0.264583"
15+
d="m 101.27586,64.293104 56.89655,32.810343 V 161.5862 L 101.46552,194.01724 44.568964,161.5862 44.75862,96.534482 Z" />
16+
17+
<path
18+
style="fill:#000000;stroke-width:0.264583"
19+
d="m 49.025862,107.06034 v 51.58621 l 46.086207,25.69828 v -20.29311 l -7.681037,-4.36207 0.189656,11 L 56.61207,154 56.51724,142.52586 87.620688,159.68965 87.431032,149.5431 56.61207,133.0431 v -12.51724 l 31.008618,16.87931 -0.189656,12.42241 7.586208,4.07759 0.09483,-21.81034 z" />
20+
<path
21+
style="fill:#000000;stroke-width:0.264583"
22+
d="m 104.78448,133.61207 45.61207,-25.41379 0.47414,21.05172 -8.06035,4.26724 v -11.56897 l -30.62931,16.87931 v 11.75863 L 143,133.23276 l -0.0948,10.05172 -30.81896,16.78448 c 0,0 0.18965,13.18104 -0.0948,13.18104 -0.28449,0 -0.28449,0 -0.28449,0 l 30.9138,-17.06897 v -12.70689 l 7.68103,-4.26725 0.18966,19.9138 -45.61207,26.83621 z" />
23+
<path
24+
style="fill:#000000;stroke-width:0.264583"
25+
d="m 136.38627,98.970564 c 6.97353,-4.023193 6.97353,-4.023193 6.97353,-4.023193 L 101.38448,70.405889 61.823075,93.606307 69.869465,98.03182 101.65269,80.195662 Z" />
26+
<path
27+
style="fill:#000000;stroke-width:0.264583"
28+
d="m 104.33482,95.617905 6.30301,2.145702 -6.1689,2.950343 -2.54802,5.76658 -2.548026,-5.76658 -6.571215,-2.950343 6.437109,-2.548023 2.413912,-5.498364 z" />
29+
</mask>
30+
</defs>
31+
32+
<g id="layer1">
33+
<path
34+
style="fill:#ffffff;stroke-width:0.264583"
35+
mask="url(#cube-cutout)"
36+
d="m 101.27586,64.293104 56.89655,32.810343 V 161.5862 L 101.46552,194.01724 44.568964,161.5862 44.75862,96.534482 Z"
37+
id="path84-masked" />
38+
</g>
39+
</svg>
40+
`;
41+
42+
export async function GET() {
43+
return new Response(svg, {
44+
headers: {
45+
"Content-Type": "image/svg+xml; charset=utf-8",
46+
"Cache-Control": "public, max-age=0, s-maxage=86400, stale-while-revalidate=604800",
47+
},
48+
});
49+
}

next.config.mjs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@ const nextConfig = {
6666

6767
return config
6868
},
69-
async rewrites() {
70-
return [
71-
{
72-
source: '/logo',
73-
destination: '/logo.png',
74-
},
75-
];
76-
},
7769
async redirects() {
7870
return [
7971
{

0 commit comments

Comments
 (0)