Skip to content

Commit 4a917a7

Browse files
committed
More cleanup from sitemap->opml change
1 parent 884fc08 commit 4a917a7

File tree

7 files changed

+60
-263
lines changed

7 files changed

+60
-263
lines changed

public/favicon.ico

8.54 KB
Binary file not shown.

public/favicon.svg

+1-1
Loading

public/sitemap.xml

+2-257
Original file line numberDiff line numberDiff line change
@@ -1,262 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<?xml-stylesheet type="text/xsl" href="https://www.sitemap.style/xslt/vanilla-water.xslt" ?>
2+
<?xml-stylesheet type="text/xsl" href="/sitemap.xslt" ?>
33
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
44
<url>
5-
<loc>https://logo-of-the-day.vectorlogo.zone/</loc>
6-
<lastmod>2025-01-07</lastmod>
7-
<changefreq>daily</changefreq>
8-
<priority>1.0</priority>
9-
</url>
10-
<url>
11-
<loc>https://logo-of-the-day.vectorlogo.zone/archive/</loc>
12-
<lastmod>2025-01-07</lastmod>
13-
<changefreq>daily</changefreq>
14-
<priority>1.0</priority>
15-
</url>
16-
<url>
17-
<loc>https://logo-of-the-day.vectorlogo.zone/archive/all.html</loc>
18-
<lastmod>2025-01-07</lastmod>
19-
<changefreq>daily</changefreq>
20-
<priority>1.0</priority>
21-
</url>
22-
<url>
23-
<loc>https://logo-of-the-day.vectorlogo.zone/archive/2025-01-07.html</loc>
24-
<lastmod>2025-01-07</lastmod>
25-
<changefreq>never</changefreq>
26-
<priority>1.0</priority>
27-
</url>
28-
<url>
29-
<loc>https://logo-of-the-day.vectorlogo.zone/archive/2025-01-06.html</loc>
30-
<lastmod>2025-01-06</lastmod>
31-
<changefreq>never</changefreq>
32-
<priority>1.0</priority>
33-
</url>
34-
<url>
35-
<loc>https://logo-of-the-day.vectorlogo.zone/bubble/</loc>
36-
<lastmod>2025-01-05</lastmod>
37-
<changefreq>never</changefreq>
38-
<priority>1.0</priority>
39-
</url>
40-
<url>
41-
<loc>https://logo-of-the-day.vectorlogo.zone/bubble/test/a.html</loc>
42-
<lastmod>2025-01-04</lastmod>
43-
<changefreq>never</changefreq>
44-
<priority>1.0</priority>
45-
</url>
46-
<url>
47-
<loc>https://logo-of-the-day.vectorlogo.zone/bubble/test/b.html</loc>
48-
<lastmod>2025-01-03</lastmod>
49-
<changefreq>never</changefreq>
50-
<priority>1.0</priority>
51-
</url>
52-
<url>
53-
<loc>https://logo-of-the-day.vectorlogo.zone/bubble/zest/a.html</loc>
54-
<lastmod>2025-01-04</lastmod>
55-
<changefreq>never</changefreq>
56-
<priority>1.0</priority>
57-
</url>
58-
<url>
59-
<loc>https://logo-of-the-day.vectorlogo.zone/bubble/zest/b.html</loc>
60-
<lastmod>2025-01-03</lastmod>
61-
<changefreq>never</changefreq>
62-
<priority>1.0</priority>
63-
</url>
64-
<url>
65-
<loc>https://logo-of-the-day.vectorlogo.zone/cactus/default.html</loc>
66-
<lastmod>2025-01-02</lastmod>
67-
<changefreq>never</changefreq>
68-
<priority>1.0</priority>
69-
</url>
70-
<url>
71-
<loc>https://logo-of-the-day.vectorlogo.zone/cactus/2025-01-01.html</loc>
72-
<lastmod>2025-01-01</lastmod>
73-
<changefreq>never</changefreq>
74-
<priority>1.0</priority>
75-
</url>
76-
<url>
77-
<loc>https://logo-of-the-day.vectorlogo.zone/cactus/2024-12-32.html</loc>
78-
<lastmod>2024-12-31</lastmod>
79-
<changefreq>never</changefreq>
80-
<priority>1.0</priority>
81-
</url>
82-
<url>
83-
<loc>https://logo-of-the-day.vectorlogo.zone/cactus/2024-12-33.html</loc>
84-
<lastmod>2024-12-31</lastmod>
85-
<changefreq>never</changefreq>
86-
<priority>1.0</priority>
87-
</url>
88-
<url>
89-
<loc>https://logo-of-the-day.vectorlogo.zone/cactus/2024-12-34.html</loc>
90-
<lastmod>2024-12-31</lastmod>
91-
<changefreq>never</changefreq>
92-
<priority>1.0</priority>
93-
</url>
94-
<url>
95-
<loc>https://logo-of-the-day.vectorlogo.zone/cactus/2024-12-35.html</loc>
96-
<lastmod>2024-12-31</lastmod>
97-
<changefreq>never</changefreq>
98-
<priority>1.0</priority>
99-
</url>
100-
<url>
101-
<loc>https://logo-of-the-day.vectorlogo.zone/cactus/zz</loc>
102-
<lastmod>2024-12-31</lastmod>
103-
<changefreq>never</changefreq>
104-
<priority>1.0</priority>
105-
</url>
106-
<url>
107-
<loc>https://logo-of-the-day.vectorlogo.zone/eggs/</loc>
108-
<lastmod>2024-12-13</lastmod>
109-
<changefreq>never</changefreq>
110-
<priority>1.0</priority>
111-
</url>
112-
<url>
113-
<loc>https://logo-of-the-day.vectorlogo.zone/eggs/2024-12-12.html</loc>
114-
<lastmod>2024-12-12</lastmod>
115-
<changefreq>never</changefreq>
116-
<priority>1.0</priority>
117-
</url>
118-
<url>
119-
<loc>https://logo-of-the-day.vectorlogo.zone/eggs/2024-12-11.html</loc>
120-
<lastmod>2024-12-11</lastmod>
121-
<changefreq>never</changefreq>
122-
<priority>1.0</priority>
123-
</url>
124-
<url>
125-
<loc>https://logo-of-the-day.vectorlogo.zone/fffoooo/</loc>
126-
<lastmod>2024-12-11</lastmod>
127-
<changefreq>never</changefreq>
128-
<priority>1.0</priority>
129-
</url>
130-
<url>
131-
<loc>https://logo-of-the-day.vectorlogo.zone/gggoooo/</loc>
132-
<lastmod>2024-12-11</lastmod>
133-
<changefreq>never</changefreq>
134-
<priority>1.0</priority>
135-
</url>
136-
<url>
137-
<loc>https://logo-of-the-day.vectorlogo.zone/hhhoooo/</loc>
138-
<lastmod>2024-12-11</lastmod>
139-
<changefreq>never</changefreq>
140-
<priority>1.0</priority>
141-
</url>
142-
<url>
143-
<loc>https://logo-of-the-day.vectorlogo.zone/root10.html</loc>
144-
<lastmod>2024-12-11</lastmod>
145-
<changefreq>never</changefreq>
146-
<priority>1.0</priority>
147-
</url>
148-
<url>
149-
<loc>https://logo-of-the-day.vectorlogo.zone/root11.html</loc>
150-
<lastmod>2024-12-11</lastmod>
151-
<changefreq>never</changefreq>
152-
<priority>1.0</priority>
153-
</url>
154-
<url>
155-
<loc>https://logo-of-the-day.vectorlogo.zone/root12.html</loc>
156-
<lastmod>2024-12-11</lastmod>
157-
<changefreq>never</changefreq>
158-
<priority>1.0</priority>
159-
</url>
160-
<url>
161-
<loc>https://logo-of-the-day.vectorlogo.zone/root13.html</loc>
162-
<lastmod>2024-12-11</lastmod>
163-
<changefreq>never</changefreq>
164-
<priority>1.0</priority>
165-
</url>
166-
<url>
167-
<loc>https://logo-of-the-day.vectorlogo.zone/root14.html</loc>
168-
<lastmod>2024-12-11</lastmod>
169-
<changefreq>never</changefreq>
170-
<priority>1.0</priority>
171-
</url>
172-
<url>
173-
<loc>https://logo-of-the-day.vectorlogo.zone/root15.html</loc>
174-
<lastmod>2024-12-11</lastmod>
175-
<changefreq>never</changefreq>
176-
<priority>1.0</priority>
177-
</url>
178-
<url>
179-
<loc>https://logo-of-the-day.vectorlogo.zone/root16.html</loc>
180-
<lastmod>2024-12-11</lastmod>
181-
<changefreq>never</changefreq>
182-
<priority>1.0</priority>
183-
</url>
184-
<url>
185-
<loc>https://logo-of-the-day.vectorlogo.zone/root17.html</loc>
186-
<lastmod>2024-12-11</lastmod>
187-
<changefreq>never</changefreq>
188-
<priority>1.0</priority>
189-
</url>
190-
<url>
191-
<loc>https://logo-of-the-day.vectorlogo.zone/root18.html</loc>
192-
<lastmod>2024-12-11</lastmod>
193-
<changefreq>never</changefreq>
194-
<priority>1.0</priority>
195-
</url>
196-
<url>
197-
<loc>https://logo-of-the-day.vectorlogo.zone/root19.html</loc>
198-
<lastmod>2024-12-11</lastmod>
199-
<changefreq>never</changefreq>
200-
<priority>1.0</priority>
201-
</url>
202-
<url>
203-
<loc>https://logo-of-the-day.vectorlogo.zone/root20.html</loc>
204-
<lastmod>2024-12-11</lastmod>
205-
<changefreq>never</changefreq>
206-
<priority>1.0</priority>
207-
</url>
208-
<url>
209-
<loc>https://logo-of-the-day.vectorlogo.zone/root21.html</loc>
210-
<lastmod>2024-12-11</lastmod>
211-
<changefreq>never</changefreq>
212-
<priority>1.0</priority>
213-
</url>
214-
<url>
215-
<loc>https://logo-of-the-day.vectorlogo.zone/root22.html</loc>
216-
<lastmod>2024-12-11</lastmod>
217-
<changefreq>never</changefreq>
218-
<priority>1.0</priority>
219-
</url>
220-
<url>
221-
<loc>https://logo-of-the-day.vectorlogo.zone/root23.html</loc>
222-
<lastmod>2024-12-11</lastmod>
223-
<changefreq>never</changefreq>
224-
<priority>1.0</priority>
225-
</url>
226-
<url>
227-
<loc>https://logo-of-the-day.vectorlogo.zone/root24.html</loc>
228-
<lastmod>2024-12-11</lastmod>
229-
<changefreq>never</changefreq>
230-
<priority>1.0</priority>
231-
</url>
232-
<url>
233-
<loc>https://logo-of-the-day.vectorlogo.zone/root25.html</loc>
234-
<lastmod>2024-12-11</lastmod>
235-
<changefreq>never</changefreq>
236-
<priority>1.0</priority>
237-
</url>
238-
<url>
239-
<loc>https://logo-of-the-day.vectorlogo.zone/root26.html</loc>
240-
<lastmod>2024-12-11</lastmod>
241-
<changefreq>never</changefreq>
242-
<priority>1.0</priority>
243-
</url>
244-
<url>
245-
<loc>https://logo-of-the-day.vectorlogo.zone/root27.html</loc>
246-
<lastmod>2024-12-11</lastmod>
247-
<changefreq>never</changefreq>
248-
<priority>1.0</priority>
249-
</url>
250-
<url>
251-
<loc>https://logo-of-the-day.vectorlogo.zone/root28.html</loc>
252-
<lastmod>2024-12-11</lastmod>
253-
<changefreq>never</changefreq>
254-
<priority>1.0</priority>
255-
</url>
256-
<url>
257-
<loc>https://logo-of-the-day.vectorlogo.zone/root29.html</loc>
258-
<lastmod>2024-12-11</lastmod>
259-
<changefreq>never</changefreq>
260-
<priority>1.0</priority>
5+
<loc>https://opml.xml.style/</loc>
2616
</url>
2627
</urlset>

public/sitemap.xslt

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xsl:stylesheet
3+
version="3.0"
4+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5+
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
6+
>
7+
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
8+
<xsl:template match="/">
9+
<xsl:message>Powered by <a href="https://www.sitemap.style/">Sitemap Style</a></xsl:message>
10+
11+
<!-- get the hostname from the first url/loc -->
12+
<xsl:variable name="hostname" select="substring-before(substring-after(/sitemap:urlset/sitemap:url[1]/sitemap:loc, '://'), '/')" />
13+
14+
<html>
15+
<head>
16+
<meta name="viewport" content="width=device-width, initial-scale=1" />
17+
<meta name="referrer" content="unsafe-url" />
18+
<title>Sitemap for <xsl:value-of select="$hostname"/></title>
19+
<link rel="stylesheet" href="https://www.sitemap.style/css/water.min.css" />
20+
<script>
21+
window.addEventListener('load', function() {
22+
window.location.href = `https://view.sitemap.style/view.html?url=${encodeURIComponent(window.location.href)}`;
23+
});
24+
</script>
25+
</head>
26+
<body>
27+
<h1>Pages on <xsl:value-of select="$hostname"/></h1>
28+
29+
<ul>
30+
<xsl:for-each select="sitemap:urlset/sitemap:url">
31+
<xsl:variable name="sitemap_loc"><xsl:value-of select="sitemap:loc"/></xsl:variable>
32+
<xsl:variable name="sitemap_lastmod"><xsl:value-of select="sitemap:lastmod"/></xsl:variable>
33+
<li>
34+
<a href="{$sitemap_loc}"><xsl:value-of select="sitemap:loc" /></a>
35+
<xsl:if test="$sitemap_lastmod!=''">
36+
(<xsl:value-of select="sitemap:lastmod" />)
37+
</xsl:if>
38+
</li>
39+
</xsl:for-each>
40+
</ul>
41+
<p><xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> pages</p>
42+
<p><small>Powered by <a href="https://www.sitemap.style/"><img referrerpolicy="origin" src="https://www.sitemap.style/favicon.svg" style="height:1em;padding-right:0.25em;vertical-align:middle;" />Sitemap.Style</a></small></p>
43+
</body>
44+
</html>
45+
</xsl:template>
46+
</xsl:stylesheet>

src/app/view.html/page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getTranslations } from 'next-intl/server';
33
import Container from '@mui/material/Container';
44
import Box from '@mui/material/Box';
55

6-
import SitemapTreeView from '@/components/SitemapTreeView';
6+
import { OpmlTreeView } from '@/components/OpmlTreeView';
77
import NavBar from '@/components/NavBar';
88
import { constants } from '@/lib/constants';
99
import { getFirst } from '@/lib/getFirst';
@@ -78,7 +78,7 @@ export default async function View({
7878
width: '100%',
7979
}}
8080
>
81-
{sme.success || items.length ? <SitemapTreeView items={items} /> : <h1>Failed to load outline</h1>}
81+
{sme.success || items.length ? <OpmlTreeView items={items} /> : <h1>Failed to load outline</h1>}
8282
</Box>
8383
<PoweredBy />
8484
</Container>

src/components/SitemapTreeView.tsx src/components/OpmlTreeView.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useTreeItem2 } from '@mui/x-tree-view/useTreeItem2';
99
import NextLink from 'next/link';
1010
import { useTranslations } from 'next-intl';
1111

12-
type SitemapTreeViewProps = {
12+
type OpmlTreeViewProps = {
1313
items: TreeViewBaseItem[]
1414
}
1515

@@ -76,11 +76,15 @@ const CustomTreeItem = React.forwardRef(function CustomTreeItem(
7676
);
7777
});
7878

79-
export default function BasicRichTreeView({ items }: SitemapTreeViewProps) {
79+
function OpmlTreeView({ items }: OpmlTreeViewProps) {
8080
return (
8181
<RichTreeView
8282
expansionTrigger="iconContainer"
8383
slots={{ item: CustomTreeItem }}
8484
items={items} onItemClick={onClick} />
8585
);
86+
}
87+
88+
export {
89+
OpmlTreeView,
8690
}

src/lib/loadOutline.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ async function loadOutline(url_str: string):Promise<OpmlData> {
3434
retVal.messages.push(errorMessage(err));
3535
return retVal;
3636
}
37+
retVal.messages.push(`Fetching outline: ${url_str}`);
3738

3839
const start = Date.now();
3940

@@ -95,7 +96,8 @@ async function loadOutline(url_str: string):Promise<OpmlData> {
9596
return retVal;
9697
}
9798

98-
console.log(JSON.stringify(xml_data, null, 2));
99+
retVal.messages.push(`Entries: ${retVal.count}`);
100+
retVal.messages.push(`Parsing complete in ${Date.now() - start}ms.`);
99101

100102
retVal.title = xml_data.opml?.head?.title;
101103

0 commit comments

Comments
 (0)